1# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2018 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# gnome-compiler-flags.m4
24#
25# serial 4
26#
27
28dnl GNOME_COMPILE_WARNINGS
29dnl Turn on many useful compiler warnings and substitute the result into
30dnl WARN_CFLAGS
31dnl For now, only works on GCC
32dnl Pass the default value of the --enable-compile-warnings configure option as
33dnl the first argument to the macro, defaulting to 'yes'.
34dnl Additional warning/error flags can be passed as an optional second argument.
35dnl
36dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
37AU_DEFUN([GNOME_COMPILE_WARNINGS],[
38    dnl ******************************
39    dnl More compiler warnings
40    dnl ******************************
41
42    AC_ARG_ENABLE(compile-warnings,
43                  AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
44                                 [Turn on compiler warnings]),,
45                  [enable_compile_warnings="m4_default([$1],[yes])"])
46
47    if test "x$GCC" != xyes; then
48	enable_compile_warnings=no
49    fi
50
51    warning_flags=
52    realsave_CFLAGS="$CFLAGS"
53
54    dnl These are warning flags that aren't marked as fatal.  Can be
55    dnl overridden on a per-project basis with -Wno-foo.
56    base_warn_flags=" \
57        -Wall \
58        -Wstrict-prototypes \
59        -Wnested-externs \
60    "
61
62    dnl These compiler flags typically indicate very broken or suspicious
63    dnl code.  Some of them such as implicit-function-declaration are
64    dnl just not default because gcc compiles a lot of legacy code.
65    dnl We choose to make this set into explicit errors.
66    base_error_flags=" \
67        -Werror=missing-prototypes \
68        -Werror=implicit-function-declaration \
69        -Werror=pointer-arith \
70        -Werror=init-self \
71        -Werror=format-security \
72        -Werror=format=2 \
73        -Werror=missing-include-dirs \
74        -Werror=return-type \
75    "
76
77    dnl Additional warning or error flags provided by the module author to
78    dnl allow stricter standards to be imposed on a per-module basis.
79    dnl The author can pass -W or -Werror flags here as they see fit.
80    additional_flags="m4_default([$2],[])"
81
82    case "$enable_compile_warnings" in
83    no)
84        warning_flags="-w"
85        ;;
86    minimum)
87        warning_flags="-Wall"
88        ;;
89    yes|maximum|error)
90        warning_flags="$base_warn_flags $base_error_flags $additional_flags"
91        ;;
92    *)
93        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
94        ;;
95    esac
96
97    if test "$enable_compile_warnings" = "error" ; then
98        warning_flags="$warning_flags -Werror"
99    fi
100
101    dnl Check whether GCC supports the warning options
102    for option in $warning_flags; do
103	save_CFLAGS="$CFLAGS"
104	CFLAGS="$CFLAGS $option"
105	AC_MSG_CHECKING([whether gcc understands $option])
106	AC_TRY_COMPILE([], [],
107	    has_option=yes,
108	    has_option=no,)
109	CFLAGS="$save_CFLAGS"
110	AC_MSG_RESULT([$has_option])
111	if test $has_option = yes; then
112	    tested_warning_flags="$tested_warning_flags $option"
113	fi
114	unset has_option
115	unset save_CFLAGS
116    done
117    unset option
118    CFLAGS="$realsave_CFLAGS"
119    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
120    AC_MSG_RESULT($tested_warning_flags)
121
122    AC_ARG_ENABLE(iso-c,
123                  AS_HELP_STRING([--enable-iso-c],
124                                 [Try to warn if code is not ISO C ]),,
125                  [enable_iso_c=no])
126
127    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
128    complCFLAGS=
129    if test "x$enable_iso_c" != "xno"; then
130	if test "x$GCC" = "xyes"; then
131	case " $CFLAGS " in
132	    *[\ \	]-ansi[\ \	]*) ;;
133	    *) complCFLAGS="$complCFLAGS -ansi" ;;
134	esac
135	case " $CFLAGS " in
136	    *[\ \	]-pedantic[\ \	]*) ;;
137	    *) complCFLAGS="$complCFLAGS -pedantic" ;;
138	esac
139	fi
140    fi
141    AC_MSG_RESULT($complCFLAGS)
142
143    WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
144    AC_SUBST(WARN_CFLAGS)
145],
146[[$0: This macro is deprecated. You should use AX_COMPILER_FLAGS instead and
147eliminate use of --enable-iso-c.
148See: http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html#ax_compiler_flags]])
149
150dnl For C++, do basically the same thing.
151
152AU_DEFUN([GNOME_CXX_WARNINGS],[
153  AC_ARG_ENABLE(cxx-warnings,
154                AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
155                               [Turn on compiler warnings.]),,
156                [enable_cxx_warnings="m4_default([$1],[minimum])"])
157
158  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
159  warnCXXFLAGS=
160  if test "x$GXX" != xyes; then
161    enable_cxx_warnings=no
162  fi
163  if test "x$enable_cxx_warnings" != "xno"; then
164    if test "x$GXX" = "xyes"; then
165      case " $CXXFLAGS " in
166      *[\ \	]-Wall[\ \	]*) ;;
167      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
168      esac
169
170      ## -W is not all that useful.  And it cannot be controlled
171      ## with individual -Wno-xxx flags, unlike -Wall
172      if test "x$enable_cxx_warnings" = "xyes"; then
173	warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
174      fi
175    fi
176  fi
177  AC_MSG_RESULT($warnCXXFLAGS)
178
179   AC_ARG_ENABLE(iso-cxx,
180                 AS_HELP_STRING([--enable-iso-cxx],
181                                [Try to warn if code is not ISO C++ ]),,
182                 [enable_iso_cxx=no])
183
184   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
185   complCXXFLAGS=
186   if test "x$enable_iso_cxx" != "xno"; then
187     if test "x$GXX" = "xyes"; then
188      case " $CXXFLAGS " in
189      *[\ \	]-ansi[\ \	]*) ;;
190      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
191      esac
192
193      case " $CXXFLAGS " in
194      *[\ \	]-pedantic[\ \	]*) ;;
195      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
196      esac
197     fi
198   fi
199  AC_MSG_RESULT($complCXXFLAGS)
200
201  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
202  AC_SUBST(WARN_CXXFLAGS)
203],
204[[$0: This macro is deprecated. You should use AX_COMPILER_FLAGS instead and
205eliminate use of --enable-iso-cxx.
206See: http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html#ax_compiler_flags]])
207
208# Configure paths for GTK+
209# Owen Taylor     1997-2001
210
211# Version number used by aclocal, see `info automake Serials`.
212# Increment on every change.
213#serial 1
214
215dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
216dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
217dnl pass to pkg-config
218dnl
219AC_DEFUN([AM_PATH_GTK_3_0],
220[m4_warn([obsolete], [AM_PATH_GTK_3_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk+-3.0]) instead])
221dnl Get the cflags and libraries from pkg-config
222dnl
223AC_ARG_ENABLE(gtktest, [  --disable-gtktest       do not try to compile and run a test GTK+ program],
224		    , enable_gtktest=yes)
225  min_gtk_version=ifelse([$1], [], [3.0.0], [$1])
226
227  pkg_config_args="gtk+-3.0 >= $min_gtk_version"
228  for module in . $4
229  do
230      case "$module" in
231         gthread)
232             pkg_config_args="$pkg_config_args gthread-2.0"
233         ;;
234      esac
235  done
236
237  no_gtk=""
238
239  PKG_PROG_PKG_CONFIG([0.16])
240
241  if test -z "$PKG_CONFIG"; then
242    no_gtk=yes
243  fi
244
245  AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
246
247  if test -n "$PKG_CONFIG"; then
248    ## don't try to run the test against uninstalled libtool libs
249    if $PKG_CONFIG --uninstalled $pkg_config_args; then
250	  echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
251	  enable_gtktest=no
252    fi
253
254    if $PKG_CONFIG $pkg_config_args; then
255	  :
256    else
257	  no_gtk=yes
258    fi
259  fi
260
261  if test x"$no_gtk" = x ; then
262    GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
263    GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
264    gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
265           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
266    gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
267           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
268    gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
269           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
270    if test "x$enable_gtktest" = "xyes" ; then
271      ac_save_CFLAGS="$CFLAGS"
272      ac_save_LIBS="$LIBS"
273      CFLAGS="$CFLAGS $GTK_CFLAGS"
274      LIBS="$GTK_LIBS $LIBS"
275dnl
276dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
277dnl checks the results of pkg-config to some extent)
278dnl
279      rm -f conf.gtktest
280      AC_TRY_RUN([
281#include <gtk/gtk.h>
282#include <stdio.h>
283#include <stdlib.h>
284
285int
286main ()
287{
288  unsigned int major, minor, micro;
289
290  fclose (fopen ("conf.gtktest", "w"));
291
292  if (sscanf("$min_gtk_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
293     printf("%s, bad version string\n", "$min_gtk_version");
294     exit(1);
295   }
296
297  if ((gtk_major_version != $gtk_config_major_version) ||
298      (gtk_minor_version != $gtk_config_minor_version) ||
299      (gtk_micro_version != $gtk_config_micro_version))
300    {
301      printf("\n*** 'pkg-config --modversion gtk+-3.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
302             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
303             gtk_major_version, gtk_minor_version, gtk_micro_version);
304      printf ("*** was found! If pkg-config was correct, then it is best\n");
305      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
306      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
307      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
308      printf("*** required on your system.\n");
309      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
310      printf("*** to point to the correct configuration files\n");
311    }
312  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
313	   (gtk_minor_version != GTK_MINOR_VERSION) ||
314           (gtk_micro_version != GTK_MICRO_VERSION))
315    {
316      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
317	     GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
318      printf("*** library (version %d.%d.%d)\n",
319	     gtk_major_version, gtk_minor_version, gtk_micro_version);
320    }
321  else
322    {
323      if ((gtk_major_version > major) ||
324        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
325        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
326      {
327        return 0;
328       }
329     else
330      {
331        printf("\n*** An old version of GTK+ (%u.%u.%u) was found.\n",
332               gtk_major_version, gtk_minor_version, gtk_micro_version);
333        printf("*** You need a version of GTK+ newer than %u.%u.%u. The latest version of\n",
334	       major, minor, micro);
335        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
336        printf("***\n");
337        printf("*** If you have already installed a sufficiently new version, this error\n");
338        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
339        printf("*** being found. The easiest way to fix this is to remove the old version\n");
340        printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
341        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
342        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
343        printf("*** so that the correct libraries are found at run-time))\n");
344      }
345    }
346  return 1;
347}
348],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
349       CFLAGS="$ac_save_CFLAGS"
350       LIBS="$ac_save_LIBS"
351     fi
352  fi
353  if test "x$no_gtk" = x ; then
354     AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
355     ifelse([$2], , :, [$2])
356  else
357     AC_MSG_RESULT(no)
358     if test -z "$PKG_CONFIG"; then
359       echo "*** A new enough version of pkg-config was not found."
360       echo "*** See http://pkgconfig.sourceforge.net"
361     else
362       if test -f conf.gtktest ; then
363        :
364       else
365          echo "*** Could not run GTK+ test program, checking why..."
366	  ac_save_CFLAGS="$CFLAGS"
367	  ac_save_LIBS="$LIBS"
368          CFLAGS="$CFLAGS $GTK_CFLAGS"
369          LIBS="$LIBS $GTK_LIBS"
370          AC_TRY_LINK([
371#include <gtk/gtk.h>
372#include <stdio.h>
373],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
374        [ echo "*** The test program compiled, but did not run. This usually means"
375          echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
376          echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
377          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
378          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
379          echo "*** is required on your system"
380	  echo "***"
381          echo "*** If you have an old version installed, it is best to remove it, although"
382          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
383        [ echo "*** The test program failed to compile or link. See the file config.log for the"
384          echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."])
385          CFLAGS="$ac_save_CFLAGS"
386          LIBS="$ac_save_LIBS"
387       fi
388     fi
389     GTK_CFLAGS=""
390     GTK_LIBS=""
391     ifelse([$3], , :, [$3])
392  fi
393  AC_SUBST(GTK_CFLAGS)
394  AC_SUBST(GTK_LIBS)
395  rm -f conf.gtktest
396])
397
398dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
399dnl   Tests for BACKEND-NAME in the GTK targets list
400dnl
401AC_DEFUN([GTK_CHECK_BACKEND],
402[m4_warn([obsolete], [GTK_CHECK_BACKEND is deprecated, use PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0]) or similar instead])
403  pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0)
404  min_gtk_version=ifelse([$2],,3.0.0,$2)
405  pkg_config_args="$pkg_config_args >= $min_gtk_version"
406
407  PKG_PROG_PKG_CONFIG([0.16])
408  AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([No pkg-config found])])
409
410  if $PKG_CONFIG $pkg_config_args ; then
411    target_found=yes
412  else
413    target_found=no
414  fi
415
416  if test "x$target_found" = "xno"; then
417    ifelse([$4],,[AC_MSG_ERROR([Backend $backend not found.])],[$4])
418  else
419    ifelse([$3],,[:],[$3])
420  fi
421])
422
423dnl -*- mode: autoconf -*-
424dnl Copyright 2009 Johan Dahlin
425dnl
426dnl This file is free software; the author(s) gives unlimited
427dnl permission to copy and/or distribute it, with or without
428dnl modifications, as long as this notice is preserved.
429dnl
430
431# serial 1
432
433m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
434[
435    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
436    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
437    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
438
439    dnl enable/disable introspection
440    m4_if([$2], [require],
441    [dnl
442        enable_introspection=yes
443    ],[dnl
444        AC_ARG_ENABLE(introspection,
445                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
446                                 [Enable introspection for this build]),,
447                                 [enable_introspection=auto])
448    ])dnl
449
450    AC_MSG_CHECKING([for gobject-introspection])
451
452    dnl presence/version checking
453    AS_CASE([$enable_introspection],
454    [no], [dnl
455        found_introspection="no (disabled, use --enable-introspection to enable)"
456    ],dnl
457    [yes],[dnl
458        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
459                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
460        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
461                         found_introspection=yes,
462                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
463    ],dnl
464    [auto],[dnl
465        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
466	dnl Canonicalize enable_introspection
467	enable_introspection=$found_introspection
468    ],dnl
469    [dnl
470        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
471    ])dnl
472
473    AC_MSG_RESULT([$found_introspection])
474
475    INTROSPECTION_SCANNER=
476    INTROSPECTION_COMPILER=
477    INTROSPECTION_GENERATE=
478    INTROSPECTION_GIRDIR=
479    INTROSPECTION_TYPELIBDIR=
480    if test "x$found_introspection" = "xyes"; then
481       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
482       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
483       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
484       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
485       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
486       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
487       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
488       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
489    fi
490    AC_SUBST(INTROSPECTION_SCANNER)
491    AC_SUBST(INTROSPECTION_COMPILER)
492    AC_SUBST(INTROSPECTION_GENERATE)
493    AC_SUBST(INTROSPECTION_GIRDIR)
494    AC_SUBST(INTROSPECTION_TYPELIBDIR)
495    AC_SUBST(INTROSPECTION_CFLAGS)
496    AC_SUBST(INTROSPECTION_LIBS)
497    AC_SUBST(INTROSPECTION_MAKEFILE)
498
499    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
500])
501
502
503dnl Usage:
504dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
505
506AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
507[
508  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
509])
510
511dnl Usage:
512dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
513
514
515AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
516[
517  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
518])
519
520dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
521dnl serial 11 (pkg-config-0.29.1)
522dnl
523dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
524dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
525dnl
526dnl This program is free software; you can redistribute it and/or modify
527dnl it under the terms of the GNU General Public License as published by
528dnl the Free Software Foundation; either version 2 of the License, or
529dnl (at your option) any later version.
530dnl
531dnl This program is distributed in the hope that it will be useful, but
532dnl WITHOUT ANY WARRANTY; without even the implied warranty of
533dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
534dnl General Public License for more details.
535dnl
536dnl You should have received a copy of the GNU General Public License
537dnl along with this program; if not, write to the Free Software
538dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
539dnl 02111-1307, USA.
540dnl
541dnl As a special exception to the GNU General Public License, if you
542dnl distribute this file as part of a program that contains a
543dnl configuration script generated by Autoconf, you may include it under
544dnl the same distribution terms that you use for the rest of that
545dnl program.
546
547dnl PKG_PREREQ(MIN-VERSION)
548dnl -----------------------
549dnl Since: 0.29
550dnl
551dnl Verify that the version of the pkg-config macros are at least
552dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
553dnl installed version of pkg-config, this checks the developer's version
554dnl of pkg.m4 when generating configure.
555dnl
556dnl To ensure that this macro is defined, also add:
557dnl m4_ifndef([PKG_PREREQ],
558dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
559dnl
560dnl See the "Since" comment for each macro you use to see what version
561dnl of the macros you require.
562m4_defun([PKG_PREREQ],
563[m4_define([PKG_MACROS_VERSION], [0.29.1])
564m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
565    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
566])dnl PKG_PREREQ
567
568dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
569dnl ----------------------------------
570dnl Since: 0.16
571dnl
572dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
573dnl first found in the path. Checks that the version of pkg-config found
574dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
575dnl used since that's the first version where most current features of
576dnl pkg-config existed.
577AC_DEFUN([PKG_PROG_PKG_CONFIG],
578[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
579m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
580m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
581AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
582AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
583AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
584
585if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
586	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
587fi
588if test -n "$PKG_CONFIG"; then
589	_pkg_min_version=m4_default([$1], [0.9.0])
590	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
591	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
592		AC_MSG_RESULT([yes])
593	else
594		AC_MSG_RESULT([no])
595		PKG_CONFIG=""
596	fi
597fi[]dnl
598])dnl PKG_PROG_PKG_CONFIG
599
600dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
601dnl -------------------------------------------------------------------
602dnl Since: 0.18
603dnl
604dnl Check to see whether a particular set of modules exists. Similar to
605dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
606dnl
607dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
608dnl only at the first occurence in configure.ac, so if the first place
609dnl it's called might be skipped (such as if it is within an "if", you
610dnl have to call PKG_CHECK_EXISTS manually
611AC_DEFUN([PKG_CHECK_EXISTS],
612[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
613if test -n "$PKG_CONFIG" && \
614    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
615  m4_default([$2], [:])
616m4_ifvaln([$3], [else
617  $3])dnl
618fi])
619
620dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
621dnl ---------------------------------------------
622dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
623dnl pkg_failed based on the result.
624m4_define([_PKG_CONFIG],
625[if test -n "$$1"; then
626    pkg_cv_[]$1="$$1"
627 elif test -n "$PKG_CONFIG"; then
628    PKG_CHECK_EXISTS([$3],
629                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
630		      test "x$?" != "x0" && pkg_failed=yes ],
631		     [pkg_failed=yes])
632 else
633    pkg_failed=untried
634fi[]dnl
635])dnl _PKG_CONFIG
636
637dnl _PKG_SHORT_ERRORS_SUPPORTED
638dnl ---------------------------
639dnl Internal check to see if pkg-config supports short errors.
640AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
641[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
642if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
643        _pkg_short_errors_supported=yes
644else
645        _pkg_short_errors_supported=no
646fi[]dnl
647])dnl _PKG_SHORT_ERRORS_SUPPORTED
648
649
650dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
651dnl   [ACTION-IF-NOT-FOUND])
652dnl --------------------------------------------------------------
653dnl Since: 0.4.0
654dnl
655dnl Note that if there is a possibility the first call to
656dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
657dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
658AC_DEFUN([PKG_CHECK_MODULES],
659[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
660AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
661AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
662
663pkg_failed=no
664AC_MSG_CHECKING([for $1])
665
666_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
667_PKG_CONFIG([$1][_LIBS], [libs], [$2])
668
669m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
670and $1[]_LIBS to avoid the need to call pkg-config.
671See the pkg-config man page for more details.])
672
673if test $pkg_failed = yes; then
674   	AC_MSG_RESULT([no])
675        _PKG_SHORT_ERRORS_SUPPORTED
676        if test $_pkg_short_errors_supported = yes; then
677	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
678        else
679	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
680        fi
681	# Put the nasty error message in config.log where it belongs
682	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
683
684	m4_default([$4], [AC_MSG_ERROR(
685[Package requirements ($2) were not met:
686
687$$1_PKG_ERRORS
688
689Consider adjusting the PKG_CONFIG_PATH environment variable if you
690installed software in a non-standard prefix.
691
692_PKG_TEXT])[]dnl
693        ])
694elif test $pkg_failed = untried; then
695     	AC_MSG_RESULT([no])
696	m4_default([$4], [AC_MSG_FAILURE(
697[The pkg-config script could not be found or is too old.  Make sure it
698is in your PATH or set the PKG_CONFIG environment variable to the full
699path to pkg-config.
700
701_PKG_TEXT
702
703To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
704        ])
705else
706	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
707	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
708        AC_MSG_RESULT([yes])
709	$3
710fi[]dnl
711])dnl PKG_CHECK_MODULES
712
713
714dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
715dnl   [ACTION-IF-NOT-FOUND])
716dnl ---------------------------------------------------------------------
717dnl Since: 0.29
718dnl
719dnl Checks for existence of MODULES and gathers its build flags with
720dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
721dnl and VARIABLE-PREFIX_LIBS from --libs.
722dnl
723dnl Note that if there is a possibility the first call to
724dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
725dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
726dnl configure.ac.
727AC_DEFUN([PKG_CHECK_MODULES_STATIC],
728[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
729_save_PKG_CONFIG=$PKG_CONFIG
730PKG_CONFIG="$PKG_CONFIG --static"
731PKG_CHECK_MODULES($@)
732PKG_CONFIG=$_save_PKG_CONFIG[]dnl
733])dnl PKG_CHECK_MODULES_STATIC
734
735
736dnl PKG_INSTALLDIR([DIRECTORY])
737dnl -------------------------
738dnl Since: 0.27
739dnl
740dnl Substitutes the variable pkgconfigdir as the location where a module
741dnl should install pkg-config .pc files. By default the directory is
742dnl $libdir/pkgconfig, but the default can be changed by passing
743dnl DIRECTORY. The user can override through the --with-pkgconfigdir
744dnl parameter.
745AC_DEFUN([PKG_INSTALLDIR],
746[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
747m4_pushdef([pkg_description],
748    [pkg-config installation directory @<:@]pkg_default[@:>@])
749AC_ARG_WITH([pkgconfigdir],
750    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
751    [with_pkgconfigdir=]pkg_default)
752AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
753m4_popdef([pkg_default])
754m4_popdef([pkg_description])
755])dnl PKG_INSTALLDIR
756
757
758dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
759dnl --------------------------------
760dnl Since: 0.27
761dnl
762dnl Substitutes the variable noarch_pkgconfigdir as the location where a
763dnl module should install arch-independent pkg-config .pc files. By
764dnl default the directory is $datadir/pkgconfig, but the default can be
765dnl changed by passing DIRECTORY. The user can override through the
766dnl --with-noarch-pkgconfigdir parameter.
767AC_DEFUN([PKG_NOARCH_INSTALLDIR],
768[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
769m4_pushdef([pkg_description],
770    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
771AC_ARG_WITH([noarch-pkgconfigdir],
772    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
773    [with_noarch_pkgconfigdir=]pkg_default)
774AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
775m4_popdef([pkg_default])
776m4_popdef([pkg_description])
777])dnl PKG_NOARCH_INSTALLDIR
778
779
780dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
781dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
782dnl -------------------------------------------
783dnl Since: 0.28
784dnl
785dnl Retrieves the value of the pkg-config variable for the given module.
786AC_DEFUN([PKG_CHECK_VAR],
787[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
788AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
789
790_PKG_CONFIG([$1], [variable="][$3]["], [$2])
791AS_VAR_COPY([$1], [pkg_cv_][$1])
792
793AS_VAR_IF([$1], [""], [$5], [$4])dnl
794])dnl PKG_CHECK_VAR
795
796# Copyright (C) 2002-2018 Free Software Foundation, Inc.
797#
798# This file is free software; the Free Software Foundation
799# gives unlimited permission to copy and/or distribute it,
800# with or without modifications, as long as this notice is preserved.
801
802# AM_AUTOMAKE_VERSION(VERSION)
803# ----------------------------
804# Automake X.Y traces this macro to ensure aclocal.m4 has been
805# generated from the m4 files accompanying Automake X.Y.
806# (This private macro should not be called outside this file.)
807AC_DEFUN([AM_AUTOMAKE_VERSION],
808[am__api_version='1.16'
809dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
810dnl require some minimum version.  Point them to the right macro.
811m4_if([$1], [1.16.1], [],
812      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
813])
814
815# _AM_AUTOCONF_VERSION(VERSION)
816# -----------------------------
817# aclocal traces this macro to find the Autoconf version.
818# This is a private macro too.  Using m4_define simplifies
819# the logic in aclocal, which can simply ignore this definition.
820m4_define([_AM_AUTOCONF_VERSION], [])
821
822# AM_SET_CURRENT_AUTOMAKE_VERSION
823# -------------------------------
824# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
825# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
826AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
827[AM_AUTOMAKE_VERSION([1.16.1])dnl
828m4_ifndef([AC_AUTOCONF_VERSION],
829  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
830_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
831
832# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
833
834# Copyright (C) 2001-2018 Free Software Foundation, Inc.
835#
836# This file is free software; the Free Software Foundation
837# gives unlimited permission to copy and/or distribute it,
838# with or without modifications, as long as this notice is preserved.
839
840# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
841# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
842# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
843#
844# Of course, Automake must honor this variable whenever it calls a
845# tool from the auxiliary directory.  The problem is that $srcdir (and
846# therefore $ac_aux_dir as well) can be either absolute or relative,
847# depending on how configure is run.  This is pretty annoying, since
848# it makes $ac_aux_dir quite unusable in subdirectories: in the top
849# source directory, any form will work fine, but in subdirectories a
850# relative path needs to be adjusted first.
851#
852# $ac_aux_dir/missing
853#    fails when called from a subdirectory if $ac_aux_dir is relative
854# $top_srcdir/$ac_aux_dir/missing
855#    fails if $ac_aux_dir is absolute,
856#    fails when called from a subdirectory in a VPATH build with
857#          a relative $ac_aux_dir
858#
859# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
860# are both prefixed by $srcdir.  In an in-source build this is usually
861# harmless because $srcdir is '.', but things will broke when you
862# start a VPATH build or use an absolute $srcdir.
863#
864# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
865# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
866#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
867# and then we would define $MISSING as
868#   MISSING="\${SHELL} $am_aux_dir/missing"
869# This will work as long as MISSING is not called from configure, because
870# unfortunately $(top_srcdir) has no meaning in configure.
871# However there are other variables, like CC, which are often used in
872# configure, and could therefore not use this "fixed" $ac_aux_dir.
873#
874# Another solution, used here, is to always expand $ac_aux_dir to an
875# absolute PATH.  The drawback is that using absolute paths prevent a
876# configured tree to be moved without reconfiguration.
877
878AC_DEFUN([AM_AUX_DIR_EXPAND],
879[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
880# Expand $ac_aux_dir to an absolute path.
881am_aux_dir=`cd "$ac_aux_dir" && pwd`
882])
883
884# AM_CONDITIONAL                                            -*- Autoconf -*-
885
886# Copyright (C) 1997-2018 Free Software Foundation, Inc.
887#
888# This file is free software; the Free Software Foundation
889# gives unlimited permission to copy and/or distribute it,
890# with or without modifications, as long as this notice is preserved.
891
892# AM_CONDITIONAL(NAME, SHELL-CONDITION)
893# -------------------------------------
894# Define a conditional.
895AC_DEFUN([AM_CONDITIONAL],
896[AC_PREREQ([2.52])dnl
897 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
898       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
899AC_SUBST([$1_TRUE])dnl
900AC_SUBST([$1_FALSE])dnl
901_AM_SUBST_NOTMAKE([$1_TRUE])dnl
902_AM_SUBST_NOTMAKE([$1_FALSE])dnl
903m4_define([_AM_COND_VALUE_$1], [$2])dnl
904if $2; then
905  $1_TRUE=
906  $1_FALSE='#'
907else
908  $1_TRUE='#'
909  $1_FALSE=
910fi
911AC_CONFIG_COMMANDS_PRE(
912[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
913  AC_MSG_ERROR([[conditional "$1" was never defined.
914Usually this means the macro was only invoked conditionally.]])
915fi])])
916
917# Copyright (C) 1999-2018 Free Software Foundation, Inc.
918#
919# This file is free software; the Free Software Foundation
920# gives unlimited permission to copy and/or distribute it,
921# with or without modifications, as long as this notice is preserved.
922
923
924# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
925# written in clear, in which case automake, when reading aclocal.m4,
926# will think it sees a *use*, and therefore will trigger all it's
927# C support machinery.  Also note that it means that autoscan, seeing
928# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
929
930
931# _AM_DEPENDENCIES(NAME)
932# ----------------------
933# See how the compiler implements dependency checking.
934# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
935# We try a few techniques and use that to set a single cache variable.
936#
937# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
938# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
939# dependency, and given that the user is not expected to run this macro,
940# just rely on AC_PROG_CC.
941AC_DEFUN([_AM_DEPENDENCIES],
942[AC_REQUIRE([AM_SET_DEPDIR])dnl
943AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
944AC_REQUIRE([AM_MAKE_INCLUDE])dnl
945AC_REQUIRE([AM_DEP_TRACK])dnl
946
947m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
948      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
949      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
950      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
951      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
952      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
953                    [depcc="$$1"   am_compiler_list=])
954
955AC_CACHE_CHECK([dependency style of $depcc],
956               [am_cv_$1_dependencies_compiler_type],
957[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
958  # We make a subdir and do the tests there.  Otherwise we can end up
959  # making bogus files that we don't know about and never remove.  For
960  # instance it was reported that on HP-UX the gcc test will end up
961  # making a dummy file named 'D' -- because '-MD' means "put the output
962  # in D".
963  rm -rf conftest.dir
964  mkdir conftest.dir
965  # Copy depcomp to subdir because otherwise we won't find it if we're
966  # using a relative directory.
967  cp "$am_depcomp" conftest.dir
968  cd conftest.dir
969  # We will build objects and dependencies in a subdirectory because
970  # it helps to detect inapplicable dependency modes.  For instance
971  # both Tru64's cc and ICC support -MD to output dependencies as a
972  # side effect of compilation, but ICC will put the dependencies in
973  # the current directory while Tru64 will put them in the object
974  # directory.
975  mkdir sub
976
977  am_cv_$1_dependencies_compiler_type=none
978  if test "$am_compiler_list" = ""; then
979     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
980  fi
981  am__universal=false
982  m4_case([$1], [CC],
983    [case " $depcc " in #(
984     *\ -arch\ *\ -arch\ *) am__universal=true ;;
985     esac],
986    [CXX],
987    [case " $depcc " in #(
988     *\ -arch\ *\ -arch\ *) am__universal=true ;;
989     esac])
990
991  for depmode in $am_compiler_list; do
992    # Setup a source with many dependencies, because some compilers
993    # like to wrap large dependency lists on column 80 (with \), and
994    # we should not choose a depcomp mode which is confused by this.
995    #
996    # We need to recreate these files for each test, as the compiler may
997    # overwrite some of them when testing with obscure command lines.
998    # This happens at least with the AIX C compiler.
999    : > sub/conftest.c
1000    for i in 1 2 3 4 5 6; do
1001      echo '#include "conftst'$i'.h"' >> sub/conftest.c
1002      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1003      # Solaris 10 /bin/sh.
1004      echo '/* dummy */' > sub/conftst$i.h
1005    done
1006    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1007
1008    # We check with '-c' and '-o' for the sake of the "dashmstdout"
1009    # mode.  It turns out that the SunPro C++ compiler does not properly
1010    # handle '-M -o', and we need to detect this.  Also, some Intel
1011    # versions had trouble with output in subdirs.
1012    am__obj=sub/conftest.${OBJEXT-o}
1013    am__minus_obj="-o $am__obj"
1014    case $depmode in
1015    gcc)
1016      # This depmode causes a compiler race in universal mode.
1017      test "$am__universal" = false || continue
1018      ;;
1019    nosideeffect)
1020      # After this tag, mechanisms are not by side-effect, so they'll
1021      # only be used when explicitly requested.
1022      if test "x$enable_dependency_tracking" = xyes; then
1023	continue
1024      else
1025	break
1026      fi
1027      ;;
1028    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1029      # This compiler won't grok '-c -o', but also, the minuso test has
1030      # not run yet.  These depmodes are late enough in the game, and
1031      # so weak that their functioning should not be impacted.
1032      am__obj=conftest.${OBJEXT-o}
1033      am__minus_obj=
1034      ;;
1035    none) break ;;
1036    esac
1037    if depmode=$depmode \
1038       source=sub/conftest.c object=$am__obj \
1039       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1040       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1041         >/dev/null 2>conftest.err &&
1042       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1043       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1044       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1045       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1046      # icc doesn't choke on unknown options, it will just issue warnings
1047      # or remarks (even with -Werror).  So we grep stderr for any message
1048      # that says an option was ignored or not supported.
1049      # When given -MP, icc 7.0 and 7.1 complain thusly:
1050      #   icc: Command line warning: ignoring option '-M'; no argument required
1051      # The diagnosis changed in icc 8.0:
1052      #   icc: Command line remark: option '-MP' not supported
1053      if (grep 'ignoring option' conftest.err ||
1054          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1055        am_cv_$1_dependencies_compiler_type=$depmode
1056        break
1057      fi
1058    fi
1059  done
1060
1061  cd ..
1062  rm -rf conftest.dir
1063else
1064  am_cv_$1_dependencies_compiler_type=none
1065fi
1066])
1067AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1068AM_CONDITIONAL([am__fastdep$1], [
1069  test "x$enable_dependency_tracking" != xno \
1070  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1071])
1072
1073
1074# AM_SET_DEPDIR
1075# -------------
1076# Choose a directory name for dependency files.
1077# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1078AC_DEFUN([AM_SET_DEPDIR],
1079[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1080AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1081])
1082
1083
1084# AM_DEP_TRACK
1085# ------------
1086AC_DEFUN([AM_DEP_TRACK],
1087[AC_ARG_ENABLE([dependency-tracking], [dnl
1088AS_HELP_STRING(
1089  [--enable-dependency-tracking],
1090  [do not reject slow dependency extractors])
1091AS_HELP_STRING(
1092  [--disable-dependency-tracking],
1093  [speeds up one-time build])])
1094if test "x$enable_dependency_tracking" != xno; then
1095  am_depcomp="$ac_aux_dir/depcomp"
1096  AMDEPBACKSLASH='\'
1097  am__nodep='_no'
1098fi
1099AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1100AC_SUBST([AMDEPBACKSLASH])dnl
1101_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1102AC_SUBST([am__nodep])dnl
1103_AM_SUBST_NOTMAKE([am__nodep])dnl
1104])
1105
1106# Generate code to set up dependency tracking.              -*- Autoconf -*-
1107
1108# Copyright (C) 1999-2018 Free Software Foundation, Inc.
1109#
1110# This file is free software; the Free Software Foundation
1111# gives unlimited permission to copy and/or distribute it,
1112# with or without modifications, as long as this notice is preserved.
1113
1114# _AM_OUTPUT_DEPENDENCY_COMMANDS
1115# ------------------------------
1116AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1117[{
1118  # Older Autoconf quotes --file arguments for eval, but not when files
1119  # are listed without --file.  Let's play safe and only enable the eval
1120  # if we detect the quoting.
1121  # TODO: see whether this extra hack can be removed once we start
1122  # requiring Autoconf 2.70 or later.
1123  AS_CASE([$CONFIG_FILES],
1124          [*\'*], [eval set x "$CONFIG_FILES"],
1125          [*], [set x $CONFIG_FILES])
1126  shift
1127  # Used to flag and report bootstrapping failures.
1128  am_rc=0
1129  for am_mf
1130  do
1131    # Strip MF so we end up with the name of the file.
1132    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
1133    # Check whether this is an Automake generated Makefile which includes
1134    # dependency-tracking related rules and includes.
1135    # Grep'ing the whole file directly is not great: AIX grep has a line
1136    # limit of 2048, but all sed's we know have understand at least 4000.
1137    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
1138      || continue
1139    am_dirpart=`AS_DIRNAME(["$am_mf"])`
1140    am_filepart=`AS_BASENAME(["$am_mf"])`
1141    AM_RUN_LOG([cd "$am_dirpart" \
1142      && sed -e '/# am--include-marker/d' "$am_filepart" \
1143        | $MAKE -f - am--depfiles]) || am_rc=$?
1144  done
1145  if test $am_rc -ne 0; then
1146    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
1147    for automatic dependency tracking.  Try re-running configure with the
1148    '--disable-dependency-tracking' option to at least be able to build
1149    the package (albeit without support for automatic dependency tracking).])
1150  fi
1151  AS_UNSET([am_dirpart])
1152  AS_UNSET([am_filepart])
1153  AS_UNSET([am_mf])
1154  AS_UNSET([am_rc])
1155  rm -f conftest-deps.mk
1156}
1157])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1158
1159
1160# AM_OUTPUT_DEPENDENCY_COMMANDS
1161# -----------------------------
1162# This macro should only be invoked once -- use via AC_REQUIRE.
1163#
1164# This code is only required when automatic dependency tracking is enabled.
1165# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
1166# order to bootstrap the dependency handling code.
1167AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1168[AC_CONFIG_COMMANDS([depfiles],
1169     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1170     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
1171
1172# Do all the work for Automake.                             -*- Autoconf -*-
1173
1174# Copyright (C) 1996-2018 Free Software Foundation, Inc.
1175#
1176# This file is free software; the Free Software Foundation
1177# gives unlimited permission to copy and/or distribute it,
1178# with or without modifications, as long as this notice is preserved.
1179
1180# This macro actually does too much.  Some checks are only needed if
1181# your package does certain things.  But this isn't really a big deal.
1182
1183dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1184m4_define([AC_PROG_CC],
1185m4_defn([AC_PROG_CC])
1186[_AM_PROG_CC_C_O
1187])
1188
1189# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1190# AM_INIT_AUTOMAKE([OPTIONS])
1191# -----------------------------------------------
1192# The call with PACKAGE and VERSION arguments is the old style
1193# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1194# and VERSION should now be passed to AC_INIT and removed from
1195# the call to AM_INIT_AUTOMAKE.
1196# We support both call styles for the transition.  After
1197# the next Automake release, Autoconf can make the AC_INIT
1198# arguments mandatory, and then we can depend on a new Autoconf
1199# release and drop the old call support.
1200AC_DEFUN([AM_INIT_AUTOMAKE],
1201[AC_PREREQ([2.65])dnl
1202dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1203dnl the ones we care about.
1204m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1205AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1206AC_REQUIRE([AC_PROG_INSTALL])dnl
1207if test "`cd $srcdir && pwd`" != "`pwd`"; then
1208  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1209  # is not polluted with repeated "-I."
1210  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1211  # test to see if srcdir already configured
1212  if test -f $srcdir/config.status; then
1213    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1214  fi
1215fi
1216
1217# test whether we have cygpath
1218if test -z "$CYGPATH_W"; then
1219  if (cygpath --version) >/dev/null 2>/dev/null; then
1220    CYGPATH_W='cygpath -w'
1221  else
1222    CYGPATH_W=echo
1223  fi
1224fi
1225AC_SUBST([CYGPATH_W])
1226
1227# Define the identity of the package.
1228dnl Distinguish between old-style and new-style calls.
1229m4_ifval([$2],
1230[AC_DIAGNOSE([obsolete],
1231             [$0: two- and three-arguments forms are deprecated.])
1232m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1233 AC_SUBST([PACKAGE], [$1])dnl
1234 AC_SUBST([VERSION], [$2])],
1235[_AM_SET_OPTIONS([$1])dnl
1236dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1237m4_if(
1238  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1239  [ok:ok],,
1240  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1241 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1242 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1243
1244_AM_IF_OPTION([no-define],,
1245[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1246 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1247
1248# Some tools Automake needs.
1249AC_REQUIRE([AM_SANITY_CHECK])dnl
1250AC_REQUIRE([AC_ARG_PROGRAM])dnl
1251AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1252AM_MISSING_PROG([AUTOCONF], [autoconf])
1253AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1254AM_MISSING_PROG([AUTOHEADER], [autoheader])
1255AM_MISSING_PROG([MAKEINFO], [makeinfo])
1256AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1257AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1258AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1259# For better backward compatibility.  To be removed once Automake 1.9.x
1260# dies out for good.  For more background, see:
1261# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1262# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1263AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1264# We need awk for the "check" target (and possibly the TAP driver).  The
1265# system "awk" is bad on some platforms.
1266AC_REQUIRE([AC_PROG_AWK])dnl
1267AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1268AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1269_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1270	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1271			     [_AM_PROG_TAR([v7])])])
1272_AM_IF_OPTION([no-dependencies],,
1273[AC_PROVIDE_IFELSE([AC_PROG_CC],
1274		  [_AM_DEPENDENCIES([CC])],
1275		  [m4_define([AC_PROG_CC],
1276			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1277AC_PROVIDE_IFELSE([AC_PROG_CXX],
1278		  [_AM_DEPENDENCIES([CXX])],
1279		  [m4_define([AC_PROG_CXX],
1280			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1281AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1282		  [_AM_DEPENDENCIES([OBJC])],
1283		  [m4_define([AC_PROG_OBJC],
1284			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1285AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1286		  [_AM_DEPENDENCIES([OBJCXX])],
1287		  [m4_define([AC_PROG_OBJCXX],
1288			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1289])
1290AC_REQUIRE([AM_SILENT_RULES])dnl
1291dnl The testsuite driver may need to know about EXEEXT, so add the
1292dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
1293dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1294AC_CONFIG_COMMANDS_PRE(dnl
1295[m4_provide_if([_AM_COMPILER_EXEEXT],
1296  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1297
1298# POSIX will say in a future version that running "rm -f" with no argument
1299# is OK; and we want to be able to make that assumption in our Makefile
1300# recipes.  So use an aggressive probe to check that the usage we want is
1301# actually supported "in the wild" to an acceptable degree.
1302# See automake bug#10828.
1303# To make any issue more visible, cause the running configure to be aborted
1304# by default if the 'rm' program in use doesn't match our expectations; the
1305# user can still override this though.
1306if rm -f && rm -fr && rm -rf; then : OK; else
1307  cat >&2 <<'END'
1308Oops!
1309
1310Your 'rm' program seems unable to run without file operands specified
1311on the command line, even when the '-f' option is present.  This is contrary
1312to the behaviour of most rm programs out there, and not conforming with
1313the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1314
1315Please tell bug-automake@gnu.org about your system, including the value
1316of your $PATH and any error possibly output before this message.  This
1317can help us improve future automake versions.
1318
1319END
1320  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1321    echo 'Configuration will proceed anyway, since you have set the' >&2
1322    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1323    echo >&2
1324  else
1325    cat >&2 <<'END'
1326Aborting the configuration process, to ensure you take notice of the issue.
1327
1328You can download and install GNU coreutils to get an 'rm' implementation
1329that behaves properly: <https://www.gnu.org/software/coreutils/>.
1330
1331If you want to complete the configuration process using your problematic
1332'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1333to "yes", and re-run configure.
1334
1335END
1336    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1337  fi
1338fi
1339dnl The trailing newline in this macro's definition is deliberate, for
1340dnl backward compatibility and to allow trailing 'dnl'-style comments
1341dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
1342])
1343
1344dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1345dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1346dnl mangled by Autoconf and run in a shell conditional statement.
1347m4_define([_AC_COMPILER_EXEEXT],
1348m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1349
1350# When config.status generates a header, we must update the stamp-h file.
1351# This file resides in the same directory as the config header
1352# that is generated.  The stamp files are numbered to have different names.
1353
1354# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1355# loop where config.status creates the headers, so we can generate
1356# our stamp files there.
1357AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1358[# Compute $1's index in $config_headers.
1359_am_arg=$1
1360_am_stamp_count=1
1361for _am_header in $config_headers :; do
1362  case $_am_header in
1363    $_am_arg | $_am_arg:* )
1364      break ;;
1365    * )
1366      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1367  esac
1368done
1369echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1370
1371# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1372#
1373# This file is free software; the Free Software Foundation
1374# gives unlimited permission to copy and/or distribute it,
1375# with or without modifications, as long as this notice is preserved.
1376
1377# AM_PROG_INSTALL_SH
1378# ------------------
1379# Define $install_sh.
1380AC_DEFUN([AM_PROG_INSTALL_SH],
1381[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1382if test x"${install_sh+set}" != xset; then
1383  case $am_aux_dir in
1384  *\ * | *\	*)
1385    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1386  *)
1387    install_sh="\${SHELL} $am_aux_dir/install-sh"
1388  esac
1389fi
1390AC_SUBST([install_sh])])
1391
1392# Copyright (C) 2003-2018 Free Software Foundation, Inc.
1393#
1394# This file is free software; the Free Software Foundation
1395# gives unlimited permission to copy and/or distribute it,
1396# with or without modifications, as long as this notice is preserved.
1397
1398# Check whether the underlying file-system supports filenames
1399# with a leading dot.  For instance MS-DOS doesn't.
1400AC_DEFUN([AM_SET_LEADING_DOT],
1401[rm -rf .tst 2>/dev/null
1402mkdir .tst 2>/dev/null
1403if test -d .tst; then
1404  am__leading_dot=.
1405else
1406  am__leading_dot=_
1407fi
1408rmdir .tst 2>/dev/null
1409AC_SUBST([am__leading_dot])])
1410
1411# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1412# From Jim Meyering
1413
1414# Copyright (C) 1996-2018 Free Software Foundation, Inc.
1415#
1416# This file is free software; the Free Software Foundation
1417# gives unlimited permission to copy and/or distribute it,
1418# with or without modifications, as long as this notice is preserved.
1419
1420# AM_MAINTAINER_MODE([DEFAULT-MODE])
1421# ----------------------------------
1422# Control maintainer-specific portions of Makefiles.
1423# Default is to disable them, unless 'enable' is passed literally.
1424# For symmetry, 'disable' may be passed as well.  Anyway, the user
1425# can override the default with the --enable/--disable switch.
1426AC_DEFUN([AM_MAINTAINER_MODE],
1427[m4_case(m4_default([$1], [disable]),
1428       [enable], [m4_define([am_maintainer_other], [disable])],
1429       [disable], [m4_define([am_maintainer_other], [enable])],
1430       [m4_define([am_maintainer_other], [enable])
1431        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1432AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1433  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1434  AC_ARG_ENABLE([maintainer-mode],
1435    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1436      am_maintainer_other[ make rules and dependencies not useful
1437      (and sometimes confusing) to the casual installer])],
1438    [USE_MAINTAINER_MODE=$enableval],
1439    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1440  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1441  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1442  MAINT=$MAINTAINER_MODE_TRUE
1443  AC_SUBST([MAINT])dnl
1444]
1445)
1446
1447# Check to see how 'make' treats includes.	            -*- Autoconf -*-
1448
1449# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1450#
1451# This file is free software; the Free Software Foundation
1452# gives unlimited permission to copy and/or distribute it,
1453# with or without modifications, as long as this notice is preserved.
1454
1455# AM_MAKE_INCLUDE()
1456# -----------------
1457# Check whether make has an 'include' directive that can support all
1458# the idioms we need for our automatic dependency tracking code.
1459AC_DEFUN([AM_MAKE_INCLUDE],
1460[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
1461cat > confinc.mk << 'END'
1462am__doit:
1463	@echo this is the am__doit target >confinc.out
1464.PHONY: am__doit
1465END
1466am__include="#"
1467am__quote=
1468# BSD make does it like this.
1469echo '.include "confinc.mk" # ignored' > confmf.BSD
1470# Other make implementations (GNU, Solaris 10, AIX) do it like this.
1471echo 'include confinc.mk # ignored' > confmf.GNU
1472_am_result=no
1473for s in GNU BSD; do
1474  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
1475  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
1476      ['0:this is the am__doit target'],
1477      [AS_CASE([$s],
1478          [BSD], [am__include='.include' am__quote='"'],
1479          [am__include='include' am__quote=''])])
1480  if test "$am__include" != "#"; then
1481    _am_result="yes ($s style)"
1482    break
1483  fi
1484done
1485rm -f confinc.* confmf.*
1486AC_MSG_RESULT([${_am_result}])
1487AC_SUBST([am__include])])
1488AC_SUBST([am__quote])])
1489
1490# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1491
1492# Copyright (C) 1997-2018 Free Software Foundation, Inc.
1493#
1494# This file is free software; the Free Software Foundation
1495# gives unlimited permission to copy and/or distribute it,
1496# with or without modifications, as long as this notice is preserved.
1497
1498# AM_MISSING_PROG(NAME, PROGRAM)
1499# ------------------------------
1500AC_DEFUN([AM_MISSING_PROG],
1501[AC_REQUIRE([AM_MISSING_HAS_RUN])
1502$1=${$1-"${am_missing_run}$2"}
1503AC_SUBST($1)])
1504
1505# AM_MISSING_HAS_RUN
1506# ------------------
1507# Define MISSING if not defined so far and test if it is modern enough.
1508# If it is, set am_missing_run to use it, otherwise, to nothing.
1509AC_DEFUN([AM_MISSING_HAS_RUN],
1510[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1511AC_REQUIRE_AUX_FILE([missing])dnl
1512if test x"${MISSING+set}" != xset; then
1513  case $am_aux_dir in
1514  *\ * | *\	*)
1515    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1516  *)
1517    MISSING="\${SHELL} $am_aux_dir/missing" ;;
1518  esac
1519fi
1520# Use eval to expand $SHELL
1521if eval "$MISSING --is-lightweight"; then
1522  am_missing_run="$MISSING "
1523else
1524  am_missing_run=
1525  AC_MSG_WARN(['missing' script is too old or missing])
1526fi
1527])
1528
1529# Helper functions for option handling.                     -*- Autoconf -*-
1530
1531# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1532#
1533# This file is free software; the Free Software Foundation
1534# gives unlimited permission to copy and/or distribute it,
1535# with or without modifications, as long as this notice is preserved.
1536
1537# _AM_MANGLE_OPTION(NAME)
1538# -----------------------
1539AC_DEFUN([_AM_MANGLE_OPTION],
1540[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1541
1542# _AM_SET_OPTION(NAME)
1543# --------------------
1544# Set option NAME.  Presently that only means defining a flag for this option.
1545AC_DEFUN([_AM_SET_OPTION],
1546[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1547
1548# _AM_SET_OPTIONS(OPTIONS)
1549# ------------------------
1550# OPTIONS is a space-separated list of Automake options.
1551AC_DEFUN([_AM_SET_OPTIONS],
1552[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1553
1554# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1555# -------------------------------------------
1556# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1557AC_DEFUN([_AM_IF_OPTION],
1558[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1559
1560# Copyright (C) 1999-2018 Free Software Foundation, Inc.
1561#
1562# This file is free software; the Free Software Foundation
1563# gives unlimited permission to copy and/or distribute it,
1564# with or without modifications, as long as this notice is preserved.
1565
1566# _AM_PROG_CC_C_O
1567# ---------------
1568# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
1569# to automatically call this.
1570AC_DEFUN([_AM_PROG_CC_C_O],
1571[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1572AC_REQUIRE_AUX_FILE([compile])dnl
1573AC_LANG_PUSH([C])dnl
1574AC_CACHE_CHECK(
1575  [whether $CC understands -c and -o together],
1576  [am_cv_prog_cc_c_o],
1577  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1578  # Make sure it works both with $CC and with simple cc.
1579  # Following AC_PROG_CC_C_O, we do the test twice because some
1580  # compilers refuse to overwrite an existing .o file with -o,
1581  # though they will create one.
1582  am_cv_prog_cc_c_o=yes
1583  for am_i in 1 2; do
1584    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1585         && test -f conftest2.$ac_objext; then
1586      : OK
1587    else
1588      am_cv_prog_cc_c_o=no
1589      break
1590    fi
1591  done
1592  rm -f core conftest*
1593  unset am_i])
1594if test "$am_cv_prog_cc_c_o" != yes; then
1595   # Losing compiler, so override with the script.
1596   # FIXME: It is wrong to rewrite CC.
1597   # But if we don't then we get into trouble of one sort or another.
1598   # A longer-term fix would be to have automake use am__CC in this case,
1599   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1600   CC="$am_aux_dir/compile $CC"
1601fi
1602AC_LANG_POP([C])])
1603
1604# For backward compatibility.
1605AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1606
1607# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1608#
1609# This file is free software; the Free Software Foundation
1610# gives unlimited permission to copy and/or distribute it,
1611# with or without modifications, as long as this notice is preserved.
1612
1613# AM_RUN_LOG(COMMAND)
1614# -------------------
1615# Run COMMAND, save the exit status in ac_status, and log it.
1616# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1617AC_DEFUN([AM_RUN_LOG],
1618[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1619   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1620   ac_status=$?
1621   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1622   (exit $ac_status); }])
1623
1624# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1625
1626# Copyright (C) 1996-2018 Free Software Foundation, Inc.
1627#
1628# This file is free software; the Free Software Foundation
1629# gives unlimited permission to copy and/or distribute it,
1630# with or without modifications, as long as this notice is preserved.
1631
1632# AM_SANITY_CHECK
1633# ---------------
1634AC_DEFUN([AM_SANITY_CHECK],
1635[AC_MSG_CHECKING([whether build environment is sane])
1636# Reject unsafe characters in $srcdir or the absolute working directory
1637# name.  Accept space and tab only in the latter.
1638am_lf='
1639'
1640case `pwd` in
1641  *[[\\\"\#\$\&\'\`$am_lf]]*)
1642    AC_MSG_ERROR([unsafe absolute working directory name]);;
1643esac
1644case $srcdir in
1645  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1646    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1647esac
1648
1649# Do 'set' in a subshell so we don't clobber the current shell's
1650# arguments.  Must try -L first in case configure is actually a
1651# symlink; some systems play weird games with the mod time of symlinks
1652# (eg FreeBSD returns the mod time of the symlink's containing
1653# directory).
1654if (
1655   am_has_slept=no
1656   for am_try in 1 2; do
1657     echo "timestamp, slept: $am_has_slept" > conftest.file
1658     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1659     if test "$[*]" = "X"; then
1660	# -L didn't work.
1661	set X `ls -t "$srcdir/configure" conftest.file`
1662     fi
1663     if test "$[*]" != "X $srcdir/configure conftest.file" \
1664	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1665
1666	# If neither matched, then we have a broken ls.  This can happen
1667	# if, for instance, CONFIG_SHELL is bash and it inherits a
1668	# broken ls alias from the environment.  This has actually
1669	# happened.  Such a system could not be considered "sane".
1670	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1671  alias in your environment])
1672     fi
1673     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1674       break
1675     fi
1676     # Just in case.
1677     sleep 1
1678     am_has_slept=yes
1679   done
1680   test "$[2]" = conftest.file
1681   )
1682then
1683   # Ok.
1684   :
1685else
1686   AC_MSG_ERROR([newly created file is older than distributed files!
1687Check your system clock])
1688fi
1689AC_MSG_RESULT([yes])
1690# If we didn't sleep, we still need to ensure time stamps of config.status and
1691# generated files are strictly newer.
1692am_sleep_pid=
1693if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1694  ( sleep 1 ) &
1695  am_sleep_pid=$!
1696fi
1697AC_CONFIG_COMMANDS_PRE(
1698  [AC_MSG_CHECKING([that generated files are newer than configure])
1699   if test -n "$am_sleep_pid"; then
1700     # Hide warnings about reused PIDs.
1701     wait $am_sleep_pid 2>/dev/null
1702   fi
1703   AC_MSG_RESULT([done])])
1704rm -f conftest.file
1705])
1706
1707# Copyright (C) 2009-2018 Free Software Foundation, Inc.
1708#
1709# This file is free software; the Free Software Foundation
1710# gives unlimited permission to copy and/or distribute it,
1711# with or without modifications, as long as this notice is preserved.
1712
1713# AM_SILENT_RULES([DEFAULT])
1714# --------------------------
1715# Enable less verbose build rules; with the default set to DEFAULT
1716# ("yes" being less verbose, "no" or empty being verbose).
1717AC_DEFUN([AM_SILENT_RULES],
1718[AC_ARG_ENABLE([silent-rules], [dnl
1719AS_HELP_STRING(
1720  [--enable-silent-rules],
1721  [less verbose build output (undo: "make V=1")])
1722AS_HELP_STRING(
1723  [--disable-silent-rules],
1724  [verbose build output (undo: "make V=0")])dnl
1725])
1726case $enable_silent_rules in @%:@ (((
1727  yes) AM_DEFAULT_VERBOSITY=0;;
1728   no) AM_DEFAULT_VERBOSITY=1;;
1729    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1730esac
1731dnl
1732dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1733dnl do not support nested variable expansions.
1734dnl See automake bug#9928 and bug#10237.
1735am_make=${MAKE-make}
1736AC_CACHE_CHECK([whether $am_make supports nested variables],
1737   [am_cv_make_support_nested_variables],
1738   [if AS_ECHO([['TRUE=$(BAR$(V))
1739BAR0=false
1740BAR1=true
1741V=1
1742am__doit:
1743	@$(TRUE)
1744.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1745  am_cv_make_support_nested_variables=yes
1746else
1747  am_cv_make_support_nested_variables=no
1748fi])
1749if test $am_cv_make_support_nested_variables = yes; then
1750  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1751  AM_V='$(V)'
1752  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1753else
1754  AM_V=$AM_DEFAULT_VERBOSITY
1755  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1756fi
1757AC_SUBST([AM_V])dnl
1758AM_SUBST_NOTMAKE([AM_V])dnl
1759AC_SUBST([AM_DEFAULT_V])dnl
1760AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1761AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1762AM_BACKSLASH='\'
1763AC_SUBST([AM_BACKSLASH])dnl
1764_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1765])
1766
1767# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1768#
1769# This file is free software; the Free Software Foundation
1770# gives unlimited permission to copy and/or distribute it,
1771# with or without modifications, as long as this notice is preserved.
1772
1773# AM_PROG_INSTALL_STRIP
1774# ---------------------
1775# One issue with vendor 'install' (even GNU) is that you can't
1776# specify the program used to strip binaries.  This is especially
1777# annoying in cross-compiling environments, where the build's strip
1778# is unlikely to handle the host's binaries.
1779# Fortunately install-sh will honor a STRIPPROG variable, so we
1780# always use install-sh in "make install-strip", and initialize
1781# STRIPPROG with the value of the STRIP variable (set by the user).
1782AC_DEFUN([AM_PROG_INSTALL_STRIP],
1783[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1784# Installed binaries are usually stripped using 'strip' when the user
1785# run "make install-strip".  However 'strip' might not be the right
1786# tool to use in cross-compilation environments, therefore Automake
1787# will honor the 'STRIP' environment variable to overrule this program.
1788dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1789if test "$cross_compiling" != no; then
1790  AC_CHECK_TOOL([STRIP], [strip], :)
1791fi
1792INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1793AC_SUBST([INSTALL_STRIP_PROGRAM])])
1794
1795# Copyright (C) 2006-2018 Free Software Foundation, Inc.
1796#
1797# This file is free software; the Free Software Foundation
1798# gives unlimited permission to copy and/or distribute it,
1799# with or without modifications, as long as this notice is preserved.
1800
1801# _AM_SUBST_NOTMAKE(VARIABLE)
1802# ---------------------------
1803# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1804# This macro is traced by Automake.
1805AC_DEFUN([_AM_SUBST_NOTMAKE])
1806
1807# AM_SUBST_NOTMAKE(VARIABLE)
1808# --------------------------
1809# Public sister of _AM_SUBST_NOTMAKE.
1810AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1811
1812# Check how to create a tarball.                            -*- Autoconf -*-
1813
1814# Copyright (C) 2004-2018 Free Software Foundation, Inc.
1815#
1816# This file is free software; the Free Software Foundation
1817# gives unlimited permission to copy and/or distribute it,
1818# with or without modifications, as long as this notice is preserved.
1819
1820# _AM_PROG_TAR(FORMAT)
1821# --------------------
1822# Check how to create a tarball in format FORMAT.
1823# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1824#
1825# Substitute a variable $(am__tar) that is a command
1826# writing to stdout a FORMAT-tarball containing the directory
1827# $tardir.
1828#     tardir=directory && $(am__tar) > result.tar
1829#
1830# Substitute a variable $(am__untar) that extract such
1831# a tarball read from stdin.
1832#     $(am__untar) < result.tar
1833#
1834AC_DEFUN([_AM_PROG_TAR],
1835[# Always define AMTAR for backward compatibility.  Yes, it's still used
1836# in the wild :-(  We should find a proper way to deprecate it ...
1837AC_SUBST([AMTAR], ['$${TAR-tar}'])
1838
1839# We'll loop over all known methods to create a tar archive until one works.
1840_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1841
1842m4_if([$1], [v7],
1843  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1844
1845  [m4_case([$1],
1846    [ustar],
1847     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1848      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1849      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1850      # and bug#13588).
1851      am_max_uid=2097151 # 2^21 - 1
1852      am_max_gid=$am_max_uid
1853      # The $UID and $GID variables are not portable, so we need to resort
1854      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1855      # below are definitely unexpected, so allow the users to see them
1856      # (that is, avoid stderr redirection).
1857      am_uid=`id -u || echo unknown`
1858      am_gid=`id -g || echo unknown`
1859      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1860      if test $am_uid -le $am_max_uid; then
1861         AC_MSG_RESULT([yes])
1862      else
1863         AC_MSG_RESULT([no])
1864         _am_tools=none
1865      fi
1866      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1867      if test $am_gid -le $am_max_gid; then
1868         AC_MSG_RESULT([yes])
1869      else
1870        AC_MSG_RESULT([no])
1871        _am_tools=none
1872      fi],
1873
1874  [pax],
1875    [],
1876
1877  [m4_fatal([Unknown tar format])])
1878
1879  AC_MSG_CHECKING([how to create a $1 tar archive])
1880
1881  # Go ahead even if we have the value already cached.  We do so because we
1882  # need to set the values for the 'am__tar' and 'am__untar' variables.
1883  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1884
1885  for _am_tool in $_am_tools; do
1886    case $_am_tool in
1887    gnutar)
1888      for _am_tar in tar gnutar gtar; do
1889        AM_RUN_LOG([$_am_tar --version]) && break
1890      done
1891      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1892      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1893      am__untar="$_am_tar -xf -"
1894      ;;
1895    plaintar)
1896      # Must skip GNU tar: if it does not support --format= it doesn't create
1897      # ustar tarball either.
1898      (tar --version) >/dev/null 2>&1 && continue
1899      am__tar='tar chf - "$$tardir"'
1900      am__tar_='tar chf - "$tardir"'
1901      am__untar='tar xf -'
1902      ;;
1903    pax)
1904      am__tar='pax -L -x $1 -w "$$tardir"'
1905      am__tar_='pax -L -x $1 -w "$tardir"'
1906      am__untar='pax -r'
1907      ;;
1908    cpio)
1909      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1910      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1911      am__untar='cpio -i -H $1 -d'
1912      ;;
1913    none)
1914      am__tar=false
1915      am__tar_=false
1916      am__untar=false
1917      ;;
1918    esac
1919
1920    # If the value was cached, stop now.  We just wanted to have am__tar
1921    # and am__untar set.
1922    test -n "${am_cv_prog_tar_$1}" && break
1923
1924    # tar/untar a dummy directory, and stop if the command works.
1925    rm -rf conftest.dir
1926    mkdir conftest.dir
1927    echo GrepMe > conftest.dir/file
1928    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1929    rm -rf conftest.dir
1930    if test -s conftest.tar; then
1931      AM_RUN_LOG([$am__untar <conftest.tar])
1932      AM_RUN_LOG([cat conftest.dir/file])
1933      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1934    fi
1935  done
1936  rm -rf conftest.dir
1937
1938  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1939  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1940
1941AC_SUBST([am__tar])
1942AC_SUBST([am__untar])
1943]) # _AM_PROG_TAR
1944
1945m4_include([m4/gcov.m4])
1946m4_include([m4/gtk-doc.m4])
1947m4_include([m4/libtool.m4])
1948m4_include([m4/ltoptions.m4])
1949m4_include([m4/ltsugar.m4])
1950m4_include([m4/ltversion.m4])
1951m4_include([m4/lt~obsolete.m4])
1952