"Fossies" - the Fresh Open Source Software Archive

Member "mpfr-4.0.2/aclocal.m4" (31 Jan 2019, 66586 Bytes) of package /linux/misc/mpfr-4.0.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "aclocal.m4": 4.0.1_vs_4.0.2.

    1 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
    2 
    3 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
    4 
    5 # This file is free software; the Free Software Foundation
    6 # gives unlimited permission to copy and/or distribute it,
    7 # with or without modifications, as long as this notice is preserved.
    8 
    9 # This program is distributed in the hope that it will be useful,
   10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
   11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   12 # PARTICULAR PURPOSE.
   13 
   14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
   15 m4_ifndef([AC_AUTOCONF_VERSION],
   16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
   17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
   18 [m4_warning([this file was generated for autoconf 2.69.
   19 You have another version of autoconf.  It may work, but is not guaranteed to.
   20 If you have problems, you may need to regenerate the build system entirely.
   21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
   22 
   23 # ===========================================================================
   24 #        https://www.gnu.org/software/autoconf-archive/ax_pthread.html
   25 # ===========================================================================
   26 #
   27 # SYNOPSIS
   28 #
   29 #   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
   30 #
   31 # DESCRIPTION
   32 #
   33 #   This macro figures out how to build C programs using POSIX threads. It
   34 #   sets the PTHREAD_LIBS output variable to the threads library and linker
   35 #   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
   36 #   flags that are needed. (The user can also force certain compiler
   37 #   flags/libs to be tested by setting these environment variables.)
   38 #
   39 #   Also sets PTHREAD_CC to any special C compiler that is needed for
   40 #   multi-threaded programs (defaults to the value of CC otherwise). (This
   41 #   is necessary on AIX to use the special cc_r compiler alias.)
   42 #
   43 #   NOTE: You are assumed to not only compile your program with these flags,
   44 #   but also to link with them as well. For example, you might link with
   45 #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
   46 #
   47 #   If you are only building threaded programs, you may wish to use these
   48 #   variables in your default LIBS, CFLAGS, and CC:
   49 #
   50 #     LIBS="$PTHREAD_LIBS $LIBS"
   51 #     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
   52 #     CC="$PTHREAD_CC"
   53 #
   54 #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
   55 #   has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
   56 #   that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
   57 #
   58 #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
   59 #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
   60 #   PTHREAD_CFLAGS.
   61 #
   62 #   ACTION-IF-FOUND is a list of shell commands to run if a threads library
   63 #   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
   64 #   is not found. If ACTION-IF-FOUND is not specified, the default action
   65 #   will define HAVE_PTHREAD.
   66 #
   67 #   Please let the authors know if this macro fails on any platform, or if
   68 #   you have any other suggestions or comments. This macro was based on work
   69 #   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
   70 #   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
   71 #   Alejandro Forero Cuervo to the autoconf macro repository. We are also
   72 #   grateful for the helpful feedback of numerous users.
   73 #
   74 #   Updated for Autoconf 2.68 by Daniel Richard G.
   75 #
   76 # LICENSE
   77 #
   78 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
   79 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
   80 #
   81 #   This program is free software: you can redistribute it and/or modify it
   82 #   under the terms of the GNU General Public License as published by the
   83 #   Free Software Foundation, either version 3 of the License, or (at your
   84 #   option) any later version.
   85 #
   86 #   This program is distributed in the hope that it will be useful, but
   87 #   WITHOUT ANY WARRANTY; without even the implied warranty of
   88 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
   89 #   Public License for more details.
   90 #
   91 #   You should have received a copy of the GNU General Public License along
   92 #   with this program. If not, see <https://www.gnu.org/licenses/>.
   93 #
   94 #   As a special exception, the respective Autoconf Macro's copyright owner
   95 #   gives unlimited permission to copy, distribute and modify the configure
   96 #   scripts that are the output of Autoconf when processing the Macro. You
   97 #   need not follow the terms of the GNU General Public License when using
   98 #   or distributing such scripts, even though portions of the text of the
   99 #   Macro appear in them. The GNU General Public License (GPL) does govern
  100 #   all other use of the material that constitutes the Autoconf Macro.
  101 #
  102 #   This special exception to the GPL applies to versions of the Autoconf
  103 #   Macro released by the Autoconf Archive. When you make and distribute a
  104 #   modified version of the Autoconf Macro, you may extend this special
  105 #   exception to the GPL to apply to your modified version as well.
  106 
  107 #serial 24
  108 
  109 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
  110 AC_DEFUN([AX_PTHREAD], [
  111 AC_REQUIRE([AC_CANONICAL_HOST])
  112 AC_REQUIRE([AC_PROG_CC])
  113 AC_REQUIRE([AC_PROG_SED])
  114 AC_LANG_PUSH([C])
  115 ax_pthread_ok=no
  116 
  117 # We used to check for pthread.h first, but this fails if pthread.h
  118 # requires special compiler flags (e.g. on Tru64 or Sequent).
  119 # It gets checked for in the link test anyway.
  120 
  121 # First of all, check if the user has set any of the PTHREAD_LIBS,
  122 # etcetera environment variables, and if threads linking works using
  123 # them:
  124 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
  125         ax_pthread_save_CC="$CC"
  126         ax_pthread_save_CFLAGS="$CFLAGS"
  127         ax_pthread_save_LIBS="$LIBS"
  128         AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
  129         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  130         LIBS="$PTHREAD_LIBS $LIBS"
  131         AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
  132         AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
  133         AC_MSG_RESULT([$ax_pthread_ok])
  134         if test "x$ax_pthread_ok" = "xno"; then
  135                 PTHREAD_LIBS=""
  136                 PTHREAD_CFLAGS=""
  137         fi
  138         CC="$ax_pthread_save_CC"
  139         CFLAGS="$ax_pthread_save_CFLAGS"
  140         LIBS="$ax_pthread_save_LIBS"
  141 fi
  142 
  143 # We must check for the threads library under a number of different
  144 # names; the ordering is very important because some systems
  145 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
  146 # libraries is broken (non-POSIX).
  147 
  148 # Create a list of thread flags to try.  Items starting with a "-" are
  149 # C compiler flags, and other items are library names, except for "none"
  150 # which indicates that we try without any flags at all, and "pthread-config"
  151 # which is a program returning the flags for the Pth emulation library.
  152 
  153 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
  154 
  155 # The ordering *is* (sometimes) important.  Some notes on the
  156 # individual items follow:
  157 
  158 # pthreads: AIX (must check this before -lpthread)
  159 # none: in case threads are in libc; should be tried before -Kthread and
  160 #       other compiler flags to prevent continual compiler warnings
  161 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
  162 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
  163 #           (Note: HP C rejects this with "bad form for `-t' option")
  164 # -pthreads: Solaris/gcc (Note: HP C also rejects)
  165 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
  166 #      doesn't hurt to check since this sometimes defines pthreads and
  167 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
  168 #      is present but should not be used directly; and before -mthreads,
  169 #      because the compiler interprets this as "-mt" + "-hreads")
  170 # -mthreads: Mingw32/gcc, Lynx/gcc
  171 # pthread: Linux, etcetera
  172 # --thread-safe: KAI C++
  173 # pthread-config: use pthread-config program (for GNU Pth library)
  174 
  175 case $host_os in
  176 
  177         freebsd*)
  178 
  179         # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
  180         # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
  181 
  182         ax_pthread_flags="-kthread lthread $ax_pthread_flags"
  183         ;;
  184 
  185         hpux*)
  186 
  187         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
  188         # multi-threading and also sets -lpthread."
  189 
  190         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
  191         ;;
  192 
  193         openedition*)
  194 
  195         # IBM z/OS requires a feature-test macro to be defined in order to
  196         # enable POSIX threads at all, so give the user a hint if this is
  197         # not set. (We don't define these ourselves, as they can affect
  198         # other portions of the system API in unpredictable ways.)
  199 
  200         AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
  201             [
  202 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
  203              AX_PTHREAD_ZOS_MISSING
  204 #            endif
  205             ],
  206             [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
  207         ;;
  208 
  209         solaris*)
  210 
  211         # On Solaris (at least, for some versions), libc contains stubbed
  212         # (non-functional) versions of the pthreads routines, so link-based
  213         # tests will erroneously succeed. (N.B.: The stubs are missing
  214         # pthread_cleanup_push, or rather a function called by this macro,
  215         # so we could check for that, but who knows whether they'll stub
  216         # that too in a future libc.)  So we'll check first for the
  217         # standard Solaris way of linking pthreads (-mt -lpthread).
  218 
  219         ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
  220         ;;
  221 esac
  222 
  223 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
  224 
  225 AS_IF([test "x$GCC" = "xyes"],
  226       [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
  227 
  228 # The presence of a feature test macro requesting re-entrant function
  229 # definitions is, on some systems, a strong hint that pthreads support is
  230 # correctly enabled
  231 
  232 case $host_os in
  233         darwin* | hpux* | linux* | osf* | solaris*)
  234         ax_pthread_check_macro="_REENTRANT"
  235         ;;
  236 
  237         aix*)
  238         ax_pthread_check_macro="_THREAD_SAFE"
  239         ;;
  240 
  241         *)
  242         ax_pthread_check_macro="--"
  243         ;;
  244 esac
  245 AS_IF([test "x$ax_pthread_check_macro" = "x--"],
  246       [ax_pthread_check_cond=0],
  247       [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
  248 
  249 # Are we compiling with Clang?
  250 
  251 AC_CACHE_CHECK([whether $CC is Clang],
  252     [ax_cv_PTHREAD_CLANG],
  253     [ax_cv_PTHREAD_CLANG=no
  254      # Note that Autoconf sets GCC=yes for Clang as well as GCC
  255      if test "x$GCC" = "xyes"; then
  256         AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
  257             [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
  258 #            if defined(__clang__) && defined(__llvm__)
  259              AX_PTHREAD_CC_IS_CLANG
  260 #            endif
  261             ],
  262             [ax_cv_PTHREAD_CLANG=yes])
  263      fi
  264     ])
  265 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
  266 
  267 ax_pthread_clang_warning=no
  268 
  269 # Clang needs special handling, because older versions handle the -pthread
  270 # option in a rather... idiosyncratic way
  271 
  272 if test "x$ax_pthread_clang" = "xyes"; then
  273 
  274         # Clang takes -pthread; it has never supported any other flag
  275 
  276         # (Note 1: This will need to be revisited if a system that Clang
  277         # supports has POSIX threads in a separate library.  This tends not
  278         # to be the way of modern systems, but it's conceivable.)
  279 
  280         # (Note 2: On some systems, notably Darwin, -pthread is not needed
  281         # to get POSIX threads support; the API is always present and
  282         # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
  283         # -pthread does define _REENTRANT, and while the Darwin headers
  284         # ignore this macro, third-party headers might not.)
  285 
  286         PTHREAD_CFLAGS="-pthread"
  287         PTHREAD_LIBS=
  288 
  289         ax_pthread_ok=yes
  290 
  291         # However, older versions of Clang make a point of warning the user
  292         # that, in an invocation where only linking and no compilation is
  293         # taking place, the -pthread option has no effect ("argument unused
  294         # during compilation").  They expect -pthread to be passed in only
  295         # when source code is being compiled.
  296         #
  297         # Problem is, this is at odds with the way Automake and most other
  298         # C build frameworks function, which is that the same flags used in
  299         # compilation (CFLAGS) are also used in linking.  Many systems
  300         # supported by AX_PTHREAD require exactly this for POSIX threads
  301         # support, and in fact it is often not straightforward to specify a
  302         # flag that is used only in the compilation phase and not in
  303         # linking.  Such a scenario is extremely rare in practice.
  304         #
  305         # Even though use of the -pthread flag in linking would only print
  306         # a warning, this can be a nuisance for well-run software projects
  307         # that build with -Werror.  So if the active version of Clang has
  308         # this misfeature, we search for an option to squash it.
  309 
  310         AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
  311             [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
  312             [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
  313              # Create an alternate version of $ac_link that compiles and
  314              # links in two steps (.c -> .o, .o -> exe) instead of one
  315              # (.c -> exe), because the warning occurs only in the second
  316              # step
  317              ax_pthread_save_ac_link="$ac_link"
  318              ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
  319              ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
  320              ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
  321              ax_pthread_save_CFLAGS="$CFLAGS"
  322              for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
  323                 AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
  324                 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
  325                 ac_link="$ax_pthread_save_ac_link"
  326                 AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
  327                     [ac_link="$ax_pthread_2step_ac_link"
  328                      AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
  329                          [break])
  330                     ])
  331              done
  332              ac_link="$ax_pthread_save_ac_link"
  333              CFLAGS="$ax_pthread_save_CFLAGS"
  334              AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
  335              ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
  336             ])
  337 
  338         case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
  339                 no | unknown) ;;
  340                 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
  341         esac
  342 
  343 fi # $ax_pthread_clang = yes
  344 
  345 if test "x$ax_pthread_ok" = "xno"; then
  346 for ax_pthread_try_flag in $ax_pthread_flags; do
  347 
  348         case $ax_pthread_try_flag in
  349                 none)
  350                 AC_MSG_CHECKING([whether pthreads work without any flags])
  351                 ;;
  352 
  353                 -mt,pthread)
  354                 AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
  355                 PTHREAD_CFLAGS="-mt"
  356                 PTHREAD_LIBS="-lpthread"
  357                 ;;
  358 
  359                 -*)
  360                 AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
  361                 PTHREAD_CFLAGS="$ax_pthread_try_flag"
  362                 ;;
  363 
  364                 pthread-config)
  365                 AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
  366                 AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
  367                 PTHREAD_CFLAGS="`pthread-config --cflags`"
  368                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
  369                 ;;
  370 
  371                 *)
  372                 AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
  373                 PTHREAD_LIBS="-l$ax_pthread_try_flag"
  374                 ;;
  375         esac
  376 
  377         ax_pthread_save_CFLAGS="$CFLAGS"
  378         ax_pthread_save_LIBS="$LIBS"
  379         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  380         LIBS="$PTHREAD_LIBS $LIBS"
  381 
  382         # Check for various functions.  We must include pthread.h,
  383         # since some functions may be macros.  (On the Sequent, we
  384         # need a special flag -Kthread to make this header compile.)
  385         # We check for pthread_join because it is in -lpthread on IRIX
  386         # while pthread_create is in libc.  We check for pthread_attr_init
  387         # due to DEC craziness with -lpthreads.  We check for
  388         # pthread_cleanup_push because it is one of the few pthread
  389         # functions on Solaris that doesn't have a non-functional libc stub.
  390         # We try pthread_create on general principles.
  391 
  392         AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
  393 #                       if $ax_pthread_check_cond
  394 #                        error "$ax_pthread_check_macro must be defined"
  395 #                       endif
  396                         static void routine(void *a) { a = 0; }
  397                         static void *start_routine(void *a) { return a; }],
  398                        [pthread_t th; pthread_attr_t attr;
  399                         pthread_create(&th, 0, start_routine, 0);
  400                         pthread_join(th, 0);
  401                         pthread_attr_init(&attr);
  402                         pthread_cleanup_push(routine, 0);
  403                         pthread_cleanup_pop(0) /* ; */])],
  404             [ax_pthread_ok=yes],
  405             [])
  406 
  407         CFLAGS="$ax_pthread_save_CFLAGS"
  408         LIBS="$ax_pthread_save_LIBS"
  409 
  410         AC_MSG_RESULT([$ax_pthread_ok])
  411         AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
  412 
  413         PTHREAD_LIBS=""
  414         PTHREAD_CFLAGS=""
  415 done
  416 fi
  417 
  418 # Various other checks:
  419 if test "x$ax_pthread_ok" = "xyes"; then
  420         ax_pthread_save_CFLAGS="$CFLAGS"
  421         ax_pthread_save_LIBS="$LIBS"
  422         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  423         LIBS="$PTHREAD_LIBS $LIBS"
  424 
  425         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
  426         AC_CACHE_CHECK([for joinable pthread attribute],
  427             [ax_cv_PTHREAD_JOINABLE_ATTR],
  428             [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
  429              for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
  430                  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
  431                                                  [int attr = $ax_pthread_attr; return attr /* ; */])],
  432                                 [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
  433                                 [])
  434              done
  435             ])
  436         AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
  437                test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
  438                test "x$ax_pthread_joinable_attr_defined" != "xyes"],
  439               [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
  440                                   [$ax_cv_PTHREAD_JOINABLE_ATTR],
  441                                   [Define to necessary symbol if this constant
  442                                    uses a non-standard name on your system.])
  443                ax_pthread_joinable_attr_defined=yes
  444               ])
  445 
  446         AC_CACHE_CHECK([whether more special flags are required for pthreads],
  447             [ax_cv_PTHREAD_SPECIAL_FLAGS],
  448             [ax_cv_PTHREAD_SPECIAL_FLAGS=no
  449              case $host_os in
  450              solaris*)
  451              ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
  452              ;;
  453              esac
  454             ])
  455         AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
  456                test "x$ax_pthread_special_flags_added" != "xyes"],
  457               [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
  458                ax_pthread_special_flags_added=yes])
  459 
  460         AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
  461             [ax_cv_PTHREAD_PRIO_INHERIT],
  462             [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
  463                                              [[int i = PTHREAD_PRIO_INHERIT;
  464                                                return i;]])],
  465                             [ax_cv_PTHREAD_PRIO_INHERIT=yes],
  466                             [ax_cv_PTHREAD_PRIO_INHERIT=no])
  467             ])
  468         AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
  469                test "x$ax_pthread_prio_inherit_defined" != "xyes"],
  470               [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
  471                ax_pthread_prio_inherit_defined=yes
  472               ])
  473 
  474         CFLAGS="$ax_pthread_save_CFLAGS"
  475         LIBS="$ax_pthread_save_LIBS"
  476 
  477         # More AIX lossage: compile with *_r variant
  478         if test "x$GCC" != "xyes"; then
  479             case $host_os in
  480                 aix*)
  481                 AS_CASE(["x/$CC"],
  482                     [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
  483                     [#handle absolute path differently from PATH based program lookup
  484                      AS_CASE(["x$CC"],
  485                          [x/*],
  486                          [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
  487                          [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
  488                 ;;
  489             esac
  490         fi
  491 fi
  492 
  493 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
  494 
  495 AC_SUBST([PTHREAD_LIBS])
  496 AC_SUBST([PTHREAD_CFLAGS])
  497 AC_SUBST([PTHREAD_CC])
  498 
  499 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
  500 if test "x$ax_pthread_ok" = "xyes"; then
  501         ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
  502         :
  503 else
  504         ax_pthread_ok=no
  505         $2
  506 fi
  507 AC_LANG_POP
  508 ])dnl AX_PTHREAD
  509 
  510 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
  511 #
  512 # This file is free software; the Free Software Foundation
  513 # gives unlimited permission to copy and/or distribute it,
  514 # with or without modifications, as long as this notice is preserved.
  515 
  516 # AM_AUTOMAKE_VERSION(VERSION)
  517 # ----------------------------
  518 # Automake X.Y traces this macro to ensure aclocal.m4 has been
  519 # generated from the m4 files accompanying Automake X.Y.
  520 # (This private macro should not be called outside this file.)
  521 AC_DEFUN([AM_AUTOMAKE_VERSION],
  522 [am__api_version='1.16'
  523 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  524 dnl require some minimum version.  Point them to the right macro.
  525 m4_if([$1], [1.16.1], [],
  526       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  527 ])
  528 
  529 # _AM_AUTOCONF_VERSION(VERSION)
  530 # -----------------------------
  531 # aclocal traces this macro to find the Autoconf version.
  532 # This is a private macro too.  Using m4_define simplifies
  533 # the logic in aclocal, which can simply ignore this definition.
  534 m4_define([_AM_AUTOCONF_VERSION], [])
  535 
  536 # AM_SET_CURRENT_AUTOMAKE_VERSION
  537 # -------------------------------
  538 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  539 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  540 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  541 [AM_AUTOMAKE_VERSION([1.16.1])dnl
  542 m4_ifndef([AC_AUTOCONF_VERSION],
  543   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  544 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  545 
  546 # Copyright (C) 2011-2018 Free Software Foundation, Inc.
  547 #
  548 # This file is free software; the Free Software Foundation
  549 # gives unlimited permission to copy and/or distribute it,
  550 # with or without modifications, as long as this notice is preserved.
  551 
  552 # AM_PROG_AR([ACT-IF-FAIL])
  553 # -------------------------
  554 # Try to determine the archiver interface, and trigger the ar-lib wrapper
  555 # if it is needed.  If the detection of archiver interface fails, run
  556 # ACT-IF-FAIL (default is to abort configure with a proper error message).
  557 AC_DEFUN([AM_PROG_AR],
  558 [AC_BEFORE([$0], [LT_INIT])dnl
  559 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
  560 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  561 AC_REQUIRE_AUX_FILE([ar-lib])dnl
  562 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
  563 : ${AR=ar}
  564 
  565 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
  566   [AC_LANG_PUSH([C])
  567    am_cv_ar_interface=ar
  568    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
  569      [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
  570       AC_TRY_EVAL([am_ar_try])
  571       if test "$ac_status" -eq 0; then
  572         am_cv_ar_interface=ar
  573       else
  574         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
  575         AC_TRY_EVAL([am_ar_try])
  576         if test "$ac_status" -eq 0; then
  577           am_cv_ar_interface=lib
  578         else
  579           am_cv_ar_interface=unknown
  580         fi
  581       fi
  582       rm -f conftest.lib libconftest.a
  583      ])
  584    AC_LANG_POP([C])])
  585 
  586 case $am_cv_ar_interface in
  587 ar)
  588   ;;
  589 lib)
  590   # Microsoft lib, so override with the ar-lib wrapper script.
  591   # FIXME: It is wrong to rewrite AR.
  592   # But if we don't then we get into trouble of one sort or another.
  593   # A longer-term fix would be to have automake use am__AR in this case,
  594   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
  595   # similar.
  596   AR="$am_aux_dir/ar-lib $AR"
  597   ;;
  598 unknown)
  599   m4_default([$1],
  600              [AC_MSG_ERROR([could not determine $AR interface])])
  601   ;;
  602 esac
  603 AC_SUBST([AR])dnl
  604 ])
  605 
  606 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
  607 
  608 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
  609 #
  610 # This file is free software; the Free Software Foundation
  611 # gives unlimited permission to copy and/or distribute it,
  612 # with or without modifications, as long as this notice is preserved.
  613 
  614 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  615 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
  616 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  617 #
  618 # Of course, Automake must honor this variable whenever it calls a
  619 # tool from the auxiliary directory.  The problem is that $srcdir (and
  620 # therefore $ac_aux_dir as well) can be either absolute or relative,
  621 # depending on how configure is run.  This is pretty annoying, since
  622 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  623 # source directory, any form will work fine, but in subdirectories a
  624 # relative path needs to be adjusted first.
  625 #
  626 # $ac_aux_dir/missing
  627 #    fails when called from a subdirectory if $ac_aux_dir is relative
  628 # $top_srcdir/$ac_aux_dir/missing
  629 #    fails if $ac_aux_dir is absolute,
  630 #    fails when called from a subdirectory in a VPATH build with
  631 #          a relative $ac_aux_dir
  632 #
  633 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  634 # are both prefixed by $srcdir.  In an in-source build this is usually
  635 # harmless because $srcdir is '.', but things will broke when you
  636 # start a VPATH build or use an absolute $srcdir.
  637 #
  638 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  639 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
  640 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  641 # and then we would define $MISSING as
  642 #   MISSING="\${SHELL} $am_aux_dir/missing"
  643 # This will work as long as MISSING is not called from configure, because
  644 # unfortunately $(top_srcdir) has no meaning in configure.
  645 # However there are other variables, like CC, which are often used in
  646 # configure, and could therefore not use this "fixed" $ac_aux_dir.
  647 #
  648 # Another solution, used here, is to always expand $ac_aux_dir to an
  649 # absolute PATH.  The drawback is that using absolute paths prevent a
  650 # configured tree to be moved without reconfiguration.
  651 
  652 AC_DEFUN([AM_AUX_DIR_EXPAND],
  653 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  654 # Expand $ac_aux_dir to an absolute path.
  655 am_aux_dir=`cd "$ac_aux_dir" && pwd`
  656 ])
  657 
  658 # AM_CONDITIONAL                                            -*- Autoconf -*-
  659 
  660 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
  661 #
  662 # This file is free software; the Free Software Foundation
  663 # gives unlimited permission to copy and/or distribute it,
  664 # with or without modifications, as long as this notice is preserved.
  665 
  666 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  667 # -------------------------------------
  668 # Define a conditional.
  669 AC_DEFUN([AM_CONDITIONAL],
  670 [AC_PREREQ([2.52])dnl
  671  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
  672        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  673 AC_SUBST([$1_TRUE])dnl
  674 AC_SUBST([$1_FALSE])dnl
  675 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  676 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  677 m4_define([_AM_COND_VALUE_$1], [$2])dnl
  678 if $2; then
  679   $1_TRUE=
  680   $1_FALSE='#'
  681 else
  682   $1_TRUE='#'
  683   $1_FALSE=
  684 fi
  685 AC_CONFIG_COMMANDS_PRE(
  686 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  687   AC_MSG_ERROR([[conditional "$1" was never defined.
  688 Usually this means the macro was only invoked conditionally.]])
  689 fi])])
  690 
  691 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
  692 #
  693 # This file is free software; the Free Software Foundation
  694 # gives unlimited permission to copy and/or distribute it,
  695 # with or without modifications, as long as this notice is preserved.
  696 
  697 
  698 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  699 # written in clear, in which case automake, when reading aclocal.m4,
  700 # will think it sees a *use*, and therefore will trigger all it's
  701 # C support machinery.  Also note that it means that autoscan, seeing
  702 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  703 
  704 
  705 # _AM_DEPENDENCIES(NAME)
  706 # ----------------------
  707 # See how the compiler implements dependency checking.
  708 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  709 # We try a few techniques and use that to set a single cache variable.
  710 #
  711 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  712 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  713 # dependency, and given that the user is not expected to run this macro,
  714 # just rely on AC_PROG_CC.
  715 AC_DEFUN([_AM_DEPENDENCIES],
  716 [AC_REQUIRE([AM_SET_DEPDIR])dnl
  717 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  718 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  719 AC_REQUIRE([AM_DEP_TRACK])dnl
  720 
  721 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
  722       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
  723       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  724       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  725       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
  726       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
  727                     [depcc="$$1"   am_compiler_list=])
  728 
  729 AC_CACHE_CHECK([dependency style of $depcc],
  730                [am_cv_$1_dependencies_compiler_type],
  731 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  732   # We make a subdir and do the tests there.  Otherwise we can end up
  733   # making bogus files that we don't know about and never remove.  For
  734   # instance it was reported that on HP-UX the gcc test will end up
  735   # making a dummy file named 'D' -- because '-MD' means "put the output
  736   # in D".
  737   rm -rf conftest.dir
  738   mkdir conftest.dir
  739   # Copy depcomp to subdir because otherwise we won't find it if we're
  740   # using a relative directory.
  741   cp "$am_depcomp" conftest.dir
  742   cd conftest.dir
  743   # We will build objects and dependencies in a subdirectory because
  744   # it helps to detect inapplicable dependency modes.  For instance
  745   # both Tru64's cc and ICC support -MD to output dependencies as a
  746   # side effect of compilation, but ICC will put the dependencies in
  747   # the current directory while Tru64 will put them in the object
  748   # directory.
  749   mkdir sub
  750 
  751   am_cv_$1_dependencies_compiler_type=none
  752   if test "$am_compiler_list" = ""; then
  753      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  754   fi
  755   am__universal=false
  756   m4_case([$1], [CC],
  757     [case " $depcc " in #(
  758      *\ -arch\ *\ -arch\ *) am__universal=true ;;
  759      esac],
  760     [CXX],
  761     [case " $depcc " in #(
  762      *\ -arch\ *\ -arch\ *) am__universal=true ;;
  763      esac])
  764 
  765   for depmode in $am_compiler_list; do
  766     # Setup a source with many dependencies, because some compilers
  767     # like to wrap large dependency lists on column 80 (with \), and
  768     # we should not choose a depcomp mode which is confused by this.
  769     #
  770     # We need to recreate these files for each test, as the compiler may
  771     # overwrite some of them when testing with obscure command lines.
  772     # This happens at least with the AIX C compiler.
  773     : > sub/conftest.c
  774     for i in 1 2 3 4 5 6; do
  775       echo '#include "conftst'$i'.h"' >> sub/conftest.c
  776       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  777       # Solaris 10 /bin/sh.
  778       echo '/* dummy */' > sub/conftst$i.h
  779     done
  780     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  781 
  782     # We check with '-c' and '-o' for the sake of the "dashmstdout"
  783     # mode.  It turns out that the SunPro C++ compiler does not properly
  784     # handle '-M -o', and we need to detect this.  Also, some Intel
  785     # versions had trouble with output in subdirs.
  786     am__obj=sub/conftest.${OBJEXT-o}
  787     am__minus_obj="-o $am__obj"
  788     case $depmode in
  789     gcc)
  790       # This depmode causes a compiler race in universal mode.
  791       test "$am__universal" = false || continue
  792       ;;
  793     nosideeffect)
  794       # After this tag, mechanisms are not by side-effect, so they'll
  795       # only be used when explicitly requested.
  796       if test "x$enable_dependency_tracking" = xyes; then
  797 	continue
  798       else
  799 	break
  800       fi
  801       ;;
  802     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  803       # This compiler won't grok '-c -o', but also, the minuso test has
  804       # not run yet.  These depmodes are late enough in the game, and
  805       # so weak that their functioning should not be impacted.
  806       am__obj=conftest.${OBJEXT-o}
  807       am__minus_obj=
  808       ;;
  809     none) break ;;
  810     esac
  811     if depmode=$depmode \
  812        source=sub/conftest.c object=$am__obj \
  813        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  814        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  815          >/dev/null 2>conftest.err &&
  816        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  817        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  818        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  819        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  820       # icc doesn't choke on unknown options, it will just issue warnings
  821       # or remarks (even with -Werror).  So we grep stderr for any message
  822       # that says an option was ignored or not supported.
  823       # When given -MP, icc 7.0 and 7.1 complain thusly:
  824       #   icc: Command line warning: ignoring option '-M'; no argument required
  825       # The diagnosis changed in icc 8.0:
  826       #   icc: Command line remark: option '-MP' not supported
  827       if (grep 'ignoring option' conftest.err ||
  828           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  829         am_cv_$1_dependencies_compiler_type=$depmode
  830         break
  831       fi
  832     fi
  833   done
  834 
  835   cd ..
  836   rm -rf conftest.dir
  837 else
  838   am_cv_$1_dependencies_compiler_type=none
  839 fi
  840 ])
  841 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  842 AM_CONDITIONAL([am__fastdep$1], [
  843   test "x$enable_dependency_tracking" != xno \
  844   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  845 ])
  846 
  847 
  848 # AM_SET_DEPDIR
  849 # -------------
  850 # Choose a directory name for dependency files.
  851 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  852 AC_DEFUN([AM_SET_DEPDIR],
  853 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  854 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  855 ])
  856 
  857 
  858 # AM_DEP_TRACK
  859 # ------------
  860 AC_DEFUN([AM_DEP_TRACK],
  861 [AC_ARG_ENABLE([dependency-tracking], [dnl
  862 AS_HELP_STRING(
  863   [--enable-dependency-tracking],
  864   [do not reject slow dependency extractors])
  865 AS_HELP_STRING(
  866   [--disable-dependency-tracking],
  867   [speeds up one-time build])])
  868 if test "x$enable_dependency_tracking" != xno; then
  869   am_depcomp="$ac_aux_dir/depcomp"
  870   AMDEPBACKSLASH='\'
  871   am__nodep='_no'
  872 fi
  873 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  874 AC_SUBST([AMDEPBACKSLASH])dnl
  875 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  876 AC_SUBST([am__nodep])dnl
  877 _AM_SUBST_NOTMAKE([am__nodep])dnl
  878 ])
  879 
  880 # Generate code to set up dependency tracking.              -*- Autoconf -*-
  881 
  882 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
  883 #
  884 # This file is free software; the Free Software Foundation
  885 # gives unlimited permission to copy and/or distribute it,
  886 # with or without modifications, as long as this notice is preserved.
  887 
  888 # _AM_OUTPUT_DEPENDENCY_COMMANDS
  889 # ------------------------------
  890 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  891 [{
  892   # Older Autoconf quotes --file arguments for eval, but not when files
  893   # are listed without --file.  Let's play safe and only enable the eval
  894   # if we detect the quoting.
  895   # TODO: see whether this extra hack can be removed once we start
  896   # requiring Autoconf 2.70 or later.
  897   AS_CASE([$CONFIG_FILES],
  898           [*\'*], [eval set x "$CONFIG_FILES"],
  899           [*], [set x $CONFIG_FILES])
  900   shift
  901   # Used to flag and report bootstrapping failures.
  902   am_rc=0
  903   for am_mf
  904   do
  905     # Strip MF so we end up with the name of the file.
  906     am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
  907     # Check whether this is an Automake generated Makefile which includes
  908     # dependency-tracking related rules and includes.
  909     # Grep'ing the whole file directly is not great: AIX grep has a line
  910     # limit of 2048, but all sed's we know have understand at least 4000.
  911     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
  912       || continue
  913     am_dirpart=`AS_DIRNAME(["$am_mf"])`
  914     am_filepart=`AS_BASENAME(["$am_mf"])`
  915     AM_RUN_LOG([cd "$am_dirpart" \
  916       && sed -e '/# am--include-marker/d' "$am_filepart" \
  917         | $MAKE -f - am--depfiles]) || am_rc=$?
  918   done
  919   if test $am_rc -ne 0; then
  920     AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
  921     for automatic dependency tracking.  Try re-running configure with the
  922     '--disable-dependency-tracking' option to at least be able to build
  923     the package (albeit without support for automatic dependency tracking).])
  924   fi
  925   AS_UNSET([am_dirpart])
  926   AS_UNSET([am_filepart])
  927   AS_UNSET([am_mf])
  928   AS_UNSET([am_rc])
  929   rm -f conftest-deps.mk
  930 }
  931 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  932 
  933 
  934 # AM_OUTPUT_DEPENDENCY_COMMANDS
  935 # -----------------------------
  936 # This macro should only be invoked once -- use via AC_REQUIRE.
  937 #
  938 # This code is only required when automatic dependency tracking is enabled.
  939 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
  940 # order to bootstrap the dependency handling code.
  941 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  942 [AC_CONFIG_COMMANDS([depfiles],
  943      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  944      [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
  945 
  946 # Do all the work for Automake.                             -*- Autoconf -*-
  947 
  948 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
  949 #
  950 # This file is free software; the Free Software Foundation
  951 # gives unlimited permission to copy and/or distribute it,
  952 # with or without modifications, as long as this notice is preserved.
  953 
  954 # This macro actually does too much.  Some checks are only needed if
  955 # your package does certain things.  But this isn't really a big deal.
  956 
  957 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  958 m4_define([AC_PROG_CC],
  959 m4_defn([AC_PROG_CC])
  960 [_AM_PROG_CC_C_O
  961 ])
  962 
  963 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  964 # AM_INIT_AUTOMAKE([OPTIONS])
  965 # -----------------------------------------------
  966 # The call with PACKAGE and VERSION arguments is the old style
  967 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
  968 # and VERSION should now be passed to AC_INIT and removed from
  969 # the call to AM_INIT_AUTOMAKE.
  970 # We support both call styles for the transition.  After
  971 # the next Automake release, Autoconf can make the AC_INIT
  972 # arguments mandatory, and then we can depend on a new Autoconf
  973 # release and drop the old call support.
  974 AC_DEFUN([AM_INIT_AUTOMAKE],
  975 [AC_PREREQ([2.65])dnl
  976 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
  977 dnl the ones we care about.
  978 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  979 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  980 AC_REQUIRE([AC_PROG_INSTALL])dnl
  981 if test "`cd $srcdir && pwd`" != "`pwd`"; then
  982   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  983   # is not polluted with repeated "-I."
  984   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  985   # test to see if srcdir already configured
  986   if test -f $srcdir/config.status; then
  987     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  988   fi
  989 fi
  990 
  991 # test whether we have cygpath
  992 if test -z "$CYGPATH_W"; then
  993   if (cygpath --version) >/dev/null 2>/dev/null; then
  994     CYGPATH_W='cygpath -w'
  995   else
  996     CYGPATH_W=echo
  997   fi
  998 fi
  999 AC_SUBST([CYGPATH_W])
 1000 
 1001 # Define the identity of the package.
 1002 dnl Distinguish between old-style and new-style calls.
 1003 m4_ifval([$2],
 1004 [AC_DIAGNOSE([obsolete],
 1005              [$0: two- and three-arguments forms are deprecated.])
 1006 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 1007  AC_SUBST([PACKAGE], [$1])dnl
 1008  AC_SUBST([VERSION], [$2])],
 1009 [_AM_SET_OPTIONS([$1])dnl
 1010 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 1011 m4_if(
 1012   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
 1013   [ok:ok],,
 1014   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 1015  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 1016  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 1017 
 1018 _AM_IF_OPTION([no-define],,
 1019 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
 1020  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 1021 
 1022 # Some tools Automake needs.
 1023 AC_REQUIRE([AM_SANITY_CHECK])dnl
 1024 AC_REQUIRE([AC_ARG_PROGRAM])dnl
 1025 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
 1026 AM_MISSING_PROG([AUTOCONF], [autoconf])
 1027 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
 1028 AM_MISSING_PROG([AUTOHEADER], [autoheader])
 1029 AM_MISSING_PROG([MAKEINFO], [makeinfo])
 1030 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 1031 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 1032 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 1033 # For better backward compatibility.  To be removed once Automake 1.9.x
 1034 # dies out for good.  For more background, see:
 1035 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 1036 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 1037 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 1038 # We need awk for the "check" target (and possibly the TAP driver).  The
 1039 # system "awk" is bad on some platforms.
 1040 AC_REQUIRE([AC_PROG_AWK])dnl
 1041 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 1042 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 1043 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 1044 	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 1045 			     [_AM_PROG_TAR([v7])])])
 1046 _AM_IF_OPTION([no-dependencies],,
 1047 [AC_PROVIDE_IFELSE([AC_PROG_CC],
 1048 		  [_AM_DEPENDENCIES([CC])],
 1049 		  [m4_define([AC_PROG_CC],
 1050 			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 1051 AC_PROVIDE_IFELSE([AC_PROG_CXX],
 1052 		  [_AM_DEPENDENCIES([CXX])],
 1053 		  [m4_define([AC_PROG_CXX],
 1054 			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 1055 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 1056 		  [_AM_DEPENDENCIES([OBJC])],
 1057 		  [m4_define([AC_PROG_OBJC],
 1058 			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 1059 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 1060 		  [_AM_DEPENDENCIES([OBJCXX])],
 1061 		  [m4_define([AC_PROG_OBJCXX],
 1062 			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 1063 ])
 1064 AC_REQUIRE([AM_SILENT_RULES])dnl
 1065 dnl The testsuite driver may need to know about EXEEXT, so add the
 1066 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 1067 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 1068 AC_CONFIG_COMMANDS_PRE(dnl
 1069 [m4_provide_if([_AM_COMPILER_EXEEXT],
 1070   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 1071 
 1072 # POSIX will say in a future version that running "rm -f" with no argument
 1073 # is OK; and we want to be able to make that assumption in our Makefile
 1074 # recipes.  So use an aggressive probe to check that the usage we want is
 1075 # actually supported "in the wild" to an acceptable degree.
 1076 # See automake bug#10828.
 1077 # To make any issue more visible, cause the running configure to be aborted
 1078 # by default if the 'rm' program in use doesn't match our expectations; the
 1079 # user can still override this though.
 1080 if rm -f && rm -fr && rm -rf; then : OK; else
 1081   cat >&2 <<'END'
 1082 Oops!
 1083 
 1084 Your 'rm' program seems unable to run without file operands specified
 1085 on the command line, even when the '-f' option is present.  This is contrary
 1086 to the behaviour of most rm programs out there, and not conforming with
 1087 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 1088 
 1089 Please tell bug-automake@gnu.org about your system, including the value
 1090 of your $PATH and any error possibly output before this message.  This
 1091 can help us improve future automake versions.
 1092 
 1093 END
 1094   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
 1095     echo 'Configuration will proceed anyway, since you have set the' >&2
 1096     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
 1097     echo >&2
 1098   else
 1099     cat >&2 <<'END'
 1100 Aborting the configuration process, to ensure you take notice of the issue.
 1101 
 1102 You can download and install GNU coreutils to get an 'rm' implementation
 1103 that behaves properly: <https://www.gnu.org/software/coreutils/>.
 1104 
 1105 If you want to complete the configuration process using your problematic
 1106 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
 1107 to "yes", and re-run configure.
 1108 
 1109 END
 1110     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
 1111   fi
 1112 fi
 1113 dnl The trailing newline in this macro's definition is deliberate, for
 1114 dnl backward compatibility and to allow trailing 'dnl'-style comments
 1115 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 1116 ])
 1117 
 1118 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 1119 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 1120 dnl mangled by Autoconf and run in a shell conditional statement.
 1121 m4_define([_AC_COMPILER_EXEEXT],
 1122 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 1123 
 1124 # When config.status generates a header, we must update the stamp-h file.
 1125 # This file resides in the same directory as the config header
 1126 # that is generated.  The stamp files are numbered to have different names.
 1127 
 1128 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 1129 # loop where config.status creates the headers, so we can generate
 1130 # our stamp files there.
 1131 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 1132 [# Compute $1's index in $config_headers.
 1133 _am_arg=$1
 1134 _am_stamp_count=1
 1135 for _am_header in $config_headers :; do
 1136   case $_am_header in
 1137     $_am_arg | $_am_arg:* )
 1138       break ;;
 1139     * )
 1140       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 1141   esac
 1142 done
 1143 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 1144 
 1145 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 1146 #
 1147 # This file is free software; the Free Software Foundation
 1148 # gives unlimited permission to copy and/or distribute it,
 1149 # with or without modifications, as long as this notice is preserved.
 1150 
 1151 # AM_PROG_INSTALL_SH
 1152 # ------------------
 1153 # Define $install_sh.
 1154 AC_DEFUN([AM_PROG_INSTALL_SH],
 1155 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 1156 if test x"${install_sh+set}" != xset; then
 1157   case $am_aux_dir in
 1158   *\ * | *\	*)
 1159     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 1160   *)
 1161     install_sh="\${SHELL} $am_aux_dir/install-sh"
 1162   esac
 1163 fi
 1164 AC_SUBST([install_sh])])
 1165 
 1166 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
 1167 #
 1168 # This file is free software; the Free Software Foundation
 1169 # gives unlimited permission to copy and/or distribute it,
 1170 # with or without modifications, as long as this notice is preserved.
 1171 
 1172 # Check whether the underlying file-system supports filenames
 1173 # with a leading dot.  For instance MS-DOS doesn't.
 1174 AC_DEFUN([AM_SET_LEADING_DOT],
 1175 [rm -rf .tst 2>/dev/null
 1176 mkdir .tst 2>/dev/null
 1177 if test -d .tst; then
 1178   am__leading_dot=.
 1179 else
 1180   am__leading_dot=_
 1181 fi
 1182 rmdir .tst 2>/dev/null
 1183 AC_SUBST([am__leading_dot])])
 1184 
 1185 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 1186 # From Jim Meyering
 1187 
 1188 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 1189 #
 1190 # This file is free software; the Free Software Foundation
 1191 # gives unlimited permission to copy and/or distribute it,
 1192 # with or without modifications, as long as this notice is preserved.
 1193 
 1194 # AM_MAINTAINER_MODE([DEFAULT-MODE])
 1195 # ----------------------------------
 1196 # Control maintainer-specific portions of Makefiles.
 1197 # Default is to disable them, unless 'enable' is passed literally.
 1198 # For symmetry, 'disable' may be passed as well.  Anyway, the user
 1199 # can override the default with the --enable/--disable switch.
 1200 AC_DEFUN([AM_MAINTAINER_MODE],
 1201 [m4_case(m4_default([$1], [disable]),
 1202        [enable], [m4_define([am_maintainer_other], [disable])],
 1203        [disable], [m4_define([am_maintainer_other], [enable])],
 1204        [m4_define([am_maintainer_other], [enable])
 1205         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 1206 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 1207   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 1208   AC_ARG_ENABLE([maintainer-mode],
 1209     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
 1210       am_maintainer_other[ make rules and dependencies not useful
 1211       (and sometimes confusing) to the casual installer])],
 1212     [USE_MAINTAINER_MODE=$enableval],
 1213     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 1214   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 1215   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
 1216   MAINT=$MAINTAINER_MODE_TRUE
 1217   AC_SUBST([MAINT])dnl
 1218 ]
 1219 )
 1220 
 1221 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 1222 
 1223 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 1224 #
 1225 # This file is free software; the Free Software Foundation
 1226 # gives unlimited permission to copy and/or distribute it,
 1227 # with or without modifications, as long as this notice is preserved.
 1228 
 1229 # AM_MAKE_INCLUDE()
 1230 # -----------------
 1231 # Check whether make has an 'include' directive that can support all
 1232 # the idioms we need for our automatic dependency tracking code.
 1233 AC_DEFUN([AM_MAKE_INCLUDE],
 1234 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
 1235 cat > confinc.mk << 'END'
 1236 am__doit:
 1237 	@echo this is the am__doit target >confinc.out
 1238 .PHONY: am__doit
 1239 END
 1240 am__include="#"
 1241 am__quote=
 1242 # BSD make does it like this.
 1243 echo '.include "confinc.mk" # ignored' > confmf.BSD
 1244 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
 1245 echo 'include confinc.mk # ignored' > confmf.GNU
 1246 _am_result=no
 1247 for s in GNU BSD; do
 1248   AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
 1249   AS_CASE([$?:`cat confinc.out 2>/dev/null`],
 1250       ['0:this is the am__doit target'],
 1251       [AS_CASE([$s],
 1252           [BSD], [am__include='.include' am__quote='"'],
 1253           [am__include='include' am__quote=''])])
 1254   if test "$am__include" != "#"; then
 1255     _am_result="yes ($s style)"
 1256     break
 1257   fi
 1258 done
 1259 rm -f confinc.* confmf.*
 1260 AC_MSG_RESULT([${_am_result}])
 1261 AC_SUBST([am__include])])
 1262 AC_SUBST([am__quote])])
 1263 
 1264 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 1265 
 1266 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
 1267 #
 1268 # This file is free software; the Free Software Foundation
 1269 # gives unlimited permission to copy and/or distribute it,
 1270 # with or without modifications, as long as this notice is preserved.
 1271 
 1272 # AM_MISSING_PROG(NAME, PROGRAM)
 1273 # ------------------------------
 1274 AC_DEFUN([AM_MISSING_PROG],
 1275 [AC_REQUIRE([AM_MISSING_HAS_RUN])
 1276 $1=${$1-"${am_missing_run}$2"}
 1277 AC_SUBST($1)])
 1278 
 1279 # AM_MISSING_HAS_RUN
 1280 # ------------------
 1281 # Define MISSING if not defined so far and test if it is modern enough.
 1282 # If it is, set am_missing_run to use it, otherwise, to nothing.
 1283 AC_DEFUN([AM_MISSING_HAS_RUN],
 1284 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 1285 AC_REQUIRE_AUX_FILE([missing])dnl
 1286 if test x"${MISSING+set}" != xset; then
 1287   case $am_aux_dir in
 1288   *\ * | *\	*)
 1289     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 1290   *)
 1291     MISSING="\${SHELL} $am_aux_dir/missing" ;;
 1292   esac
 1293 fi
 1294 # Use eval to expand $SHELL
 1295 if eval "$MISSING --is-lightweight"; then
 1296   am_missing_run="$MISSING "
 1297 else
 1298   am_missing_run=
 1299   AC_MSG_WARN(['missing' script is too old or missing])
 1300 fi
 1301 ])
 1302 
 1303 # Helper functions for option handling.                     -*- Autoconf -*-
 1304 
 1305 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 1306 #
 1307 # This file is free software; the Free Software Foundation
 1308 # gives unlimited permission to copy and/or distribute it,
 1309 # with or without modifications, as long as this notice is preserved.
 1310 
 1311 # _AM_MANGLE_OPTION(NAME)
 1312 # -----------------------
 1313 AC_DEFUN([_AM_MANGLE_OPTION],
 1314 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 1315 
 1316 # _AM_SET_OPTION(NAME)
 1317 # --------------------
 1318 # Set option NAME.  Presently that only means defining a flag for this option.
 1319 AC_DEFUN([_AM_SET_OPTION],
 1320 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 1321 
 1322 # _AM_SET_OPTIONS(OPTIONS)
 1323 # ------------------------
 1324 # OPTIONS is a space-separated list of Automake options.
 1325 AC_DEFUN([_AM_SET_OPTIONS],
 1326 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 1327 
 1328 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 1329 # -------------------------------------------
 1330 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 1331 AC_DEFUN([_AM_IF_OPTION],
 1332 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 1333 
 1334 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 1335 #
 1336 # This file is free software; the Free Software Foundation
 1337 # gives unlimited permission to copy and/or distribute it,
 1338 # with or without modifications, as long as this notice is preserved.
 1339 
 1340 # _AM_PROG_CC_C_O
 1341 # ---------------
 1342 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
 1343 # to automatically call this.
 1344 AC_DEFUN([_AM_PROG_CC_C_O],
 1345 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 1346 AC_REQUIRE_AUX_FILE([compile])dnl
 1347 AC_LANG_PUSH([C])dnl
 1348 AC_CACHE_CHECK(
 1349   [whether $CC understands -c and -o together],
 1350   [am_cv_prog_cc_c_o],
 1351   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 1352   # Make sure it works both with $CC and with simple cc.
 1353   # Following AC_PROG_CC_C_O, we do the test twice because some
 1354   # compilers refuse to overwrite an existing .o file with -o,
 1355   # though they will create one.
 1356   am_cv_prog_cc_c_o=yes
 1357   for am_i in 1 2; do
 1358     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
 1359          && test -f conftest2.$ac_objext; then
 1360       : OK
 1361     else
 1362       am_cv_prog_cc_c_o=no
 1363       break
 1364     fi
 1365   done
 1366   rm -f core conftest*
 1367   unset am_i])
 1368 if test "$am_cv_prog_cc_c_o" != yes; then
 1369    # Losing compiler, so override with the script.
 1370    # FIXME: It is wrong to rewrite CC.
 1371    # But if we don't then we get into trouble of one sort or another.
 1372    # A longer-term fix would be to have automake use am__CC in this case,
 1373    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 1374    CC="$am_aux_dir/compile $CC"
 1375 fi
 1376 AC_LANG_POP([C])])
 1377 
 1378 # For backward compatibility.
 1379 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 1380 
 1381 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 1382 #
 1383 # This file is free software; the Free Software Foundation
 1384 # gives unlimited permission to copy and/or distribute it,
 1385 # with or without modifications, as long as this notice is preserved.
 1386 
 1387 # AM_RUN_LOG(COMMAND)
 1388 # -------------------
 1389 # Run COMMAND, save the exit status in ac_status, and log it.
 1390 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 1391 AC_DEFUN([AM_RUN_LOG],
 1392 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 1393    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 1394    ac_status=$?
 1395    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 1396    (exit $ac_status); }])
 1397 
 1398 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 1399 
 1400 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 1401 #
 1402 # This file is free software; the Free Software Foundation
 1403 # gives unlimited permission to copy and/or distribute it,
 1404 # with or without modifications, as long as this notice is preserved.
 1405 
 1406 # AM_SANITY_CHECK
 1407 # ---------------
 1408 AC_DEFUN([AM_SANITY_CHECK],
 1409 [AC_MSG_CHECKING([whether build environment is sane])
 1410 # Reject unsafe characters in $srcdir or the absolute working directory
 1411 # name.  Accept space and tab only in the latter.
 1412 am_lf='
 1413 '
 1414 case `pwd` in
 1415   *[[\\\"\#\$\&\'\`$am_lf]]*)
 1416     AC_MSG_ERROR([unsafe absolute working directory name]);;
 1417 esac
 1418 case $srcdir in
 1419   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
 1420     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 1421 esac
 1422 
 1423 # Do 'set' in a subshell so we don't clobber the current shell's
 1424 # arguments.  Must try -L first in case configure is actually a
 1425 # symlink; some systems play weird games with the mod time of symlinks
 1426 # (eg FreeBSD returns the mod time of the symlink's containing
 1427 # directory).
 1428 if (
 1429    am_has_slept=no
 1430    for am_try in 1 2; do
 1431      echo "timestamp, slept: $am_has_slept" > conftest.file
 1432      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 1433      if test "$[*]" = "X"; then
 1434 	# -L didn't work.
 1435 	set X `ls -t "$srcdir/configure" conftest.file`
 1436      fi
 1437      if test "$[*]" != "X $srcdir/configure conftest.file" \
 1438 	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
 1439 
 1440 	# If neither matched, then we have a broken ls.  This can happen
 1441 	# if, for instance, CONFIG_SHELL is bash and it inherits a
 1442 	# broken ls alias from the environment.  This has actually
 1443 	# happened.  Such a system could not be considered "sane".
 1444 	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 1445   alias in your environment])
 1446      fi
 1447      if test "$[2]" = conftest.file || test $am_try -eq 2; then
 1448        break
 1449      fi
 1450      # Just in case.
 1451      sleep 1
 1452      am_has_slept=yes
 1453    done
 1454    test "$[2]" = conftest.file
 1455    )
 1456 then
 1457    # Ok.
 1458    :
 1459 else
 1460    AC_MSG_ERROR([newly created file is older than distributed files!
 1461 Check your system clock])
 1462 fi
 1463 AC_MSG_RESULT([yes])
 1464 # If we didn't sleep, we still need to ensure time stamps of config.status and
 1465 # generated files are strictly newer.
 1466 am_sleep_pid=
 1467 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
 1468   ( sleep 1 ) &
 1469   am_sleep_pid=$!
 1470 fi
 1471 AC_CONFIG_COMMANDS_PRE(
 1472   [AC_MSG_CHECKING([that generated files are newer than configure])
 1473    if test -n "$am_sleep_pid"; then
 1474      # Hide warnings about reused PIDs.
 1475      wait $am_sleep_pid 2>/dev/null
 1476    fi
 1477    AC_MSG_RESULT([done])])
 1478 rm -f conftest.file
 1479 ])
 1480 
 1481 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
 1482 #
 1483 # This file is free software; the Free Software Foundation
 1484 # gives unlimited permission to copy and/or distribute it,
 1485 # with or without modifications, as long as this notice is preserved.
 1486 
 1487 # AM_SILENT_RULES([DEFAULT])
 1488 # --------------------------
 1489 # Enable less verbose build rules; with the default set to DEFAULT
 1490 # ("yes" being less verbose, "no" or empty being verbose).
 1491 AC_DEFUN([AM_SILENT_RULES],
 1492 [AC_ARG_ENABLE([silent-rules], [dnl
 1493 AS_HELP_STRING(
 1494   [--enable-silent-rules],
 1495   [less verbose build output (undo: "make V=1")])
 1496 AS_HELP_STRING(
 1497   [--disable-silent-rules],
 1498   [verbose build output (undo: "make V=0")])dnl
 1499 ])
 1500 case $enable_silent_rules in @%:@ (((
 1501   yes) AM_DEFAULT_VERBOSITY=0;;
 1502    no) AM_DEFAULT_VERBOSITY=1;;
 1503     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 1504 esac
 1505 dnl
 1506 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 1507 dnl do not support nested variable expansions.
 1508 dnl See automake bug#9928 and bug#10237.
 1509 am_make=${MAKE-make}
 1510 AC_CACHE_CHECK([whether $am_make supports nested variables],
 1511    [am_cv_make_support_nested_variables],
 1512    [if AS_ECHO([['TRUE=$(BAR$(V))
 1513 BAR0=false
 1514 BAR1=true
 1515 V=1
 1516 am__doit:
 1517 	@$(TRUE)
 1518 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 1519   am_cv_make_support_nested_variables=yes
 1520 else
 1521   am_cv_make_support_nested_variables=no
 1522 fi])
 1523 if test $am_cv_make_support_nested_variables = yes; then
 1524   dnl Using '$V' instead of '$(V)' breaks IRIX make.
 1525   AM_V='$(V)'
 1526   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 1527 else
 1528   AM_V=$AM_DEFAULT_VERBOSITY
 1529   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 1530 fi
 1531 AC_SUBST([AM_V])dnl
 1532 AM_SUBST_NOTMAKE([AM_V])dnl
 1533 AC_SUBST([AM_DEFAULT_V])dnl
 1534 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
 1535 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 1536 AM_BACKSLASH='\'
 1537 AC_SUBST([AM_BACKSLASH])dnl
 1538 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 1539 ])
 1540 
 1541 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 1542 #
 1543 # This file is free software; the Free Software Foundation
 1544 # gives unlimited permission to copy and/or distribute it,
 1545 # with or without modifications, as long as this notice is preserved.
 1546 
 1547 # AM_PROG_INSTALL_STRIP
 1548 # ---------------------
 1549 # One issue with vendor 'install' (even GNU) is that you can't
 1550 # specify the program used to strip binaries.  This is especially
 1551 # annoying in cross-compiling environments, where the build's strip
 1552 # is unlikely to handle the host's binaries.
 1553 # Fortunately install-sh will honor a STRIPPROG variable, so we
 1554 # always use install-sh in "make install-strip", and initialize
 1555 # STRIPPROG with the value of the STRIP variable (set by the user).
 1556 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 1557 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 1558 # Installed binaries are usually stripped using 'strip' when the user
 1559 # run "make install-strip".  However 'strip' might not be the right
 1560 # tool to use in cross-compilation environments, therefore Automake
 1561 # will honor the 'STRIP' environment variable to overrule this program.
 1562 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 1563 if test "$cross_compiling" != no; then
 1564   AC_CHECK_TOOL([STRIP], [strip], :)
 1565 fi
 1566 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 1567 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 1568 
 1569 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
 1570 #
 1571 # This file is free software; the Free Software Foundation
 1572 # gives unlimited permission to copy and/or distribute it,
 1573 # with or without modifications, as long as this notice is preserved.
 1574 
 1575 # _AM_SUBST_NOTMAKE(VARIABLE)
 1576 # ---------------------------
 1577 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 1578 # This macro is traced by Automake.
 1579 AC_DEFUN([_AM_SUBST_NOTMAKE])
 1580 
 1581 # AM_SUBST_NOTMAKE(VARIABLE)
 1582 # --------------------------
 1583 # Public sister of _AM_SUBST_NOTMAKE.
 1584 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 1585 
 1586 # Check how to create a tarball.                            -*- Autoconf -*-
 1587 
 1588 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
 1589 #
 1590 # This file is free software; the Free Software Foundation
 1591 # gives unlimited permission to copy and/or distribute it,
 1592 # with or without modifications, as long as this notice is preserved.
 1593 
 1594 # _AM_PROG_TAR(FORMAT)
 1595 # --------------------
 1596 # Check how to create a tarball in format FORMAT.
 1597 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
 1598 #
 1599 # Substitute a variable $(am__tar) that is a command
 1600 # writing to stdout a FORMAT-tarball containing the directory
 1601 # $tardir.
 1602 #     tardir=directory && $(am__tar) > result.tar
 1603 #
 1604 # Substitute a variable $(am__untar) that extract such
 1605 # a tarball read from stdin.
 1606 #     $(am__untar) < result.tar
 1607 #
 1608 AC_DEFUN([_AM_PROG_TAR],
 1609 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 1610 # in the wild :-(  We should find a proper way to deprecate it ...
 1611 AC_SUBST([AMTAR], ['$${TAR-tar}'])
 1612 
 1613 # We'll loop over all known methods to create a tar archive until one works.
 1614 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 1615 
 1616 m4_if([$1], [v7],
 1617   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 1618 
 1619   [m4_case([$1],
 1620     [ustar],
 1621      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
 1622       # There is notably a 21 bits limit for the UID and the GID.  In fact,
 1623       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
 1624       # and bug#13588).
 1625       am_max_uid=2097151 # 2^21 - 1
 1626       am_max_gid=$am_max_uid
 1627       # The $UID and $GID variables are not portable, so we need to resort
 1628       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
 1629       # below are definitely unexpected, so allow the users to see them
 1630       # (that is, avoid stderr redirection).
 1631       am_uid=`id -u || echo unknown`
 1632       am_gid=`id -g || echo unknown`
 1633       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
 1634       if test $am_uid -le $am_max_uid; then
 1635          AC_MSG_RESULT([yes])
 1636       else
 1637          AC_MSG_RESULT([no])
 1638          _am_tools=none
 1639       fi
 1640       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
 1641       if test $am_gid -le $am_max_gid; then
 1642          AC_MSG_RESULT([yes])
 1643       else
 1644         AC_MSG_RESULT([no])
 1645         _am_tools=none
 1646       fi],
 1647 
 1648   [pax],
 1649     [],
 1650 
 1651   [m4_fatal([Unknown tar format])])
 1652 
 1653   AC_MSG_CHECKING([how to create a $1 tar archive])
 1654 
 1655   # Go ahead even if we have the value already cached.  We do so because we
 1656   # need to set the values for the 'am__tar' and 'am__untar' variables.
 1657   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 1658 
 1659   for _am_tool in $_am_tools; do
 1660     case $_am_tool in
 1661     gnutar)
 1662       for _am_tar in tar gnutar gtar; do
 1663         AM_RUN_LOG([$_am_tar --version]) && break
 1664       done
 1665       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 1666       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 1667       am__untar="$_am_tar -xf -"
 1668       ;;
 1669     plaintar)
 1670       # Must skip GNU tar: if it does not support --format= it doesn't create
 1671       # ustar tarball either.
 1672       (tar --version) >/dev/null 2>&1 && continue
 1673       am__tar='tar chf - "$$tardir"'
 1674       am__tar_='tar chf - "$tardir"'
 1675       am__untar='tar xf -'
 1676       ;;
 1677     pax)
 1678       am__tar='pax -L -x $1 -w "$$tardir"'
 1679       am__tar_='pax -L -x $1 -w "$tardir"'
 1680       am__untar='pax -r'
 1681       ;;
 1682     cpio)
 1683       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 1684       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 1685       am__untar='cpio -i -H $1 -d'
 1686       ;;
 1687     none)
 1688       am__tar=false
 1689       am__tar_=false
 1690       am__untar=false
 1691       ;;
 1692     esac
 1693 
 1694     # If the value was cached, stop now.  We just wanted to have am__tar
 1695     # and am__untar set.
 1696     test -n "${am_cv_prog_tar_$1}" && break
 1697 
 1698     # tar/untar a dummy directory, and stop if the command works.
 1699     rm -rf conftest.dir
 1700     mkdir conftest.dir
 1701     echo GrepMe > conftest.dir/file
 1702     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 1703     rm -rf conftest.dir
 1704     if test -s conftest.tar; then
 1705       AM_RUN_LOG([$am__untar <conftest.tar])
 1706       AM_RUN_LOG([cat conftest.dir/file])
 1707       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 1708     fi
 1709   done
 1710   rm -rf conftest.dir
 1711 
 1712   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 1713   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 1714 
 1715 AC_SUBST([am__tar])
 1716 AC_SUBST([am__untar])
 1717 ]) # _AM_PROG_TAR
 1718 
 1719 m4_include([m4/libtool.m4])
 1720 m4_include([m4/ltoptions.m4])
 1721 m4_include([m4/ltsugar.m4])
 1722 m4_include([m4/ltversion.m4])
 1723 m4_include([m4/lt~obsolete.m4])
 1724 m4_include([acinclude.m4])