"Fossies" - the Fresh Open Source Software Archive

Member "xbindkeys-1.8.7/aclocal.m4" (23 May 2020, 113857 Bytes) of package /linux/privat/xbindkeys-1.8.7.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.

    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 # serial 10
   25 
   26 
   27 
   28 
   29 # GUILE_PKG -- find Guile development files
   30 #
   31 # Usage: GUILE_PKG([VERSIONS])
   32 #
   33 # This macro runs the @code{pkg-config} tool to find development files
   34 # for an available version of Guile.
   35 #
   36 # By default, this macro will search for the latest stable version of
   37 # Guile (e.g. 2.2), falling back to the previous stable version
   38 # (e.g. 2.0) if it is available.  If no guile-@var{VERSION}.pc file is
   39 # found, an error is signalled.  The found version is stored in
   40 # @var{GUILE_EFFECTIVE_VERSION}.
   41 #
   42 # If @code{GUILE_PROGS} was already invoked, this macro ensures that the
   43 # development files have the same effective version as the Guile
   44 # program.
   45 #
   46 # @var{GUILE_EFFECTIVE_VERSION} is marked for substitution, as by
   47 # @code{AC_SUBST}.
   48 #
   49 AC_DEFUN([GUILE_PKG],
   50  [PKG_PROG_PKG_CONFIG
   51   _guile_versions_to_search="m4_default([$1], [2.2 2.0 1.8])"
   52   if test -n "$GUILE_EFFECTIVE_VERSION"; then
   53     _guile_tmp=""
   54     for v in $_guile_versions_to_search; do
   55       if test "$v" = "$GUILE_EFFECTIVE_VERSION"; then
   56         _guile_tmp=$v
   57       fi
   58     done
   59     if test -z "$_guile_tmp"; then
   60       AC_MSG_FAILURE([searching for guile development files for versions $_guile_versions_to_search, but previously found $GUILE version $GUILE_EFFECTIVE_VERSION])
   61     fi
   62     _guile_versions_to_search=$GUILE_EFFECTIVE_VERSION
   63   fi
   64   GUILE_EFFECTIVE_VERSION=""
   65   _guile_errors=""
   66   for v in $_guile_versions_to_search; do
   67     if test -z "$GUILE_EFFECTIVE_VERSION"; then
   68       AC_MSG_NOTICE([checking for guile $v])
   69       PKG_CHECK_EXISTS([guile-$v], [GUILE_EFFECTIVE_VERSION=$v], [])
   70     fi
   71   done
   72 
   73   if test -z "$GUILE_EFFECTIVE_VERSION"; then
   74     AC_MSG_ERROR([
   75 No Guile development packages were found.
   76 
   77 Please verify that you have Guile installed.  If you installed Guile
   78 from a binary distribution, please verify that you have also installed
   79 the development packages.  If you installed it yourself, you might need
   80 to adjust your PKG_CONFIG_PATH; see the pkg-config man page for more.
   81 ])
   82   fi
   83   AC_MSG_NOTICE([found guile $GUILE_EFFECTIVE_VERSION])
   84   AC_SUBST([GUILE_EFFECTIVE_VERSION])
   85  ])
   86 
   87 # GUILE_FLAGS -- set flags for compiling and linking with Guile
   88 #
   89 # Usage: GUILE_FLAGS
   90 #
   91 # This macro runs the @code{pkg-config} tool to find out how to compile
   92 # and link programs against Guile.  It sets four variables:
   93 # @var{GUILE_CFLAGS}, @var{GUILE_LDFLAGS}, @var{GUILE_LIBS}, and
   94 # @var{GUILE_LTLIBS}.
   95 #
   96 # @var{GUILE_CFLAGS}: flags to pass to a C or C++ compiler to build code that
   97 # uses Guile header files.  This is almost always just one or more @code{-I}
   98 # flags.
   99 #
  100 # @var{GUILE_LDFLAGS}: flags to pass to the compiler to link a program
  101 # against Guile.  This includes @code{-lguile-@var{VERSION}} for the
  102 # Guile library itself, and may also include one or more @code{-L} flag
  103 # to tell the compiler where to find the libraries.  But it does not
  104 # include flags that influence the program's runtime search path for
  105 # libraries, and will therefore lead to a program that fails to start,
  106 # unless all necessary libraries are installed in a standard location
  107 # such as @file{/usr/lib}.
  108 #
  109 # @var{GUILE_LIBS} and @var{GUILE_LTLIBS}: flags to pass to the compiler or to
  110 # libtool, respectively, to link a program against Guile.  It includes flags
  111 # that augment the program's runtime search path for libraries, so that shared
  112 # libraries will be found at the location where they were during linking, even
  113 # in non-standard locations.  @var{GUILE_LIBS} is to be used when linking the
  114 # program directly with the compiler, whereas @var{GUILE_LTLIBS} is to be used
  115 # when linking the program is done through libtool.
  116 #
  117 # The variables are marked for substitution, as by @code{AC_SUBST}.
  118 #
  119 AC_DEFUN([GUILE_FLAGS],
  120  [AC_REQUIRE([GUILE_PKG])
  121   PKG_CHECK_MODULES(GUILE, [guile-$GUILE_EFFECTIVE_VERSION])
  122 
  123   dnl GUILE_CFLAGS and GUILE_LIBS are already defined and AC_SUBST'd by
  124   dnl PKG_CHECK_MODULES.  But GUILE_LIBS to pkg-config is GUILE_LDFLAGS
  125   dnl to us.
  126 
  127   GUILE_LDFLAGS=$GUILE_LIBS
  128 
  129   dnl Determine the platform dependent parameters needed to use rpath.
  130   dnl AC_LIB_LINKFLAGS_FROM_LIBS is defined in gnulib/m4/lib-link.m4 and needs
  131   dnl the file gnulib/build-aux/config.rpath.
  132   AC_LIB_LINKFLAGS_FROM_LIBS([GUILE_LIBS], [$GUILE_LDFLAGS], [])
  133   GUILE_LIBS="$GUILE_LDFLAGS $GUILE_LIBS"
  134   AC_LIB_LINKFLAGS_FROM_LIBS([GUILE_LTLIBS], [$GUILE_LDFLAGS], [yes])
  135   GUILE_LTLIBS="$GUILE_LDFLAGS $GUILE_LTLIBS"
  136 
  137   AC_SUBST([GUILE_EFFECTIVE_VERSION])
  138   AC_SUBST([GUILE_CFLAGS])
  139   AC_SUBST([GUILE_LDFLAGS])
  140   AC_SUBST([GUILE_LIBS])
  141   AC_SUBST([GUILE_LTLIBS])
  142  ])
  143 
  144 # GUILE_SITE_DIR -- find path to Guile site directories
  145 #
  146 # Usage: GUILE_SITE_DIR
  147 #
  148 # This looks for Guile's "site" directories.  The variable @var{GUILE_SITE} will
  149 # be set to Guile's "site" directory for Scheme source files (usually something
  150 # like PREFIX/share/guile/site).  @var{GUILE_SITE_CCACHE} will be set to the
  151 # directory for compiled Scheme files also known as @code{.go} files
  152 # (usually something like
  153 # PREFIX/lib/guile/@var{GUILE_EFFECTIVE_VERSION}/site-ccache).
  154 # @var{GUILE_EXTENSION} will be set to the directory for compiled C extensions
  155 # (usually something like
  156 # PREFIX/lib/guile/@var{GUILE_EFFECTIVE_VERSION}/extensions). The latter two
  157 # are set to blank if the particular version of Guile does not support
  158 # them.  Note that this macro will run the macros @code{GUILE_PKG} and
  159 # @code{GUILE_PROGS} if they have not already been run.
  160 #
  161 # The variables are marked for substitution, as by @code{AC_SUBST}.
  162 #
  163 AC_DEFUN([GUILE_SITE_DIR],
  164  [AC_REQUIRE([GUILE_PKG])
  165   AC_REQUIRE([GUILE_PROGS])
  166   AC_MSG_CHECKING(for Guile site directory)
  167   GUILE_SITE=`$PKG_CONFIG --print-errors --variable=sitedir guile-$GUILE_EFFECTIVE_VERSION`
  168   AC_MSG_RESULT($GUILE_SITE)
  169   if test "$GUILE_SITE" = ""; then
  170      AC_MSG_FAILURE(sitedir not found)
  171   fi
  172   AC_SUBST(GUILE_SITE)
  173   AC_MSG_CHECKING([for Guile site-ccache directory using pkgconfig])
  174   GUILE_SITE_CCACHE=`$PKG_CONFIG --variable=siteccachedir guile-$GUILE_EFFECTIVE_VERSION`
  175   if test "$GUILE_SITE_CCACHE" = ""; then
  176     AC_MSG_RESULT(no)
  177     AC_MSG_CHECKING([for Guile site-ccache directory using interpreter])
  178     GUILE_SITE_CCACHE=`$GUILE -c "(display (if (defined? '%site-ccache-dir) (%site-ccache-dir) \"\"))"`
  179     if test $? != "0" -o "$GUILE_SITE_CCACHE" = ""; then
  180       AC_MSG_RESULT(no)
  181       GUILE_SITE_CCACHE=""
  182       AC_MSG_WARN([siteccachedir not found])
  183     fi
  184   fi
  185   AC_MSG_RESULT($GUILE_SITE_CCACHE)
  186   AC_SUBST([GUILE_SITE_CCACHE])
  187   AC_MSG_CHECKING(for Guile extensions directory)
  188   GUILE_EXTENSION=`$PKG_CONFIG --print-errors --variable=extensiondir guile-$GUILE_EFFECTIVE_VERSION`
  189   AC_MSG_RESULT($GUILE_EXTENSION)
  190   if test "$GUILE_EXTENSION" = ""; then
  191     GUILE_EXTENSION=""
  192     AC_MSG_WARN(extensiondir not found)
  193   fi
  194   AC_SUBST(GUILE_EXTENSION)
  195  ])
  196 
  197 # GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
  198 #
  199 # Usage: GUILE_PROGS([VERSION])
  200 #
  201 # This macro looks for programs @code{guile} and @code{guild}, setting
  202 # variables @var{GUILE} and @var{GUILD} to their paths, respectively.
  203 # The macro will attempt to find @code{guile} with the suffix of
  204 # @code{-X.Y}, followed by looking for it with the suffix @code{X.Y}, and
  205 # then fall back to looking for @code{guile} with no suffix. If
  206 # @code{guile} is still not found, signal an error. The suffix, if any,
  207 # that was required to find @code{guile} will be used for @code{guild}
  208 # as well.
  209 #
  210 # By default, this macro will search for the latest stable version of
  211 # Guile (e.g. 2.2). x.y or x.y.z versions can be specified. If an older
  212 # version is found, the macro will signal an error.
  213 #
  214 # The effective version of the found @code{guile} is set to
  215 # @var{GUILE_EFFECTIVE_VERSION}.  This macro ensures that the effective
  216 # version is compatible with the result of a previous invocation of
  217 # @code{GUILE_FLAGS}, if any.
  218 #
  219 # As a legacy interface, it also looks for @code{guile-config} and
  220 # @code{guile-tools}, setting @var{GUILE_CONFIG} and @var{GUILE_TOOLS}.
  221 #
  222 # The variables are marked for substitution, as by @code{AC_SUBST}.
  223 #
  224 AC_DEFUN([GUILE_PROGS],
  225  [_guile_required_version="m4_default([$1], [$GUILE_EFFECTIVE_VERSION])"
  226   if test -z "$_guile_required_version"; then
  227     _guile_required_version=2.2
  228   fi
  229 
  230   _guile_candidates=guile
  231   _tmp=
  232   for v in `echo "$_guile_required_version" | tr . ' '`; do
  233     if test -n "$_tmp"; then _tmp=$_tmp.; fi
  234     _tmp=$_tmp$v
  235     _guile_candidates="guile-$_tmp guile$_tmp $_guile_candidates"
  236   done
  237 
  238   AC_PATH_PROGS(GUILE,[$_guile_candidates])
  239   if test -z "$GUILE"; then
  240       AC_MSG_ERROR([guile required but not found])
  241   fi
  242 
  243   _guile_suffix=`echo "$GUILE" | sed -e 's,^.*/guile\(.*\)$,\1,'`
  244   _guile_effective_version=`$GUILE -c "(display (effective-version))"`
  245   if test -z "$GUILE_EFFECTIVE_VERSION"; then
  246     GUILE_EFFECTIVE_VERSION=$_guile_effective_version
  247   elif test "$GUILE_EFFECTIVE_VERSION" != "$_guile_effective_version"; then
  248     AC_MSG_ERROR([found development files for Guile $GUILE_EFFECTIVE_VERSION, but $GUILE has effective version $_guile_effective_version])
  249   fi
  250 
  251   _guile_major_version=`$GUILE -c "(display (major-version))"`
  252   _guile_minor_version=`$GUILE -c "(display (minor-version))"`
  253   _guile_micro_version=`$GUILE -c "(display (micro-version))"`
  254   _guile_prog_version="$_guile_major_version.$_guile_minor_version.$_guile_micro_version"
  255 
  256   AC_MSG_CHECKING([for Guile version >= $_guile_required_version])
  257   _major_version=`echo $_guile_required_version | cut -d . -f 1`
  258   _minor_version=`echo $_guile_required_version | cut -d . -f 2`
  259   _micro_version=`echo $_guile_required_version | cut -d . -f 3`
  260   if test "$_guile_major_version" -gt "$_major_version"; then
  261     true
  262   elif test "$_guile_major_version" -eq "$_major_version"; then
  263     if test "$_guile_minor_version" -gt "$_minor_version"; then
  264       true
  265     elif test "$_guile_minor_version" -eq "$_minor_version"; then
  266       if test -n "$_micro_version"; then
  267         if test "$_guile_micro_version" -lt "$_micro_version"; then
  268           AC_MSG_ERROR([Guile $_guile_required_version required, but $_guile_prog_version found])
  269         fi
  270       fi
  271     elif test "$GUILE_EFFECTIVE_VERSION" = "$_major_version.$_minor_version" -a -z "$_micro_version"; then
  272       # Allow prereleases that have the right effective version.
  273       true
  274     else
  275       as_fn_error $? "Guile $_guile_required_version required, but $_guile_prog_version found" "$LINENO" 5
  276     fi
  277   elif test "$GUILE_EFFECTIVE_VERSION" = "$_major_version.$_minor_version" -a -z "$_micro_version"; then
  278     # Allow prereleases that have the right effective version.
  279     true
  280   else
  281     AC_MSG_ERROR([Guile $_guile_required_version required, but $_guile_prog_version found])
  282   fi
  283   AC_MSG_RESULT([$_guile_prog_version])
  284 
  285   AC_PATH_PROG(GUILD,[guild$_guile_suffix])
  286   AC_SUBST(GUILD)
  287 
  288   AC_PATH_PROG(GUILE_CONFIG,[guile-config$_guile_suffix])
  289   AC_SUBST(GUILE_CONFIG)
  290   if test -n "$GUILD"; then
  291     GUILE_TOOLS=$GUILD
  292   else
  293     AC_PATH_PROG(GUILE_TOOLS,[guile-tools$_guile_suffix])
  294   fi
  295   AC_SUBST(GUILE_TOOLS)
  296  ])
  297 
  298 # GUILE_CHECK -- evaluate Guile Scheme code and capture the return value
  299 #
  300 # Usage: GUILE_CHECK_RETVAL(var,check)
  301 #
  302 # @var{var} is a shell variable name to be set to the return value.
  303 # @var{check} is a Guile Scheme expression, evaluated with "$GUILE -c", and
  304 #    returning either 0 or non-#f to indicate the check passed.
  305 #    Non-0 number or #f indicates failure.
  306 #    Avoid using the character "#" since that confuses autoconf.
  307 #
  308 AC_DEFUN([GUILE_CHECK],
  309  [AC_REQUIRE([GUILE_PROGS])
  310   $GUILE -c "$2" > /dev/null 2>&1
  311   $1=$?
  312  ])
  313 
  314 # GUILE_MODULE_CHECK -- check feature of a Guile Scheme module
  315 #
  316 # Usage: GUILE_MODULE_CHECK(var,module,featuretest,description)
  317 #
  318 # @var{var} is a shell variable name to be set to "yes" or "no".
  319 # @var{module} is a list of symbols, like: (ice-9 common-list).
  320 # @var{featuretest} is an expression acceptable to GUILE_CHECK, q.v.
  321 # @var{description} is a present-tense verb phrase (passed to AC_MSG_CHECKING).
  322 #
  323 AC_DEFUN([GUILE_MODULE_CHECK],
  324          [AC_MSG_CHECKING([if $2 $4])
  325 	  GUILE_CHECK($1,(use-modules $2) (exit ((lambda () $3))))
  326 	  if test "$$1" = "0" ; then $1=yes ; else $1=no ; fi
  327           AC_MSG_RESULT($$1)
  328          ])
  329 
  330 # GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module
  331 #
  332 # Usage: GUILE_MODULE_AVAILABLE(var,module)
  333 #
  334 # @var{var} is a shell variable name to be set to "yes" or "no".
  335 # @var{module} is a list of symbols, like: (ice-9 common-list).
  336 #
  337 AC_DEFUN([GUILE_MODULE_AVAILABLE],
  338          [GUILE_MODULE_CHECK($1,$2,0,is available)
  339          ])
  340 
  341 # GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable
  342 #
  343 # Usage: GUILE_MODULE_REQUIRED(symlist)
  344 #
  345 # @var{symlist} is a list of symbols, WITHOUT surrounding parens,
  346 # like: ice-9 common-list.
  347 #
  348 AC_DEFUN([GUILE_MODULE_REQUIRED],
  349          [GUILE_MODULE_AVAILABLE(ac_guile_module_required, ($1))
  350           if test "$ac_guile_module_required" = "no" ; then
  351               AC_MSG_ERROR([required guile module not found: ($1)])
  352           fi
  353          ])
  354 
  355 # GUILE_MODULE_EXPORTS -- check if a module exports a variable
  356 #
  357 # Usage: GUILE_MODULE_EXPORTS(var,module,modvar)
  358 #
  359 # @var{var} is a shell variable to be set to "yes" or "no".
  360 # @var{module} is a list of symbols, like: (ice-9 common-list).
  361 # @var{modvar} is the Guile Scheme variable to check.
  362 #
  363 AC_DEFUN([GUILE_MODULE_EXPORTS],
  364  [GUILE_MODULE_CHECK($1,$2,$3,exports `$3')
  365  ])
  366 
  367 # GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable
  368 #
  369 # Usage: GUILE_MODULE_REQUIRED_EXPORT(module,modvar)
  370 #
  371 # @var{module} is a list of symbols, like: (ice-9 common-list).
  372 # @var{modvar} is the Guile Scheme variable to check.
  373 #
  374 AC_DEFUN([GUILE_MODULE_REQUIRED_EXPORT],
  375  [GUILE_MODULE_EXPORTS(guile_module_required_export,$1,$2)
  376   if test "$guile_module_required_export" = "no" ; then
  377       AC_MSG_ERROR([module $1 does not export $2; required])
  378   fi
  379  ])
  380 
  381 
  382 # lib-ld.m4 serial 6
  383 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
  384 dnl This file is free software; the Free Software Foundation
  385 dnl gives unlimited permission to copy and/or distribute it,
  386 dnl with or without modifications, as long as this notice is preserved.
  387 
  388 dnl Subroutines of libtool.m4,
  389 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
  390 dnl collision with libtool.m4.
  391 
  392 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
  393 AC_DEFUN([AC_LIB_PROG_LD_GNU],
  394 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
  395 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  396 case `$LD -v 2>&1 </dev/null` in
  397 *GNU* | *'with BFD'*)
  398   acl_cv_prog_gnu_ld=yes
  399   ;;
  400 *)
  401   acl_cv_prog_gnu_ld=no
  402   ;;
  403 esac])
  404 with_gnu_ld=$acl_cv_prog_gnu_ld
  405 ])
  406 
  407 dnl From libtool-2.4. Sets the variable LD.
  408 AC_DEFUN([AC_LIB_PROG_LD],
  409 [AC_REQUIRE([AC_PROG_CC])dnl
  410 AC_REQUIRE([AC_CANONICAL_HOST])dnl
  411 
  412 AC_ARG_WITH([gnu-ld],
  413     [AS_HELP_STRING([--with-gnu-ld],
  414         [assume the C compiler uses GNU ld [default=no]])],
  415     [test "$withval" = no || with_gnu_ld=yes],
  416     [with_gnu_ld=no])dnl
  417 
  418 # Prepare PATH_SEPARATOR.
  419 # The user is always right.
  420 if test "${PATH_SEPARATOR+set}" != set; then
  421   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
  422   # contains only /bin. Note that ksh looks also at the FPATH variable,
  423   # so we have to set that as well for the test.
  424   PATH_SEPARATOR=:
  425   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  426     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  427            || PATH_SEPARATOR=';'
  428        }
  429 fi
  430 
  431 ac_prog=ld
  432 if test "$GCC" = yes; then
  433   # Check if gcc -print-prog-name=ld gives a path.
  434   AC_MSG_CHECKING([for ld used by $CC])
  435   case $host in
  436   *-*-mingw*)
  437     # gcc leaves a trailing carriage return which upsets mingw
  438     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  439   *)
  440     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  441   esac
  442   case $ac_prog in
  443     # Accept absolute paths.
  444     [[\\/]]* | ?:[[\\/]]*)
  445       re_direlt='/[[^/]][[^/]]*/\.\./'
  446       # Canonicalize the pathname of ld
  447       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
  448       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
  449         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  450       done
  451       test -z "$LD" && LD="$ac_prog"
  452       ;;
  453   "")
  454     # If it fails, then pretend we aren't using GCC.
  455     ac_prog=ld
  456     ;;
  457   *)
  458     # If it is relative, then search for the first ld in PATH.
  459     with_gnu_ld=unknown
  460     ;;
  461   esac
  462 elif test "$with_gnu_ld" = yes; then
  463   AC_MSG_CHECKING([for GNU ld])
  464 else
  465   AC_MSG_CHECKING([for non-GNU ld])
  466 fi
  467 AC_CACHE_VAL([acl_cv_path_LD],
  468 [if test -z "$LD"; then
  469   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  470   for ac_dir in $PATH; do
  471     IFS="$acl_save_ifs"
  472     test -z "$ac_dir" && ac_dir=.
  473     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  474       acl_cv_path_LD="$ac_dir/$ac_prog"
  475       # Check to see if the program is GNU ld.  I'd rather use --version,
  476       # but apparently some variants of GNU ld only accept -v.
  477       # Break only if it was the GNU/non-GNU ld that we prefer.
  478       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
  479       *GNU* | *'with BFD'*)
  480         test "$with_gnu_ld" != no && break
  481         ;;
  482       *)
  483         test "$with_gnu_ld" != yes && break
  484         ;;
  485       esac
  486     fi
  487   done
  488   IFS="$acl_save_ifs"
  489 else
  490   acl_cv_path_LD="$LD" # Let the user override the test with a path.
  491 fi])
  492 LD="$acl_cv_path_LD"
  493 if test -n "$LD"; then
  494   AC_MSG_RESULT([$LD])
  495 else
  496   AC_MSG_RESULT([no])
  497 fi
  498 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  499 AC_LIB_PROG_LD_GNU
  500 ])
  501 
  502 # lib-link.m4 serial 26 (gettext-0.18.2)
  503 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
  504 dnl This file is free software; the Free Software Foundation
  505 dnl gives unlimited permission to copy and/or distribute it,
  506 dnl with or without modifications, as long as this notice is preserved.
  507 
  508 dnl From Bruno Haible.
  509 
  510 AC_PREREQ([2.54])
  511 
  512 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
  513 dnl the libraries corresponding to explicit and implicit dependencies.
  514 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
  515 dnl augments the CPPFLAGS variable.
  516 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
  517 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  518 AC_DEFUN([AC_LIB_LINKFLAGS],
  519 [
  520   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  521   AC_REQUIRE([AC_LIB_RPATH])
  522   pushdef([Name],[m4_translit([$1],[./+-], [____])])
  523   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  524                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  525   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
  526     AC_LIB_LINKFLAGS_BODY([$1], [$2])
  527     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
  528     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
  529     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
  530     ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
  531   ])
  532   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
  533   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
  534   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
  535   LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
  536   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  537   AC_SUBST([LIB]NAME)
  538   AC_SUBST([LTLIB]NAME)
  539   AC_SUBST([LIB]NAME[_PREFIX])
  540   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
  541   dnl results of this search when this library appears as a dependency.
  542   HAVE_LIB[]NAME=yes
  543   popdef([NAME])
  544   popdef([Name])
  545 ])
  546 
  547 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
  548 dnl searches for libname and the libraries corresponding to explicit and
  549 dnl implicit dependencies, together with the specified include files and
  550 dnl the ability to compile and link the specified testcode. The missing-message
  551 dnl defaults to 'no' and may contain additional hints for the user.
  552 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
  553 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
  554 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
  555 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
  556 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
  557 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  558 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
  559 [
  560   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  561   AC_REQUIRE([AC_LIB_RPATH])
  562   pushdef([Name],[m4_translit([$1],[./+-], [____])])
  563   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  564                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  565 
  566   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
  567   dnl accordingly.
  568   AC_LIB_LINKFLAGS_BODY([$1], [$2])
  569 
  570   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
  571   dnl because if the user has installed lib[]Name and not disabled its use
  572   dnl via --without-lib[]Name-prefix, he wants to use it.
  573   ac_save_CPPFLAGS="$CPPFLAGS"
  574   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  575 
  576   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
  577     ac_save_LIBS="$LIBS"
  578     dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
  579     dnl because these -l options might require -L options that are present in
  580     dnl LIBS. -l options benefit only from the -L options listed before it.
  581     dnl Otherwise, add it to the front of LIBS, because it may be a static
  582     dnl library that depends on another static library that is present in LIBS.
  583     dnl Static libraries benefit only from the static libraries listed after
  584     dnl it.
  585     case " $LIB[]NAME" in
  586       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
  587       *)       LIBS="$LIB[]NAME $LIBS" ;;
  588     esac
  589     AC_LINK_IFELSE(
  590       [AC_LANG_PROGRAM([[$3]], [[$4]])],
  591       [ac_cv_lib[]Name=yes],
  592       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
  593     LIBS="$ac_save_LIBS"
  594   ])
  595   if test "$ac_cv_lib[]Name" = yes; then
  596     HAVE_LIB[]NAME=yes
  597     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
  598     AC_MSG_CHECKING([how to link with lib[]$1])
  599     AC_MSG_RESULT([$LIB[]NAME])
  600   else
  601     HAVE_LIB[]NAME=no
  602     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
  603     dnl $INC[]NAME either.
  604     CPPFLAGS="$ac_save_CPPFLAGS"
  605     LIB[]NAME=
  606     LTLIB[]NAME=
  607     LIB[]NAME[]_PREFIX=
  608   fi
  609   AC_SUBST([HAVE_LIB]NAME)
  610   AC_SUBST([LIB]NAME)
  611   AC_SUBST([LTLIB]NAME)
  612   AC_SUBST([LIB]NAME[_PREFIX])
  613   popdef([NAME])
  614   popdef([Name])
  615 ])
  616 
  617 dnl Determine the platform dependent parameters needed to use rpath:
  618 dnl   acl_libext,
  619 dnl   acl_shlibext,
  620 dnl   acl_libname_spec,
  621 dnl   acl_library_names_spec,
  622 dnl   acl_hardcode_libdir_flag_spec,
  623 dnl   acl_hardcode_libdir_separator,
  624 dnl   acl_hardcode_direct,
  625 dnl   acl_hardcode_minus_L.
  626 AC_DEFUN([AC_LIB_RPATH],
  627 [
  628   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
  629   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
  630   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
  631   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
  632   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
  633   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
  634   AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
  635     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
  636     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
  637     . ./conftest.sh
  638     rm -f ./conftest.sh
  639     acl_cv_rpath=done
  640   ])
  641   wl="$acl_cv_wl"
  642   acl_libext="$acl_cv_libext"
  643   acl_shlibext="$acl_cv_shlibext"
  644   acl_libname_spec="$acl_cv_libname_spec"
  645   acl_library_names_spec="$acl_cv_library_names_spec"
  646   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
  647   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
  648   acl_hardcode_direct="$acl_cv_hardcode_direct"
  649   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
  650   dnl Determine whether the user wants rpath handling at all.
  651   AC_ARG_ENABLE([rpath],
  652     [  --disable-rpath         do not hardcode runtime library paths],
  653     :, enable_rpath=yes)
  654 ])
  655 
  656 dnl AC_LIB_FROMPACKAGE(name, package)
  657 dnl declares that libname comes from the given package. The configure file
  658 dnl will then not have a --with-libname-prefix option but a
  659 dnl --with-package-prefix option. Several libraries can come from the same
  660 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
  661 dnl macro call that searches for libname.
  662 AC_DEFUN([AC_LIB_FROMPACKAGE],
  663 [
  664   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  665                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  666   define([acl_frompackage_]NAME, [$2])
  667   popdef([NAME])
  668   pushdef([PACK],[$2])
  669   pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
  670                                      [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  671   define([acl_libsinpackage_]PACKUP,
  672     m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
  673   popdef([PACKUP])
  674   popdef([PACK])
  675 ])
  676 
  677 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
  678 dnl the libraries corresponding to explicit and implicit dependencies.
  679 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
  680 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
  681 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  682 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
  683 [
  684   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  685   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  686                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  687   pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
  688   pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
  689                                      [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  690   pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
  691   dnl Autoconf >= 2.61 supports dots in --with options.
  692   pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
  693   dnl By default, look in $includedir and $libdir.
  694   use_additional=yes
  695   AC_LIB_WITH_FINAL_PREFIX([
  696     eval additional_includedir=\"$includedir\"
  697     eval additional_libdir=\"$libdir\"
  698   ])
  699   AC_ARG_WITH(P_A_C_K[-prefix],
  700 [[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
  701   --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
  702 [
  703     if test "X$withval" = "Xno"; then
  704       use_additional=no
  705     else
  706       if test "X$withval" = "X"; then
  707         AC_LIB_WITH_FINAL_PREFIX([
  708           eval additional_includedir=\"$includedir\"
  709           eval additional_libdir=\"$libdir\"
  710         ])
  711       else
  712         additional_includedir="$withval/include"
  713         additional_libdir="$withval/$acl_libdirstem"
  714         if test "$acl_libdirstem2" != "$acl_libdirstem" \
  715            && ! test -d "$withval/$acl_libdirstem"; then
  716           additional_libdir="$withval/$acl_libdirstem2"
  717         fi
  718       fi
  719     fi
  720 ])
  721   dnl Search the library and its dependencies in $additional_libdir and
  722   dnl $LDFLAGS. Using breadth-first-seach.
  723   LIB[]NAME=
  724   LTLIB[]NAME=
  725   INC[]NAME=
  726   LIB[]NAME[]_PREFIX=
  727   dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
  728   dnl computed. So it has to be reset here.
  729   HAVE_LIB[]NAME=
  730   rpathdirs=
  731   ltrpathdirs=
  732   names_already_handled=
  733   names_next_round='$1 $2'
  734   while test -n "$names_next_round"; do
  735     names_this_round="$names_next_round"
  736     names_next_round=
  737     for name in $names_this_round; do
  738       already_handled=
  739       for n in $names_already_handled; do
  740         if test "$n" = "$name"; then
  741           already_handled=yes
  742           break
  743         fi
  744       done
  745       if test -z "$already_handled"; then
  746         names_already_handled="$names_already_handled $name"
  747         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
  748         dnl or AC_LIB_HAVE_LINKFLAGS call.
  749         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
  750         eval value=\"\$HAVE_LIB$uppername\"
  751         if test -n "$value"; then
  752           if test "$value" = yes; then
  753             eval value=\"\$LIB$uppername\"
  754             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
  755             eval value=\"\$LTLIB$uppername\"
  756             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
  757           else
  758             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
  759             dnl that this library doesn't exist. So just drop it.
  760             :
  761           fi
  762         else
  763           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
  764           dnl and the already constructed $LIBNAME/$LTLIBNAME.
  765           found_dir=
  766           found_la=
  767           found_so=
  768           found_a=
  769           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
  770           if test -n "$acl_shlibext"; then
  771             shrext=".$acl_shlibext"             # typically: shrext=.so
  772           else
  773             shrext=
  774           fi
  775           if test $use_additional = yes; then
  776             dir="$additional_libdir"
  777             dnl The same code as in the loop below:
  778             dnl First look for a shared library.
  779             if test -n "$acl_shlibext"; then
  780               if test -f "$dir/$libname$shrext"; then
  781                 found_dir="$dir"
  782                 found_so="$dir/$libname$shrext"
  783               else
  784                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
  785                   ver=`(cd "$dir" && \
  786                         for f in "$libname$shrext".*; do echo "$f"; done \
  787                         | sed -e "s,^$libname$shrext\\\\.,," \
  788                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
  789                         | sed 1q ) 2>/dev/null`
  790                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
  791                     found_dir="$dir"
  792                     found_so="$dir/$libname$shrext.$ver"
  793                   fi
  794                 else
  795                   eval library_names=\"$acl_library_names_spec\"
  796                   for f in $library_names; do
  797                     if test -f "$dir/$f"; then
  798                       found_dir="$dir"
  799                       found_so="$dir/$f"
  800                       break
  801                     fi
  802                   done
  803                 fi
  804               fi
  805             fi
  806             dnl Then look for a static library.
  807             if test "X$found_dir" = "X"; then
  808               if test -f "$dir/$libname.$acl_libext"; then
  809                 found_dir="$dir"
  810                 found_a="$dir/$libname.$acl_libext"
  811               fi
  812             fi
  813             if test "X$found_dir" != "X"; then
  814               if test -f "$dir/$libname.la"; then
  815                 found_la="$dir/$libname.la"
  816               fi
  817             fi
  818           fi
  819           if test "X$found_dir" = "X"; then
  820             for x in $LDFLAGS $LTLIB[]NAME; do
  821               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  822               case "$x" in
  823                 -L*)
  824                   dir=`echo "X$x" | sed -e 's/^X-L//'`
  825                   dnl First look for a shared library.
  826                   if test -n "$acl_shlibext"; then
  827                     if test -f "$dir/$libname$shrext"; then
  828                       found_dir="$dir"
  829                       found_so="$dir/$libname$shrext"
  830                     else
  831                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
  832                         ver=`(cd "$dir" && \
  833                               for f in "$libname$shrext".*; do echo "$f"; done \
  834                               | sed -e "s,^$libname$shrext\\\\.,," \
  835                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
  836                               | sed 1q ) 2>/dev/null`
  837                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
  838                           found_dir="$dir"
  839                           found_so="$dir/$libname$shrext.$ver"
  840                         fi
  841                       else
  842                         eval library_names=\"$acl_library_names_spec\"
  843                         for f in $library_names; do
  844                           if test -f "$dir/$f"; then
  845                             found_dir="$dir"
  846                             found_so="$dir/$f"
  847                             break
  848                           fi
  849                         done
  850                       fi
  851                     fi
  852                   fi
  853                   dnl Then look for a static library.
  854                   if test "X$found_dir" = "X"; then
  855                     if test -f "$dir/$libname.$acl_libext"; then
  856                       found_dir="$dir"
  857                       found_a="$dir/$libname.$acl_libext"
  858                     fi
  859                   fi
  860                   if test "X$found_dir" != "X"; then
  861                     if test -f "$dir/$libname.la"; then
  862                       found_la="$dir/$libname.la"
  863                     fi
  864                   fi
  865                   ;;
  866               esac
  867               if test "X$found_dir" != "X"; then
  868                 break
  869               fi
  870             done
  871           fi
  872           if test "X$found_dir" != "X"; then
  873             dnl Found the library.
  874             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
  875             if test "X$found_so" != "X"; then
  876               dnl Linking with a shared library. We attempt to hardcode its
  877               dnl directory into the executable's runpath, unless it's the
  878               dnl standard /usr/lib.
  879               if test "$enable_rpath" = no \
  880                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
  881                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
  882                 dnl No hardcoding is needed.
  883                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  884               else
  885                 dnl Use an explicit option to hardcode DIR into the resulting
  886                 dnl binary.
  887                 dnl Potentially add DIR to ltrpathdirs.
  888                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  889                 haveit=
  890                 for x in $ltrpathdirs; do
  891                   if test "X$x" = "X$found_dir"; then
  892                     haveit=yes
  893                     break
  894                   fi
  895                 done
  896                 if test -z "$haveit"; then
  897                   ltrpathdirs="$ltrpathdirs $found_dir"
  898                 fi
  899                 dnl The hardcoding into $LIBNAME is system dependent.
  900                 if test "$acl_hardcode_direct" = yes; then
  901                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
  902                   dnl resulting binary.
  903                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  904                 else
  905                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
  906                     dnl Use an explicit option to hardcode DIR into the resulting
  907                     dnl binary.
  908                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  909                     dnl Potentially add DIR to rpathdirs.
  910                     dnl The rpathdirs will be appended to $LIBNAME at the end.
  911                     haveit=
  912                     for x in $rpathdirs; do
  913                       if test "X$x" = "X$found_dir"; then
  914                         haveit=yes
  915                         break
  916                       fi
  917                     done
  918                     if test -z "$haveit"; then
  919                       rpathdirs="$rpathdirs $found_dir"
  920                     fi
  921                   else
  922                     dnl Rely on "-L$found_dir".
  923                     dnl But don't add it if it's already contained in the LDFLAGS
  924                     dnl or the already constructed $LIBNAME
  925                     haveit=
  926                     for x in $LDFLAGS $LIB[]NAME; do
  927                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  928                       if test "X$x" = "X-L$found_dir"; then
  929                         haveit=yes
  930                         break
  931                       fi
  932                     done
  933                     if test -z "$haveit"; then
  934                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
  935                     fi
  936                     if test "$acl_hardcode_minus_L" != no; then
  937                       dnl FIXME: Not sure whether we should use
  938                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  939                       dnl here.
  940                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  941                     else
  942                       dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
  943                       dnl here, because this doesn't fit in flags passed to the
  944                       dnl compiler. So give up. No hardcoding. This affects only
  945                       dnl very old systems.
  946                       dnl FIXME: Not sure whether we should use
  947                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  948                       dnl here.
  949                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  950                     fi
  951                   fi
  952                 fi
  953               fi
  954             else
  955               if test "X$found_a" != "X"; then
  956                 dnl Linking with a static library.
  957                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
  958               else
  959                 dnl We shouldn't come here, but anyway it's good to have a
  960                 dnl fallback.
  961                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
  962               fi
  963             fi
  964             dnl Assume the include files are nearby.
  965             additional_includedir=
  966             case "$found_dir" in
  967               */$acl_libdirstem | */$acl_libdirstem/)
  968                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
  969                 if test "$name" = '$1'; then
  970                   LIB[]NAME[]_PREFIX="$basedir"
  971                 fi
  972                 additional_includedir="$basedir/include"
  973                 ;;
  974               */$acl_libdirstem2 | */$acl_libdirstem2/)
  975                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
  976                 if test "$name" = '$1'; then
  977                   LIB[]NAME[]_PREFIX="$basedir"
  978                 fi
  979                 additional_includedir="$basedir/include"
  980                 ;;
  981             esac
  982             if test "X$additional_includedir" != "X"; then
  983               dnl Potentially add $additional_includedir to $INCNAME.
  984               dnl But don't add it
  985               dnl   1. if it's the standard /usr/include,
  986               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
  987               dnl   3. if it's already present in $CPPFLAGS or the already
  988               dnl      constructed $INCNAME,
  989               dnl   4. if it doesn't exist as a directory.
  990               if test "X$additional_includedir" != "X/usr/include"; then
  991                 haveit=
  992                 if test "X$additional_includedir" = "X/usr/local/include"; then
  993                   if test -n "$GCC"; then
  994                     case $host_os in
  995                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  996                     esac
  997                   fi
  998                 fi
  999                 if test -z "$haveit"; then
 1000                   for x in $CPPFLAGS $INC[]NAME; do
 1001                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 1002                     if test "X$x" = "X-I$additional_includedir"; then
 1003                       haveit=yes
 1004                       break
 1005                     fi
 1006                   done
 1007                   if test -z "$haveit"; then
 1008                     if test -d "$additional_includedir"; then
 1009                       dnl Really add $additional_includedir to $INCNAME.
 1010                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 1011                     fi
 1012                   fi
 1013                 fi
 1014               fi
 1015             fi
 1016             dnl Look for dependencies.
 1017             if test -n "$found_la"; then
 1018               dnl Read the .la file. It defines the variables
 1019               dnl dlname, library_names, old_library, dependency_libs, current,
 1020               dnl age, revision, installed, dlopen, dlpreopen, libdir.
 1021               save_libdir="$libdir"
 1022               case "$found_la" in
 1023                 */* | *\\*) . "$found_la" ;;
 1024                 *) . "./$found_la" ;;
 1025               esac
 1026               libdir="$save_libdir"
 1027               dnl We use only dependency_libs.
 1028               for dep in $dependency_libs; do
 1029                 case "$dep" in
 1030                   -L*)
 1031                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 1032                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 1033                     dnl But don't add it
 1034                     dnl   1. if it's the standard /usr/lib,
 1035                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 1036                     dnl   3. if it's already present in $LDFLAGS or the already
 1037                     dnl      constructed $LIBNAME,
 1038                     dnl   4. if it doesn't exist as a directory.
 1039                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
 1040                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
 1041                       haveit=
 1042                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
 1043                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
 1044                         if test -n "$GCC"; then
 1045                           case $host_os in
 1046                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 1047                           esac
 1048                         fi
 1049                       fi
 1050                       if test -z "$haveit"; then
 1051                         haveit=
 1052                         for x in $LDFLAGS $LIB[]NAME; do
 1053                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 1054                           if test "X$x" = "X-L$additional_libdir"; then
 1055                             haveit=yes
 1056                             break
 1057                           fi
 1058                         done
 1059                         if test -z "$haveit"; then
 1060                           if test -d "$additional_libdir"; then
 1061                             dnl Really add $additional_libdir to $LIBNAME.
 1062                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 1063                           fi
 1064                         fi
 1065                         haveit=
 1066                         for x in $LDFLAGS $LTLIB[]NAME; do
 1067                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 1068                           if test "X$x" = "X-L$additional_libdir"; then
 1069                             haveit=yes
 1070                             break
 1071                           fi
 1072                         done
 1073                         if test -z "$haveit"; then
 1074                           if test -d "$additional_libdir"; then
 1075                             dnl Really add $additional_libdir to $LTLIBNAME.
 1076                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 1077                           fi
 1078                         fi
 1079                       fi
 1080                     fi
 1081                     ;;
 1082                   -R*)
 1083                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
 1084                     if test "$enable_rpath" != no; then
 1085                       dnl Potentially add DIR to rpathdirs.
 1086                       dnl The rpathdirs will be appended to $LIBNAME at the end.
 1087                       haveit=
 1088                       for x in $rpathdirs; do
 1089                         if test "X$x" = "X$dir"; then
 1090                           haveit=yes
 1091                           break
 1092                         fi
 1093                       done
 1094                       if test -z "$haveit"; then
 1095                         rpathdirs="$rpathdirs $dir"
 1096                       fi
 1097                       dnl Potentially add DIR to ltrpathdirs.
 1098                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 1099                       haveit=
 1100                       for x in $ltrpathdirs; do
 1101                         if test "X$x" = "X$dir"; then
 1102                           haveit=yes
 1103                           break
 1104                         fi
 1105                       done
 1106                       if test -z "$haveit"; then
 1107                         ltrpathdirs="$ltrpathdirs $dir"
 1108                       fi
 1109                     fi
 1110                     ;;
 1111                   -l*)
 1112                     dnl Handle this in the next round.
 1113                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 1114                     ;;
 1115                   *.la)
 1116                     dnl Handle this in the next round. Throw away the .la's
 1117                     dnl directory; it is already contained in a preceding -L
 1118                     dnl option.
 1119                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 1120                     ;;
 1121                   *)
 1122                     dnl Most likely an immediate library name.
 1123                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 1124                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 1125                     ;;
 1126                 esac
 1127               done
 1128             fi
 1129           else
 1130             dnl Didn't find the library; assume it is in the system directories
 1131             dnl known to the linker and runtime loader. (All the system
 1132             dnl directories known to the linker should also be known to the
 1133             dnl runtime loader, otherwise the system is severely misconfigured.)
 1134             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 1135             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 1136           fi
 1137         fi
 1138       fi
 1139     done
 1140   done
 1141   if test "X$rpathdirs" != "X"; then
 1142     if test -n "$acl_hardcode_libdir_separator"; then
 1143       dnl Weird platform: only the last -rpath option counts, the user must
 1144       dnl pass all path elements in one option. We can arrange that for a
 1145       dnl single library, but not when more than one $LIBNAMEs are used.
 1146       alldirs=
 1147       for found_dir in $rpathdirs; do
 1148         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
 1149       done
 1150       dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
 1151       acl_save_libdir="$libdir"
 1152       libdir="$alldirs"
 1153       eval flag=\"$acl_hardcode_libdir_flag_spec\"
 1154       libdir="$acl_save_libdir"
 1155       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 1156     else
 1157       dnl The -rpath options are cumulative.
 1158       for found_dir in $rpathdirs; do
 1159         acl_save_libdir="$libdir"
 1160         libdir="$found_dir"
 1161         eval flag=\"$acl_hardcode_libdir_flag_spec\"
 1162         libdir="$acl_save_libdir"
 1163         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 1164       done
 1165     fi
 1166   fi
 1167   if test "X$ltrpathdirs" != "X"; then
 1168     dnl When using libtool, the option that works for both libraries and
 1169     dnl executables is -R. The -R options are cumulative.
 1170     for found_dir in $ltrpathdirs; do
 1171       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 1172     done
 1173   fi
 1174   popdef([P_A_C_K])
 1175   popdef([PACKLIBS])
 1176   popdef([PACKUP])
 1177   popdef([PACK])
 1178   popdef([NAME])
 1179 ])
 1180 
 1181 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 1182 dnl unless already present in VAR.
 1183 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 1184 dnl contains two or three consecutive elements that belong together.
 1185 AC_DEFUN([AC_LIB_APPENDTOVAR],
 1186 [
 1187   for element in [$2]; do
 1188     haveit=
 1189     for x in $[$1]; do
 1190       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 1191       if test "X$x" = "X$element"; then
 1192         haveit=yes
 1193         break
 1194       fi
 1195     done
 1196     if test -z "$haveit"; then
 1197       [$1]="${[$1]}${[$1]:+ }$element"
 1198     fi
 1199   done
 1200 ])
 1201 
 1202 dnl For those cases where a variable contains several -L and -l options
 1203 dnl referring to unknown libraries and directories, this macro determines the
 1204 dnl necessary additional linker options for the runtime path.
 1205 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
 1206 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
 1207 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
 1208 dnl otherwise linking without libtool is assumed.
 1209 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
 1210 [
 1211   AC_REQUIRE([AC_LIB_RPATH])
 1212   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 1213   $1=
 1214   if test "$enable_rpath" != no; then
 1215     if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
 1216       dnl Use an explicit option to hardcode directories into the resulting
 1217       dnl binary.
 1218       rpathdirs=
 1219       next=
 1220       for opt in $2; do
 1221         if test -n "$next"; then
 1222           dir="$next"
 1223           dnl No need to hardcode the standard /usr/lib.
 1224           if test "X$dir" != "X/usr/$acl_libdirstem" \
 1225              && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 1226             rpathdirs="$rpathdirs $dir"
 1227           fi
 1228           next=
 1229         else
 1230           case $opt in
 1231             -L) next=yes ;;
 1232             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
 1233                  dnl No need to hardcode the standard /usr/lib.
 1234                  if test "X$dir" != "X/usr/$acl_libdirstem" \
 1235                     && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 1236                    rpathdirs="$rpathdirs $dir"
 1237                  fi
 1238                  next= ;;
 1239             *) next= ;;
 1240           esac
 1241         fi
 1242       done
 1243       if test "X$rpathdirs" != "X"; then
 1244         if test -n ""$3""; then
 1245           dnl libtool is used for linking. Use -R options.
 1246           for dir in $rpathdirs; do
 1247             $1="${$1}${$1:+ }-R$dir"
 1248           done
 1249         else
 1250           dnl The linker is used for linking directly.
 1251           if test -n "$acl_hardcode_libdir_separator"; then
 1252             dnl Weird platform: only the last -rpath option counts, the user
 1253             dnl must pass all path elements in one option.
 1254             alldirs=
 1255             for dir in $rpathdirs; do
 1256               alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
 1257             done
 1258             acl_save_libdir="$libdir"
 1259             libdir="$alldirs"
 1260             eval flag=\"$acl_hardcode_libdir_flag_spec\"
 1261             libdir="$acl_save_libdir"
 1262             $1="$flag"
 1263           else
 1264             dnl The -rpath options are cumulative.
 1265             for dir in $rpathdirs; do
 1266               acl_save_libdir="$libdir"
 1267               libdir="$dir"
 1268               eval flag=\"$acl_hardcode_libdir_flag_spec\"
 1269               libdir="$acl_save_libdir"
 1270               $1="${$1}${$1:+ }$flag"
 1271             done
 1272           fi
 1273         fi
 1274       fi
 1275     fi
 1276   fi
 1277   AC_SUBST([$1])
 1278 ])
 1279 
 1280 # lib-prefix.m4 serial 7 (gettext-0.18)
 1281 dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
 1282 dnl This file is free software; the Free Software Foundation
 1283 dnl gives unlimited permission to copy and/or distribute it,
 1284 dnl with or without modifications, as long as this notice is preserved.
 1285 
 1286 dnl From Bruno Haible.
 1287 
 1288 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 1289 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 1290 dnl require excessive bracketing.
 1291 ifdef([AC_HELP_STRING],
 1292 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 1293 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 1294 
 1295 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 1296 dnl to access previously installed libraries. The basic assumption is that
 1297 dnl a user will want packages to use other packages he previously installed
 1298 dnl with the same --prefix option.
 1299 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 1300 dnl libraries, but is otherwise very convenient.
 1301 AC_DEFUN([AC_LIB_PREFIX],
 1302 [
 1303   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 1304   AC_REQUIRE([AC_PROG_CC])
 1305   AC_REQUIRE([AC_CANONICAL_HOST])
 1306   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 1307   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 1308   dnl By default, look in $includedir and $libdir.
 1309   use_additional=yes
 1310   AC_LIB_WITH_FINAL_PREFIX([
 1311     eval additional_includedir=\"$includedir\"
 1312     eval additional_libdir=\"$libdir\"
 1313   ])
 1314   AC_LIB_ARG_WITH([lib-prefix],
 1315 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 1316   --without-lib-prefix    don't search for libraries in includedir and libdir],
 1317 [
 1318     if test "X$withval" = "Xno"; then
 1319       use_additional=no
 1320     else
 1321       if test "X$withval" = "X"; then
 1322         AC_LIB_WITH_FINAL_PREFIX([
 1323           eval additional_includedir=\"$includedir\"
 1324           eval additional_libdir=\"$libdir\"
 1325         ])
 1326       else
 1327         additional_includedir="$withval/include"
 1328         additional_libdir="$withval/$acl_libdirstem"
 1329       fi
 1330     fi
 1331 ])
 1332   if test $use_additional = yes; then
 1333     dnl Potentially add $additional_includedir to $CPPFLAGS.
 1334     dnl But don't add it
 1335     dnl   1. if it's the standard /usr/include,
 1336     dnl   2. if it's already present in $CPPFLAGS,
 1337     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 1338     dnl   4. if it doesn't exist as a directory.
 1339     if test "X$additional_includedir" != "X/usr/include"; then
 1340       haveit=
 1341       for x in $CPPFLAGS; do
 1342         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 1343         if test "X$x" = "X-I$additional_includedir"; then
 1344           haveit=yes
 1345           break
 1346         fi
 1347       done
 1348       if test -z "$haveit"; then
 1349         if test "X$additional_includedir" = "X/usr/local/include"; then
 1350           if test -n "$GCC"; then
 1351             case $host_os in
 1352               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 1353             esac
 1354           fi
 1355         fi
 1356         if test -z "$haveit"; then
 1357           if test -d "$additional_includedir"; then
 1358             dnl Really add $additional_includedir to $CPPFLAGS.
 1359             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 1360           fi
 1361         fi
 1362       fi
 1363     fi
 1364     dnl Potentially add $additional_libdir to $LDFLAGS.
 1365     dnl But don't add it
 1366     dnl   1. if it's the standard /usr/lib,
 1367     dnl   2. if it's already present in $LDFLAGS,
 1368     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 1369     dnl   4. if it doesn't exist as a directory.
 1370     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
 1371       haveit=
 1372       for x in $LDFLAGS; do
 1373         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 1374         if test "X$x" = "X-L$additional_libdir"; then
 1375           haveit=yes
 1376           break
 1377         fi
 1378       done
 1379       if test -z "$haveit"; then
 1380         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
 1381           if test -n "$GCC"; then
 1382             case $host_os in
 1383               linux*) haveit=yes;;
 1384             esac
 1385           fi
 1386         fi
 1387         if test -z "$haveit"; then
 1388           if test -d "$additional_libdir"; then
 1389             dnl Really add $additional_libdir to $LDFLAGS.
 1390             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 1391           fi
 1392         fi
 1393       fi
 1394     fi
 1395   fi
 1396 ])
 1397 
 1398 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 1399 dnl acl_final_exec_prefix, containing the values to which $prefix and
 1400 dnl $exec_prefix will expand at the end of the configure script.
 1401 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 1402 [
 1403   dnl Unfortunately, prefix and exec_prefix get only finally determined
 1404   dnl at the end of configure.
 1405   if test "X$prefix" = "XNONE"; then
 1406     acl_final_prefix="$ac_default_prefix"
 1407   else
 1408     acl_final_prefix="$prefix"
 1409   fi
 1410   if test "X$exec_prefix" = "XNONE"; then
 1411     acl_final_exec_prefix='${prefix}'
 1412   else
 1413     acl_final_exec_prefix="$exec_prefix"
 1414   fi
 1415   acl_save_prefix="$prefix"
 1416   prefix="$acl_final_prefix"
 1417   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 1418   prefix="$acl_save_prefix"
 1419 ])
 1420 
 1421 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 1422 dnl variables prefix and exec_prefix bound to the values they will have
 1423 dnl at the end of the configure script.
 1424 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 1425 [
 1426   acl_save_prefix="$prefix"
 1427   prefix="$acl_final_prefix"
 1428   acl_save_exec_prefix="$exec_prefix"
 1429   exec_prefix="$acl_final_exec_prefix"
 1430   $1
 1431   exec_prefix="$acl_save_exec_prefix"
 1432   prefix="$acl_save_prefix"
 1433 ])
 1434 
 1435 dnl AC_LIB_PREPARE_MULTILIB creates
 1436 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
 1437 dnl   "lib" or "lib64" or "lib/64",
 1438 dnl - a variable acl_libdirstem2, as a secondary possible value for
 1439 dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
 1440 dnl   "lib/amd64".
 1441 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
 1442 [
 1443   dnl There is no formal standard regarding lib and lib64.
 1444   dnl On glibc systems, the current practice is that on a system supporting
 1445   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 1446   dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
 1447   dnl the compiler's default mode by looking at the compiler's library search
 1448   dnl path. If at least one of its elements ends in /lib64 or points to a
 1449   dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
 1450   dnl Otherwise we use the default, namely "lib".
 1451   dnl On Solaris systems, the current practice is that on a system supporting
 1452   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 1453   dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
 1454   dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
 1455   AC_REQUIRE([AC_CANONICAL_HOST])
 1456   acl_libdirstem=lib
 1457   acl_libdirstem2=
 1458   case "$host_os" in
 1459     solaris*)
 1460       dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
 1461       dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
 1462       dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
 1463       dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
 1464       dnl symlink is missing, so we set acl_libdirstem2 too.
 1465       AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
 1466         [AC_EGREP_CPP([sixtyfour bits], [
 1467 #ifdef _LP64
 1468 sixtyfour bits
 1469 #endif
 1470            ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
 1471         ])
 1472       if test $gl_cv_solaris_64bit = yes; then
 1473         acl_libdirstem=lib/64
 1474         case "$host_cpu" in
 1475           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
 1476           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
 1477         esac
 1478       fi
 1479       ;;
 1480     *)
 1481       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
 1482       if test -n "$searchpath"; then
 1483         acl_save_IFS="${IFS= 	}"; IFS=":"
 1484         for searchdir in $searchpath; do
 1485           if test -d "$searchdir"; then
 1486             case "$searchdir" in
 1487               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
 1488               */../ | */.. )
 1489                 # Better ignore directories of this form. They are misleading.
 1490                 ;;
 1491               *) searchdir=`cd "$searchdir" && pwd`
 1492                  case "$searchdir" in
 1493                    */lib64 ) acl_libdirstem=lib64 ;;
 1494                  esac ;;
 1495             esac
 1496           fi
 1497         done
 1498         IFS="$acl_save_IFS"
 1499       fi
 1500       ;;
 1501   esac
 1502   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
 1503 ])
 1504 
 1505 dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
 1506 dnl serial 11 (pkg-config-0.29)
 1507 dnl
 1508 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 1509 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
 1510 dnl
 1511 dnl This program is free software; you can redistribute it and/or modify
 1512 dnl it under the terms of the GNU General Public License as published by
 1513 dnl the Free Software Foundation; either version 2 of the License, or
 1514 dnl (at your option) any later version.
 1515 dnl
 1516 dnl This program is distributed in the hope that it will be useful, but
 1517 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
 1518 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 1519 dnl General Public License for more details.
 1520 dnl
 1521 dnl You should have received a copy of the GNU General Public License
 1522 dnl along with this program; if not, write to the Free Software
 1523 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 1524 dnl 02111-1307, USA.
 1525 dnl
 1526 dnl As a special exception to the GNU General Public License, if you
 1527 dnl distribute this file as part of a program that contains a
 1528 dnl configuration script generated by Autoconf, you may include it under
 1529 dnl the same distribution terms that you use for the rest of that
 1530 dnl program.
 1531 
 1532 dnl PKG_PREREQ(MIN-VERSION)
 1533 dnl -----------------------
 1534 dnl Since: 0.29
 1535 dnl
 1536 dnl Verify that the version of the pkg-config macros are at least
 1537 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
 1538 dnl installed version of pkg-config, this checks the developer's version
 1539 dnl of pkg.m4 when generating configure.
 1540 dnl
 1541 dnl To ensure that this macro is defined, also add:
 1542 dnl m4_ifndef([PKG_PREREQ],
 1543 dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
 1544 dnl
 1545 dnl See the "Since" comment for each macro you use to see what version
 1546 dnl of the macros you require.
 1547 m4_defun([PKG_PREREQ],
 1548 [m4_define([PKG_MACROS_VERSION], [0.29])
 1549 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
 1550     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 1551 ])dnl PKG_PREREQ
 1552 
 1553 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
 1554 dnl ----------------------------------
 1555 dnl Since: 0.16
 1556 dnl
 1557 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
 1558 dnl first found in the path. Checks that the version of pkg-config found
 1559 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
 1560 dnl used since that's the first version where most current features of
 1561 dnl pkg-config existed.
 1562 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 1563 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 1564 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 1565 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 1566 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 1567 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 1568 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 1569 
 1570 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 1571 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 1572 fi
 1573 if test -n "$PKG_CONFIG"; then
 1574 	_pkg_min_version=m4_default([$1], [0.9.0])
 1575 	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 1576 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 1577 		AC_MSG_RESULT([yes])
 1578 	else
 1579 		AC_MSG_RESULT([no])
 1580 		PKG_CONFIG=""
 1581 	fi
 1582 fi[]dnl
 1583 ])dnl PKG_PROG_PKG_CONFIG
 1584 
 1585 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 1586 dnl -------------------------------------------------------------------
 1587 dnl Since: 0.18
 1588 dnl
 1589 dnl Check to see whether a particular set of modules exists. Similar to
 1590 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
 1591 dnl
 1592 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 1593 dnl only at the first occurence in configure.ac, so if the first place
 1594 dnl it's called might be skipped (such as if it is within an "if", you
 1595 dnl have to call PKG_CHECK_EXISTS manually
 1596 AC_DEFUN([PKG_CHECK_EXISTS],
 1597 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 1598 if test -n "$PKG_CONFIG" && \
 1599     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 1600   m4_default([$2], [:])
 1601 m4_ifvaln([$3], [else
 1602   $3])dnl
 1603 fi])
 1604 
 1605 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 1606 dnl ---------------------------------------------
 1607 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
 1608 dnl pkg_failed based on the result.
 1609 m4_define([_PKG_CONFIG],
 1610 [if test -n "$$1"; then
 1611     pkg_cv_[]$1="$$1"
 1612  elif test -n "$PKG_CONFIG"; then
 1613     PKG_CHECK_EXISTS([$3],
 1614                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 1615 		      test "x$?" != "x0" && pkg_failed=yes ],
 1616 		     [pkg_failed=yes])
 1617  else
 1618     pkg_failed=untried
 1619 fi[]dnl
 1620 ])dnl _PKG_CONFIG
 1621 
 1622 dnl _PKG_SHORT_ERRORS_SUPPORTED
 1623 dnl ---------------------------
 1624 dnl Internal check to see if pkg-config supports short errors.
 1625 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 1626 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 1627 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 1628         _pkg_short_errors_supported=yes
 1629 else
 1630         _pkg_short_errors_supported=no
 1631 fi[]dnl
 1632 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
 1633 
 1634 
 1635 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 1636 dnl   [ACTION-IF-NOT-FOUND])
 1637 dnl --------------------------------------------------------------
 1638 dnl Since: 0.4.0
 1639 dnl
 1640 dnl Note that if there is a possibility the first call to
 1641 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
 1642 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 1643 AC_DEFUN([PKG_CHECK_MODULES],
 1644 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 1645 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 1646 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 1647 
 1648 pkg_failed=no
 1649 AC_MSG_CHECKING([for $1])
 1650 
 1651 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 1652 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
 1653 
 1654 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 1655 and $1[]_LIBS to avoid the need to call pkg-config.
 1656 See the pkg-config man page for more details.])
 1657 
 1658 if test $pkg_failed = yes; then
 1659    	AC_MSG_RESULT([no])
 1660         _PKG_SHORT_ERRORS_SUPPORTED
 1661         if test $_pkg_short_errors_supported = yes; then
 1662 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 1663         else 
 1664 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 1665         fi
 1666 	# Put the nasty error message in config.log where it belongs
 1667 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 1668 
 1669 	m4_default([$4], [AC_MSG_ERROR(
 1670 [Package requirements ($2) were not met:
 1671 
 1672 $$1_PKG_ERRORS
 1673 
 1674 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 1675 installed software in a non-standard prefix.
 1676 
 1677 _PKG_TEXT])[]dnl
 1678         ])
 1679 elif test $pkg_failed = untried; then
 1680      	AC_MSG_RESULT([no])
 1681 	m4_default([$4], [AC_MSG_FAILURE(
 1682 [The pkg-config script could not be found or is too old.  Make sure it
 1683 is in your PATH or set the PKG_CONFIG environment variable to the full
 1684 path to pkg-config.
 1685 
 1686 _PKG_TEXT
 1687 
 1688 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 1689         ])
 1690 else
 1691 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 1692 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 1693         AC_MSG_RESULT([yes])
 1694 	$3
 1695 fi[]dnl
 1696 ])dnl PKG_CHECK_MODULES
 1697 
 1698 
 1699 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 1700 dnl   [ACTION-IF-NOT-FOUND])
 1701 dnl ---------------------------------------------------------------------
 1702 dnl Since: 0.29
 1703 dnl
 1704 dnl Checks for existence of MODULES and gathers its build flags with
 1705 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
 1706 dnl and VARIABLE-PREFIX_LIBS from --libs.
 1707 dnl
 1708 dnl Note that if there is a possibility the first call to
 1709 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
 1710 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
 1711 dnl configure.ac.
 1712 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
 1713 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 1714 _save_PKG_CONFIG=$PKG_CONFIG
 1715 PKG_CONFIG="$PKG_CONFIG --static"
 1716 PKG_CHECK_MODULES($@)
 1717 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
 1718 ])dnl PKG_CHECK_MODULES_STATIC
 1719 
 1720 
 1721 dnl PKG_INSTALLDIR([DIRECTORY])
 1722 dnl -------------------------
 1723 dnl Since: 0.27
 1724 dnl
 1725 dnl Substitutes the variable pkgconfigdir as the location where a module
 1726 dnl should install pkg-config .pc files. By default the directory is
 1727 dnl $libdir/pkgconfig, but the default can be changed by passing
 1728 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
 1729 dnl parameter.
 1730 AC_DEFUN([PKG_INSTALLDIR],
 1731 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
 1732 m4_pushdef([pkg_description],
 1733     [pkg-config installation directory @<:@]pkg_default[@:>@])
 1734 AC_ARG_WITH([pkgconfigdir],
 1735     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
 1736     [with_pkgconfigdir=]pkg_default)
 1737 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
 1738 m4_popdef([pkg_default])
 1739 m4_popdef([pkg_description])
 1740 ])dnl PKG_INSTALLDIR
 1741 
 1742 
 1743 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
 1744 dnl --------------------------------
 1745 dnl Since: 0.27
 1746 dnl
 1747 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
 1748 dnl module should install arch-independent pkg-config .pc files. By
 1749 dnl default the directory is $datadir/pkgconfig, but the default can be
 1750 dnl changed by passing DIRECTORY. The user can override through the
 1751 dnl --with-noarch-pkgconfigdir parameter.
 1752 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
 1753 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
 1754 m4_pushdef([pkg_description],
 1755     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
 1756 AC_ARG_WITH([noarch-pkgconfigdir],
 1757     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
 1758     [with_noarch_pkgconfigdir=]pkg_default)
 1759 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
 1760 m4_popdef([pkg_default])
 1761 m4_popdef([pkg_description])
 1762 ])dnl PKG_NOARCH_INSTALLDIR
 1763 
 1764 
 1765 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
 1766 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 1767 dnl -------------------------------------------
 1768 dnl Since: 0.28
 1769 dnl
 1770 dnl Retrieves the value of the pkg-config variable for the given module.
 1771 AC_DEFUN([PKG_CHECK_VAR],
 1772 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 1773 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
 1774 
 1775 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
 1776 AS_VAR_COPY([$1], [pkg_cv_][$1])
 1777 
 1778 AS_VAR_IF([$1], [""], [$5], [$4])dnl
 1779 ])dnl PKG_CHECK_VAR
 1780 
 1781 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
 1782 #
 1783 # This file is free software; the Free Software Foundation
 1784 # gives unlimited permission to copy and/or distribute it,
 1785 # with or without modifications, as long as this notice is preserved.
 1786 
 1787 # AM_AUTOMAKE_VERSION(VERSION)
 1788 # ----------------------------
 1789 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 1790 # generated from the m4 files accompanying Automake X.Y.
 1791 # (This private macro should not be called outside this file.)
 1792 AC_DEFUN([AM_AUTOMAKE_VERSION],
 1793 [am__api_version='1.16'
 1794 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 1795 dnl require some minimum version.  Point them to the right macro.
 1796 m4_if([$1], [1.16.1], [],
 1797       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 1798 ])
 1799 
 1800 # _AM_AUTOCONF_VERSION(VERSION)
 1801 # -----------------------------
 1802 # aclocal traces this macro to find the Autoconf version.
 1803 # This is a private macro too.  Using m4_define simplifies
 1804 # the logic in aclocal, which can simply ignore this definition.
 1805 m4_define([_AM_AUTOCONF_VERSION], [])
 1806 
 1807 # AM_SET_CURRENT_AUTOMAKE_VERSION
 1808 # -------------------------------
 1809 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 1810 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 1811 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 1812 [AM_AUTOMAKE_VERSION([1.16.1])dnl
 1813 m4_ifndef([AC_AUTOCONF_VERSION],
 1814   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 1815 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 1816 
 1817 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 1818 
 1819 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 1820 #
 1821 # This file is free software; the Free Software Foundation
 1822 # gives unlimited permission to copy and/or distribute it,
 1823 # with or without modifications, as long as this notice is preserved.
 1824 
 1825 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 1826 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 1827 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 1828 #
 1829 # Of course, Automake must honor this variable whenever it calls a
 1830 # tool from the auxiliary directory.  The problem is that $srcdir (and
 1831 # therefore $ac_aux_dir as well) can be either absolute or relative,
 1832 # depending on how configure is run.  This is pretty annoying, since
 1833 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
 1834 # source directory, any form will work fine, but in subdirectories a
 1835 # relative path needs to be adjusted first.
 1836 #
 1837 # $ac_aux_dir/missing
 1838 #    fails when called from a subdirectory if $ac_aux_dir is relative
 1839 # $top_srcdir/$ac_aux_dir/missing
 1840 #    fails if $ac_aux_dir is absolute,
 1841 #    fails when called from a subdirectory in a VPATH build with
 1842 #          a relative $ac_aux_dir
 1843 #
 1844 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 1845 # are both prefixed by $srcdir.  In an in-source build this is usually
 1846 # harmless because $srcdir is '.', but things will broke when you
 1847 # start a VPATH build or use an absolute $srcdir.
 1848 #
 1849 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 1850 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 1851 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 1852 # and then we would define $MISSING as
 1853 #   MISSING="\${SHELL} $am_aux_dir/missing"
 1854 # This will work as long as MISSING is not called from configure, because
 1855 # unfortunately $(top_srcdir) has no meaning in configure.
 1856 # However there are other variables, like CC, which are often used in
 1857 # configure, and could therefore not use this "fixed" $ac_aux_dir.
 1858 #
 1859 # Another solution, used here, is to always expand $ac_aux_dir to an
 1860 # absolute PATH.  The drawback is that using absolute paths prevent a
 1861 # configured tree to be moved without reconfiguration.
 1862 
 1863 AC_DEFUN([AM_AUX_DIR_EXPAND],
 1864 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 1865 # Expand $ac_aux_dir to an absolute path.
 1866 am_aux_dir=`cd "$ac_aux_dir" && pwd`
 1867 ])
 1868 
 1869 # AM_CONDITIONAL                                            -*- Autoconf -*-
 1870 
 1871 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
 1872 #
 1873 # This file is free software; the Free Software Foundation
 1874 # gives unlimited permission to copy and/or distribute it,
 1875 # with or without modifications, as long as this notice is preserved.
 1876 
 1877 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 1878 # -------------------------------------
 1879 # Define a conditional.
 1880 AC_DEFUN([AM_CONDITIONAL],
 1881 [AC_PREREQ([2.52])dnl
 1882  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 1883        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 1884 AC_SUBST([$1_TRUE])dnl
 1885 AC_SUBST([$1_FALSE])dnl
 1886 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 1887 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
 1888 m4_define([_AM_COND_VALUE_$1], [$2])dnl
 1889 if $2; then
 1890   $1_TRUE=
 1891   $1_FALSE='#'
 1892 else
 1893   $1_TRUE='#'
 1894   $1_FALSE=
 1895 fi
 1896 AC_CONFIG_COMMANDS_PRE(
 1897 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 1898   AC_MSG_ERROR([[conditional "$1" was never defined.
 1899 Usually this means the macro was only invoked conditionally.]])
 1900 fi])])
 1901 
 1902 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 1903 #
 1904 # This file is free software; the Free Software Foundation
 1905 # gives unlimited permission to copy and/or distribute it,
 1906 # with or without modifications, as long as this notice is preserved.
 1907 
 1908 
 1909 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 1910 # written in clear, in which case automake, when reading aclocal.m4,
 1911 # will think it sees a *use*, and therefore will trigger all it's
 1912 # C support machinery.  Also note that it means that autoscan, seeing
 1913 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 1914 
 1915 
 1916 # _AM_DEPENDENCIES(NAME)
 1917 # ----------------------
 1918 # See how the compiler implements dependency checking.
 1919 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 1920 # We try a few techniques and use that to set a single cache variable.
 1921 #
 1922 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 1923 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 1924 # dependency, and given that the user is not expected to run this macro,
 1925 # just rely on AC_PROG_CC.
 1926 AC_DEFUN([_AM_DEPENDENCIES],
 1927 [AC_REQUIRE([AM_SET_DEPDIR])dnl
 1928 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 1929 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 1930 AC_REQUIRE([AM_DEP_TRACK])dnl
 1931 
 1932 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
 1933       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
 1934       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 1935       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
 1936       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
 1937       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 1938                     [depcc="$$1"   am_compiler_list=])
 1939 
 1940 AC_CACHE_CHECK([dependency style of $depcc],
 1941                [am_cv_$1_dependencies_compiler_type],
 1942 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 1943   # We make a subdir and do the tests there.  Otherwise we can end up
 1944   # making bogus files that we don't know about and never remove.  For
 1945   # instance it was reported that on HP-UX the gcc test will end up
 1946   # making a dummy file named 'D' -- because '-MD' means "put the output
 1947   # in D".
 1948   rm -rf conftest.dir
 1949   mkdir conftest.dir
 1950   # Copy depcomp to subdir because otherwise we won't find it if we're
 1951   # using a relative directory.
 1952   cp "$am_depcomp" conftest.dir
 1953   cd conftest.dir
 1954   # We will build objects and dependencies in a subdirectory because
 1955   # it helps to detect inapplicable dependency modes.  For instance
 1956   # both Tru64's cc and ICC support -MD to output dependencies as a
 1957   # side effect of compilation, but ICC will put the dependencies in
 1958   # the current directory while Tru64 will put them in the object
 1959   # directory.
 1960   mkdir sub
 1961 
 1962   am_cv_$1_dependencies_compiler_type=none
 1963   if test "$am_compiler_list" = ""; then
 1964      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 1965   fi
 1966   am__universal=false
 1967   m4_case([$1], [CC],
 1968     [case " $depcc " in #(
 1969      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 1970      esac],
 1971     [CXX],
 1972     [case " $depcc " in #(
 1973      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 1974      esac])
 1975 
 1976   for depmode in $am_compiler_list; do
 1977     # Setup a source with many dependencies, because some compilers
 1978     # like to wrap large dependency lists on column 80 (with \), and
 1979     # we should not choose a depcomp mode which is confused by this.
 1980     #
 1981     # We need to recreate these files for each test, as the compiler may
 1982     # overwrite some of them when testing with obscure command lines.
 1983     # This happens at least with the AIX C compiler.
 1984     : > sub/conftest.c
 1985     for i in 1 2 3 4 5 6; do
 1986       echo '#include "conftst'$i'.h"' >> sub/conftest.c
 1987       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
 1988       # Solaris 10 /bin/sh.
 1989       echo '/* dummy */' > sub/conftst$i.h
 1990     done
 1991     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 1992 
 1993     # We check with '-c' and '-o' for the sake of the "dashmstdout"
 1994     # mode.  It turns out that the SunPro C++ compiler does not properly
 1995     # handle '-M -o', and we need to detect this.  Also, some Intel
 1996     # versions had trouble with output in subdirs.
 1997     am__obj=sub/conftest.${OBJEXT-o}
 1998     am__minus_obj="-o $am__obj"
 1999     case $depmode in
 2000     gcc)
 2001       # This depmode causes a compiler race in universal mode.
 2002       test "$am__universal" = false || continue
 2003       ;;
 2004     nosideeffect)
 2005       # After this tag, mechanisms are not by side-effect, so they'll
 2006       # only be used when explicitly requested.
 2007       if test "x$enable_dependency_tracking" = xyes; then
 2008 	continue
 2009       else
 2010 	break
 2011       fi
 2012       ;;
 2013     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
 2014       # This compiler won't grok '-c -o', but also, the minuso test has
 2015       # not run yet.  These depmodes are late enough in the game, and
 2016       # so weak that their functioning should not be impacted.
 2017       am__obj=conftest.${OBJEXT-o}
 2018       am__minus_obj=
 2019       ;;
 2020     none) break ;;
 2021     esac
 2022     if depmode=$depmode \
 2023        source=sub/conftest.c object=$am__obj \
 2024        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 2025        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 2026          >/dev/null 2>conftest.err &&
 2027        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 2028        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 2029        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 2030        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 2031       # icc doesn't choke on unknown options, it will just issue warnings
 2032       # or remarks (even with -Werror).  So we grep stderr for any message
 2033       # that says an option was ignored or not supported.
 2034       # When given -MP, icc 7.0 and 7.1 complain thusly:
 2035       #   icc: Command line warning: ignoring option '-M'; no argument required
 2036       # The diagnosis changed in icc 8.0:
 2037       #   icc: Command line remark: option '-MP' not supported
 2038       if (grep 'ignoring option' conftest.err ||
 2039           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 2040         am_cv_$1_dependencies_compiler_type=$depmode
 2041         break
 2042       fi
 2043     fi
 2044   done
 2045 
 2046   cd ..
 2047   rm -rf conftest.dir
 2048 else
 2049   am_cv_$1_dependencies_compiler_type=none
 2050 fi
 2051 ])
 2052 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 2053 AM_CONDITIONAL([am__fastdep$1], [
 2054   test "x$enable_dependency_tracking" != xno \
 2055   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 2056 ])
 2057 
 2058 
 2059 # AM_SET_DEPDIR
 2060 # -------------
 2061 # Choose a directory name for dependency files.
 2062 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 2063 AC_DEFUN([AM_SET_DEPDIR],
 2064 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 2065 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 2066 ])
 2067 
 2068 
 2069 # AM_DEP_TRACK
 2070 # ------------
 2071 AC_DEFUN([AM_DEP_TRACK],
 2072 [AC_ARG_ENABLE([dependency-tracking], [dnl
 2073 AS_HELP_STRING(
 2074   [--enable-dependency-tracking],
 2075   [do not reject slow dependency extractors])
 2076 AS_HELP_STRING(
 2077   [--disable-dependency-tracking],
 2078   [speeds up one-time build])])
 2079 if test "x$enable_dependency_tracking" != xno; then
 2080   am_depcomp="$ac_aux_dir/depcomp"
 2081   AMDEPBACKSLASH='\'
 2082   am__nodep='_no'
 2083 fi
 2084 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 2085 AC_SUBST([AMDEPBACKSLASH])dnl
 2086 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 2087 AC_SUBST([am__nodep])dnl
 2088 _AM_SUBST_NOTMAKE([am__nodep])dnl
 2089 ])
 2090 
 2091 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 2092 
 2093 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 2094 #
 2095 # This file is free software; the Free Software Foundation
 2096 # gives unlimited permission to copy and/or distribute it,
 2097 # with or without modifications, as long as this notice is preserved.
 2098 
 2099 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 2100 # ------------------------------
 2101 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 2102 [{
 2103   # Older Autoconf quotes --file arguments for eval, but not when files
 2104   # are listed without --file.  Let's play safe and only enable the eval
 2105   # if we detect the quoting.
 2106   # TODO: see whether this extra hack can be removed once we start
 2107   # requiring Autoconf 2.70 or later.
 2108   AS_CASE([$CONFIG_FILES],
 2109           [*\'*], [eval set x "$CONFIG_FILES"],
 2110           [*], [set x $CONFIG_FILES])
 2111   shift
 2112   # Used to flag and report bootstrapping failures.
 2113   am_rc=0
 2114   for am_mf
 2115   do
 2116     # Strip MF so we end up with the name of the file.
 2117     am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
 2118     # Check whether this is an Automake generated Makefile which includes
 2119     # dependency-tracking related rules and includes.
 2120     # Grep'ing the whole file directly is not great: AIX grep has a line
 2121     # limit of 2048, but all sed's we know have understand at least 4000.
 2122     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
 2123       || continue
 2124     am_dirpart=`AS_DIRNAME(["$am_mf"])`
 2125     am_filepart=`AS_BASENAME(["$am_mf"])`
 2126     AM_RUN_LOG([cd "$am_dirpart" \
 2127       && sed -e '/# am--include-marker/d' "$am_filepart" \
 2128         | $MAKE -f - am--depfiles]) || am_rc=$?
 2129   done
 2130   if test $am_rc -ne 0; then
 2131     AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
 2132     for automatic dependency tracking.  Try re-running configure with the
 2133     '--disable-dependency-tracking' option to at least be able to build
 2134     the package (albeit without support for automatic dependency tracking).])
 2135   fi
 2136   AS_UNSET([am_dirpart])
 2137   AS_UNSET([am_filepart])
 2138   AS_UNSET([am_mf])
 2139   AS_UNSET([am_rc])
 2140   rm -f conftest-deps.mk
 2141 }
 2142 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 2143 
 2144 
 2145 # AM_OUTPUT_DEPENDENCY_COMMANDS
 2146 # -----------------------------
 2147 # This macro should only be invoked once -- use via AC_REQUIRE.
 2148 #
 2149 # This code is only required when automatic dependency tracking is enabled.
 2150 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
 2151 # order to bootstrap the dependency handling code.
 2152 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 2153 [AC_CONFIG_COMMANDS([depfiles],
 2154      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 2155      [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
 2156 
 2157 # Do all the work for Automake.                             -*- Autoconf -*-
 2158 
 2159 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 2160 #
 2161 # This file is free software; the Free Software Foundation
 2162 # gives unlimited permission to copy and/or distribute it,
 2163 # with or without modifications, as long as this notice is preserved.
 2164 
 2165 # This macro actually does too much.  Some checks are only needed if
 2166 # your package does certain things.  But this isn't really a big deal.
 2167 
 2168 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
 2169 m4_define([AC_PROG_CC],
 2170 m4_defn([AC_PROG_CC])
 2171 [_AM_PROG_CC_C_O
 2172 ])
 2173 
 2174 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 2175 # AM_INIT_AUTOMAKE([OPTIONS])
 2176 # -----------------------------------------------
 2177 # The call with PACKAGE and VERSION arguments is the old style
 2178 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
 2179 # and VERSION should now be passed to AC_INIT and removed from
 2180 # the call to AM_INIT_AUTOMAKE.
 2181 # We support both call styles for the transition.  After
 2182 # the next Automake release, Autoconf can make the AC_INIT
 2183 # arguments mandatory, and then we can depend on a new Autoconf
 2184 # release and drop the old call support.
 2185 AC_DEFUN([AM_INIT_AUTOMAKE],
 2186 [AC_PREREQ([2.65])dnl
 2187 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 2188 dnl the ones we care about.
 2189 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 2190 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 2191 AC_REQUIRE([AC_PROG_INSTALL])dnl
 2192 if test "`cd $srcdir && pwd`" != "`pwd`"; then
 2193   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 2194   # is not polluted with repeated "-I."
 2195   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 2196   # test to see if srcdir already configured
 2197   if test -f $srcdir/config.status; then
 2198     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 2199   fi
 2200 fi
 2201 
 2202 # test whether we have cygpath
 2203 if test -z "$CYGPATH_W"; then
 2204   if (cygpath --version) >/dev/null 2>/dev/null; then
 2205     CYGPATH_W='cygpath -w'
 2206   else
 2207     CYGPATH_W=echo
 2208   fi
 2209 fi
 2210 AC_SUBST([CYGPATH_W])
 2211 
 2212 # Define the identity of the package.
 2213 dnl Distinguish between old-style and new-style calls.
 2214 m4_ifval([$2],
 2215 [AC_DIAGNOSE([obsolete],
 2216              [$0: two- and three-arguments forms are deprecated.])
 2217 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 2218  AC_SUBST([PACKAGE], [$1])dnl
 2219  AC_SUBST([VERSION], [$2])],
 2220 [_AM_SET_OPTIONS([$1])dnl
 2221 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 2222 m4_if(
 2223   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
 2224   [ok:ok],,
 2225   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 2226  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 2227  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 2228 
 2229 _AM_IF_OPTION([no-define],,
 2230 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
 2231  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 2232 
 2233 # Some tools Automake needs.
 2234 AC_REQUIRE([AM_SANITY_CHECK])dnl
 2235 AC_REQUIRE([AC_ARG_PROGRAM])dnl
 2236 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
 2237 AM_MISSING_PROG([AUTOCONF], [autoconf])
 2238 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
 2239 AM_MISSING_PROG([AUTOHEADER], [autoheader])
 2240 AM_MISSING_PROG([MAKEINFO], [makeinfo])
 2241 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 2242 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 2243 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 2244 # For better backward compatibility.  To be removed once Automake 1.9.x
 2245 # dies out for good.  For more background, see:
 2246 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 2247 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 2248 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 2249 # We need awk for the "check" target (and possibly the TAP driver).  The
 2250 # system "awk" is bad on some platforms.
 2251 AC_REQUIRE([AC_PROG_AWK])dnl
 2252 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 2253 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 2254 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 2255 	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 2256 			     [_AM_PROG_TAR([v7])])])
 2257 _AM_IF_OPTION([no-dependencies],,
 2258 [AC_PROVIDE_IFELSE([AC_PROG_CC],
 2259 		  [_AM_DEPENDENCIES([CC])],
 2260 		  [m4_define([AC_PROG_CC],
 2261 			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 2262 AC_PROVIDE_IFELSE([AC_PROG_CXX],
 2263 		  [_AM_DEPENDENCIES([CXX])],
 2264 		  [m4_define([AC_PROG_CXX],
 2265 			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 2266 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 2267 		  [_AM_DEPENDENCIES([OBJC])],
 2268 		  [m4_define([AC_PROG_OBJC],
 2269 			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 2270 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 2271 		  [_AM_DEPENDENCIES([OBJCXX])],
 2272 		  [m4_define([AC_PROG_OBJCXX],
 2273 			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 2274 ])
 2275 AC_REQUIRE([AM_SILENT_RULES])dnl
 2276 dnl The testsuite driver may need to know about EXEEXT, so add the
 2277 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 2278 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 2279 AC_CONFIG_COMMANDS_PRE(dnl
 2280 [m4_provide_if([_AM_COMPILER_EXEEXT],
 2281   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 2282 
 2283 # POSIX will say in a future version that running "rm -f" with no argument
 2284 # is OK; and we want to be able to make that assumption in our Makefile
 2285 # recipes.  So use an aggressive probe to check that the usage we want is
 2286 # actually supported "in the wild" to an acceptable degree.
 2287 # See automake bug#10828.
 2288 # To make any issue more visible, cause the running configure to be aborted
 2289 # by default if the 'rm' program in use doesn't match our expectations; the
 2290 # user can still override this though.
 2291 if rm -f && rm -fr && rm -rf; then : OK; else
 2292   cat >&2 <<'END'
 2293 Oops!
 2294 
 2295 Your 'rm' program seems unable to run without file operands specified
 2296 on the command line, even when the '-f' option is present.  This is contrary
 2297 to the behaviour of most rm programs out there, and not conforming with
 2298 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 2299 
 2300 Please tell bug-automake@gnu.org about your system, including the value
 2301 of your $PATH and any error possibly output before this message.  This
 2302 can help us improve future automake versions.
 2303 
 2304 END
 2305   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
 2306     echo 'Configuration will proceed anyway, since you have set the' >&2
 2307     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
 2308     echo >&2
 2309   else
 2310     cat >&2 <<'END'
 2311 Aborting the configuration process, to ensure you take notice of the issue.
 2312 
 2313 You can download and install GNU coreutils to get an 'rm' implementation
 2314 that behaves properly: <https://www.gnu.org/software/coreutils/>.
 2315 
 2316 If you want to complete the configuration process using your problematic
 2317 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
 2318 to "yes", and re-run configure.
 2319 
 2320 END
 2321     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
 2322   fi
 2323 fi
 2324 dnl The trailing newline in this macro's definition is deliberate, for
 2325 dnl backward compatibility and to allow trailing 'dnl'-style comments
 2326 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 2327 ])
 2328 
 2329 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 2330 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 2331 dnl mangled by Autoconf and run in a shell conditional statement.
 2332 m4_define([_AC_COMPILER_EXEEXT],
 2333 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 2334 
 2335 # When config.status generates a header, we must update the stamp-h file.
 2336 # This file resides in the same directory as the config header
 2337 # that is generated.  The stamp files are numbered to have different names.
 2338 
 2339 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 2340 # loop where config.status creates the headers, so we can generate
 2341 # our stamp files there.
 2342 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 2343 [# Compute $1's index in $config_headers.
 2344 _am_arg=$1
 2345 _am_stamp_count=1
 2346 for _am_header in $config_headers :; do
 2347   case $_am_header in
 2348     $_am_arg | $_am_arg:* )
 2349       break ;;
 2350     * )
 2351       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 2352   esac
 2353 done
 2354 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 2355 
 2356 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2357 #
 2358 # This file is free software; the Free Software Foundation
 2359 # gives unlimited permission to copy and/or distribute it,
 2360 # with or without modifications, as long as this notice is preserved.
 2361 
 2362 # AM_PROG_INSTALL_SH
 2363 # ------------------
 2364 # Define $install_sh.
 2365 AC_DEFUN([AM_PROG_INSTALL_SH],
 2366 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 2367 if test x"${install_sh+set}" != xset; then
 2368   case $am_aux_dir in
 2369   *\ * | *\	*)
 2370     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 2371   *)
 2372     install_sh="\${SHELL} $am_aux_dir/install-sh"
 2373   esac
 2374 fi
 2375 AC_SUBST([install_sh])])
 2376 
 2377 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
 2378 #
 2379 # This file is free software; the Free Software Foundation
 2380 # gives unlimited permission to copy and/or distribute it,
 2381 # with or without modifications, as long as this notice is preserved.
 2382 
 2383 # Check whether the underlying file-system supports filenames
 2384 # with a leading dot.  For instance MS-DOS doesn't.
 2385 AC_DEFUN([AM_SET_LEADING_DOT],
 2386 [rm -rf .tst 2>/dev/null
 2387 mkdir .tst 2>/dev/null
 2388 if test -d .tst; then
 2389   am__leading_dot=.
 2390 else
 2391   am__leading_dot=_
 2392 fi
 2393 rmdir .tst 2>/dev/null
 2394 AC_SUBST([am__leading_dot])])
 2395 
 2396 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 2397 # From Jim Meyering
 2398 
 2399 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 2400 #
 2401 # This file is free software; the Free Software Foundation
 2402 # gives unlimited permission to copy and/or distribute it,
 2403 # with or without modifications, as long as this notice is preserved.
 2404 
 2405 # AM_MAINTAINER_MODE([DEFAULT-MODE])
 2406 # ----------------------------------
 2407 # Control maintainer-specific portions of Makefiles.
 2408 # Default is to disable them, unless 'enable' is passed literally.
 2409 # For symmetry, 'disable' may be passed as well.  Anyway, the user
 2410 # can override the default with the --enable/--disable switch.
 2411 AC_DEFUN([AM_MAINTAINER_MODE],
 2412 [m4_case(m4_default([$1], [disable]),
 2413        [enable], [m4_define([am_maintainer_other], [disable])],
 2414        [disable], [m4_define([am_maintainer_other], [enable])],
 2415        [m4_define([am_maintainer_other], [enable])
 2416         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 2417 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 2418   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 2419   AC_ARG_ENABLE([maintainer-mode],
 2420     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
 2421       am_maintainer_other[ make rules and dependencies not useful
 2422       (and sometimes confusing) to the casual installer])],
 2423     [USE_MAINTAINER_MODE=$enableval],
 2424     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 2425   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 2426   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
 2427   MAINT=$MAINTAINER_MODE_TRUE
 2428   AC_SUBST([MAINT])dnl
 2429 ]
 2430 )
 2431 
 2432 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 2433 
 2434 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2435 #
 2436 # This file is free software; the Free Software Foundation
 2437 # gives unlimited permission to copy and/or distribute it,
 2438 # with or without modifications, as long as this notice is preserved.
 2439 
 2440 # AM_MAKE_INCLUDE()
 2441 # -----------------
 2442 # Check whether make has an 'include' directive that can support all
 2443 # the idioms we need for our automatic dependency tracking code.
 2444 AC_DEFUN([AM_MAKE_INCLUDE],
 2445 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
 2446 cat > confinc.mk << 'END'
 2447 am__doit:
 2448 	@echo this is the am__doit target >confinc.out
 2449 .PHONY: am__doit
 2450 END
 2451 am__include="#"
 2452 am__quote=
 2453 # BSD make does it like this.
 2454 echo '.include "confinc.mk" # ignored' > confmf.BSD
 2455 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
 2456 echo 'include confinc.mk # ignored' > confmf.GNU
 2457 _am_result=no
 2458 for s in GNU BSD; do
 2459   AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
 2460   AS_CASE([$?:`cat confinc.out 2>/dev/null`],
 2461       ['0:this is the am__doit target'],
 2462       [AS_CASE([$s],
 2463           [BSD], [am__include='.include' am__quote='"'],
 2464           [am__include='include' am__quote=''])])
 2465   if test "$am__include" != "#"; then
 2466     _am_result="yes ($s style)"
 2467     break
 2468   fi
 2469 done
 2470 rm -f confinc.* confmf.*
 2471 AC_MSG_RESULT([${_am_result}])
 2472 AC_SUBST([am__include])])
 2473 AC_SUBST([am__quote])])
 2474 
 2475 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 2476 
 2477 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
 2478 #
 2479 # This file is free software; the Free Software Foundation
 2480 # gives unlimited permission to copy and/or distribute it,
 2481 # with or without modifications, as long as this notice is preserved.
 2482 
 2483 # AM_MISSING_PROG(NAME, PROGRAM)
 2484 # ------------------------------
 2485 AC_DEFUN([AM_MISSING_PROG],
 2486 [AC_REQUIRE([AM_MISSING_HAS_RUN])
 2487 $1=${$1-"${am_missing_run}$2"}
 2488 AC_SUBST($1)])
 2489 
 2490 # AM_MISSING_HAS_RUN
 2491 # ------------------
 2492 # Define MISSING if not defined so far and test if it is modern enough.
 2493 # If it is, set am_missing_run to use it, otherwise, to nothing.
 2494 AC_DEFUN([AM_MISSING_HAS_RUN],
 2495 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 2496 AC_REQUIRE_AUX_FILE([missing])dnl
 2497 if test x"${MISSING+set}" != xset; then
 2498   case $am_aux_dir in
 2499   *\ * | *\	*)
 2500     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 2501   *)
 2502     MISSING="\${SHELL} $am_aux_dir/missing" ;;
 2503   esac
 2504 fi
 2505 # Use eval to expand $SHELL
 2506 if eval "$MISSING --is-lightweight"; then
 2507   am_missing_run="$MISSING "
 2508 else
 2509   am_missing_run=
 2510   AC_MSG_WARN(['missing' script is too old or missing])
 2511 fi
 2512 ])
 2513 
 2514 #  -*- Autoconf -*-
 2515 # Obsolete and "removed" macros, that must however still report explicit
 2516 # error messages when used, to smooth transition.
 2517 #
 2518 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 2519 #
 2520 # This file is free software; the Free Software Foundation
 2521 # gives unlimited permission to copy and/or distribute it,
 2522 # with or without modifications, as long as this notice is preserved.
 2523 
 2524 AC_DEFUN([AM_CONFIG_HEADER],
 2525 [AC_DIAGNOSE([obsolete],
 2526 ['$0': this macro is obsolete.
 2527 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
 2528 AC_CONFIG_HEADERS($@)])
 2529 
 2530 AC_DEFUN([AM_PROG_CC_STDC],
 2531 [AC_PROG_CC
 2532 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
 2533 AC_DIAGNOSE([obsolete],
 2534 ['$0': this macro is obsolete.
 2535 You should simply use the 'AC][_PROG_CC' macro instead.
 2536 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
 2537 but upon 'ac_cv_prog_cc_stdc'.])])
 2538 
 2539 AC_DEFUN([AM_C_PROTOTYPES],
 2540          [AC_FATAL([automatic de-ANSI-fication support has been removed])])
 2541 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
 2542 
 2543 # Helper functions for option handling.                     -*- Autoconf -*-
 2544 
 2545 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2546 #
 2547 # This file is free software; the Free Software Foundation
 2548 # gives unlimited permission to copy and/or distribute it,
 2549 # with or without modifications, as long as this notice is preserved.
 2550 
 2551 # _AM_MANGLE_OPTION(NAME)
 2552 # -----------------------
 2553 AC_DEFUN([_AM_MANGLE_OPTION],
 2554 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 2555 
 2556 # _AM_SET_OPTION(NAME)
 2557 # --------------------
 2558 # Set option NAME.  Presently that only means defining a flag for this option.
 2559 AC_DEFUN([_AM_SET_OPTION],
 2560 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 2561 
 2562 # _AM_SET_OPTIONS(OPTIONS)
 2563 # ------------------------
 2564 # OPTIONS is a space-separated list of Automake options.
 2565 AC_DEFUN([_AM_SET_OPTIONS],
 2566 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 2567 
 2568 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 2569 # -------------------------------------------
 2570 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 2571 AC_DEFUN([_AM_IF_OPTION],
 2572 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 2573 
 2574 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
 2575 #
 2576 # This file is free software; the Free Software Foundation
 2577 # gives unlimited permission to copy and/or distribute it,
 2578 # with or without modifications, as long as this notice is preserved.
 2579 
 2580 # _AM_PROG_CC_C_O
 2581 # ---------------
 2582 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
 2583 # to automatically call this.
 2584 AC_DEFUN([_AM_PROG_CC_C_O],
 2585 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 2586 AC_REQUIRE_AUX_FILE([compile])dnl
 2587 AC_LANG_PUSH([C])dnl
 2588 AC_CACHE_CHECK(
 2589   [whether $CC understands -c and -o together],
 2590   [am_cv_prog_cc_c_o],
 2591   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 2592   # Make sure it works both with $CC and with simple cc.
 2593   # Following AC_PROG_CC_C_O, we do the test twice because some
 2594   # compilers refuse to overwrite an existing .o file with -o,
 2595   # though they will create one.
 2596   am_cv_prog_cc_c_o=yes
 2597   for am_i in 1 2; do
 2598     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
 2599          && test -f conftest2.$ac_objext; then
 2600       : OK
 2601     else
 2602       am_cv_prog_cc_c_o=no
 2603       break
 2604     fi
 2605   done
 2606   rm -f core conftest*
 2607   unset am_i])
 2608 if test "$am_cv_prog_cc_c_o" != yes; then
 2609    # Losing compiler, so override with the script.
 2610    # FIXME: It is wrong to rewrite CC.
 2611    # But if we don't then we get into trouble of one sort or another.
 2612    # A longer-term fix would be to have automake use am__CC in this case,
 2613    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 2614    CC="$am_aux_dir/compile $CC"
 2615 fi
 2616 AC_LANG_POP([C])])
 2617 
 2618 # For backward compatibility.
 2619 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 2620 
 2621 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2622 #
 2623 # This file is free software; the Free Software Foundation
 2624 # gives unlimited permission to copy and/or distribute it,
 2625 # with or without modifications, as long as this notice is preserved.
 2626 
 2627 # AM_RUN_LOG(COMMAND)
 2628 # -------------------
 2629 # Run COMMAND, save the exit status in ac_status, and log it.
 2630 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 2631 AC_DEFUN([AM_RUN_LOG],
 2632 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 2633    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 2634    ac_status=$?
 2635    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 2636    (exit $ac_status); }])
 2637 
 2638 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 2639 
 2640 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
 2641 #
 2642 # This file is free software; the Free Software Foundation
 2643 # gives unlimited permission to copy and/or distribute it,
 2644 # with or without modifications, as long as this notice is preserved.
 2645 
 2646 # AM_SANITY_CHECK
 2647 # ---------------
 2648 AC_DEFUN([AM_SANITY_CHECK],
 2649 [AC_MSG_CHECKING([whether build environment is sane])
 2650 # Reject unsafe characters in $srcdir or the absolute working directory
 2651 # name.  Accept space and tab only in the latter.
 2652 am_lf='
 2653 '
 2654 case `pwd` in
 2655   *[[\\\"\#\$\&\'\`$am_lf]]*)
 2656     AC_MSG_ERROR([unsafe absolute working directory name]);;
 2657 esac
 2658 case $srcdir in
 2659   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
 2660     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 2661 esac
 2662 
 2663 # Do 'set' in a subshell so we don't clobber the current shell's
 2664 # arguments.  Must try -L first in case configure is actually a
 2665 # symlink; some systems play weird games with the mod time of symlinks
 2666 # (eg FreeBSD returns the mod time of the symlink's containing
 2667 # directory).
 2668 if (
 2669    am_has_slept=no
 2670    for am_try in 1 2; do
 2671      echo "timestamp, slept: $am_has_slept" > conftest.file
 2672      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 2673      if test "$[*]" = "X"; then
 2674 	# -L didn't work.
 2675 	set X `ls -t "$srcdir/configure" conftest.file`
 2676      fi
 2677      if test "$[*]" != "X $srcdir/configure conftest.file" \
 2678 	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
 2679 
 2680 	# If neither matched, then we have a broken ls.  This can happen
 2681 	# if, for instance, CONFIG_SHELL is bash and it inherits a
 2682 	# broken ls alias from the environment.  This has actually
 2683 	# happened.  Such a system could not be considered "sane".
 2684 	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 2685   alias in your environment])
 2686      fi
 2687      if test "$[2]" = conftest.file || test $am_try -eq 2; then
 2688        break
 2689      fi
 2690      # Just in case.
 2691      sleep 1
 2692      am_has_slept=yes
 2693    done
 2694    test "$[2]" = conftest.file
 2695    )
 2696 then
 2697    # Ok.
 2698    :
 2699 else
 2700    AC_MSG_ERROR([newly created file is older than distributed files!
 2701 Check your system clock])
 2702 fi
 2703 AC_MSG_RESULT([yes])
 2704 # If we didn't sleep, we still need to ensure time stamps of config.status and
 2705 # generated files are strictly newer.
 2706 am_sleep_pid=
 2707 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
 2708   ( sleep 1 ) &
 2709   am_sleep_pid=$!
 2710 fi
 2711 AC_CONFIG_COMMANDS_PRE(
 2712   [AC_MSG_CHECKING([that generated files are newer than configure])
 2713    if test -n "$am_sleep_pid"; then
 2714      # Hide warnings about reused PIDs.
 2715      wait $am_sleep_pid 2>/dev/null
 2716    fi
 2717    AC_MSG_RESULT([done])])
 2718 rm -f conftest.file
 2719 ])
 2720 
 2721 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
 2722 #
 2723 # This file is free software; the Free Software Foundation
 2724 # gives unlimited permission to copy and/or distribute it,
 2725 # with or without modifications, as long as this notice is preserved.
 2726 
 2727 # AM_SILENT_RULES([DEFAULT])
 2728 # --------------------------
 2729 # Enable less verbose build rules; with the default set to DEFAULT
 2730 # ("yes" being less verbose, "no" or empty being verbose).
 2731 AC_DEFUN([AM_SILENT_RULES],
 2732 [AC_ARG_ENABLE([silent-rules], [dnl
 2733 AS_HELP_STRING(
 2734   [--enable-silent-rules],
 2735   [less verbose build output (undo: "make V=1")])
 2736 AS_HELP_STRING(
 2737   [--disable-silent-rules],
 2738   [verbose build output (undo: "make V=0")])dnl
 2739 ])
 2740 case $enable_silent_rules in @%:@ (((
 2741   yes) AM_DEFAULT_VERBOSITY=0;;
 2742    no) AM_DEFAULT_VERBOSITY=1;;
 2743     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 2744 esac
 2745 dnl
 2746 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 2747 dnl do not support nested variable expansions.
 2748 dnl See automake bug#9928 and bug#10237.
 2749 am_make=${MAKE-make}
 2750 AC_CACHE_CHECK([whether $am_make supports nested variables],
 2751    [am_cv_make_support_nested_variables],
 2752    [if AS_ECHO([['TRUE=$(BAR$(V))
 2753 BAR0=false
 2754 BAR1=true
 2755 V=1
 2756 am__doit:
 2757 	@$(TRUE)
 2758 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 2759   am_cv_make_support_nested_variables=yes
 2760 else
 2761   am_cv_make_support_nested_variables=no
 2762 fi])
 2763 if test $am_cv_make_support_nested_variables = yes; then
 2764   dnl Using '$V' instead of '$(V)' breaks IRIX make.
 2765   AM_V='$(V)'
 2766   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 2767 else
 2768   AM_V=$AM_DEFAULT_VERBOSITY
 2769   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 2770 fi
 2771 AC_SUBST([AM_V])dnl
 2772 AM_SUBST_NOTMAKE([AM_V])dnl
 2773 AC_SUBST([AM_DEFAULT_V])dnl
 2774 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
 2775 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 2776 AM_BACKSLASH='\'
 2777 AC_SUBST([AM_BACKSLASH])dnl
 2778 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 2779 ])
 2780 
 2781 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
 2782 #
 2783 # This file is free software; the Free Software Foundation
 2784 # gives unlimited permission to copy and/or distribute it,
 2785 # with or without modifications, as long as this notice is preserved.
 2786 
 2787 # AM_PROG_INSTALL_STRIP
 2788 # ---------------------
 2789 # One issue with vendor 'install' (even GNU) is that you can't
 2790 # specify the program used to strip binaries.  This is especially
 2791 # annoying in cross-compiling environments, where the build's strip
 2792 # is unlikely to handle the host's binaries.
 2793 # Fortunately install-sh will honor a STRIPPROG variable, so we
 2794 # always use install-sh in "make install-strip", and initialize
 2795 # STRIPPROG with the value of the STRIP variable (set by the user).
 2796 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 2797 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 2798 # Installed binaries are usually stripped using 'strip' when the user
 2799 # run "make install-strip".  However 'strip' might not be the right
 2800 # tool to use in cross-compilation environments, therefore Automake
 2801 # will honor the 'STRIP' environment variable to overrule this program.
 2802 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 2803 if test "$cross_compiling" != no; then
 2804   AC_CHECK_TOOL([STRIP], [strip], :)
 2805 fi
 2806 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 2807 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 2808 
 2809 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
 2810 #
 2811 # This file is free software; the Free Software Foundation
 2812 # gives unlimited permission to copy and/or distribute it,
 2813 # with or without modifications, as long as this notice is preserved.
 2814 
 2815 # _AM_SUBST_NOTMAKE(VARIABLE)
 2816 # ---------------------------
 2817 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 2818 # This macro is traced by Automake.
 2819 AC_DEFUN([_AM_SUBST_NOTMAKE])
 2820 
 2821 # AM_SUBST_NOTMAKE(VARIABLE)
 2822 # --------------------------
 2823 # Public sister of _AM_SUBST_NOTMAKE.
 2824 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 2825 
 2826 # Check how to create a tarball.                            -*- Autoconf -*-
 2827 
 2828 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
 2829 #
 2830 # This file is free software; the Free Software Foundation
 2831 # gives unlimited permission to copy and/or distribute it,
 2832 # with or without modifications, as long as this notice is preserved.
 2833 
 2834 # _AM_PROG_TAR(FORMAT)
 2835 # --------------------
 2836 # Check how to create a tarball in format FORMAT.
 2837 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
 2838 #
 2839 # Substitute a variable $(am__tar) that is a command
 2840 # writing to stdout a FORMAT-tarball containing the directory
 2841 # $tardir.
 2842 #     tardir=directory && $(am__tar) > result.tar
 2843 #
 2844 # Substitute a variable $(am__untar) that extract such
 2845 # a tarball read from stdin.
 2846 #     $(am__untar) < result.tar
 2847 #
 2848 AC_DEFUN([_AM_PROG_TAR],
 2849 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 2850 # in the wild :-(  We should find a proper way to deprecate it ...
 2851 AC_SUBST([AMTAR], ['$${TAR-tar}'])
 2852 
 2853 # We'll loop over all known methods to create a tar archive until one works.
 2854 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 2855 
 2856 m4_if([$1], [v7],
 2857   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 2858 
 2859   [m4_case([$1],
 2860     [ustar],
 2861      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
 2862       # There is notably a 21 bits limit for the UID and the GID.  In fact,
 2863       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
 2864       # and bug#13588).
 2865       am_max_uid=2097151 # 2^21 - 1
 2866       am_max_gid=$am_max_uid
 2867       # The $UID and $GID variables are not portable, so we need to resort
 2868       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
 2869       # below are definitely unexpected, so allow the users to see them
 2870       # (that is, avoid stderr redirection).
 2871       am_uid=`id -u || echo unknown`
 2872       am_gid=`id -g || echo unknown`
 2873       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
 2874       if test $am_uid -le $am_max_uid; then
 2875          AC_MSG_RESULT([yes])
 2876       else
 2877          AC_MSG_RESULT([no])
 2878          _am_tools=none
 2879       fi
 2880       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
 2881       if test $am_gid -le $am_max_gid; then
 2882          AC_MSG_RESULT([yes])
 2883       else
 2884         AC_MSG_RESULT([no])
 2885         _am_tools=none
 2886       fi],
 2887 
 2888   [pax],
 2889     [],
 2890 
 2891   [m4_fatal([Unknown tar format])])
 2892 
 2893   AC_MSG_CHECKING([how to create a $1 tar archive])
 2894 
 2895   # Go ahead even if we have the value already cached.  We do so because we
 2896   # need to set the values for the 'am__tar' and 'am__untar' variables.
 2897   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 2898 
 2899   for _am_tool in $_am_tools; do
 2900     case $_am_tool in
 2901     gnutar)
 2902       for _am_tar in tar gnutar gtar; do
 2903         AM_RUN_LOG([$_am_tar --version]) && break
 2904       done
 2905       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 2906       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 2907       am__untar="$_am_tar -xf -"
 2908       ;;
 2909     plaintar)
 2910       # Must skip GNU tar: if it does not support --format= it doesn't create
 2911       # ustar tarball either.
 2912       (tar --version) >/dev/null 2>&1 && continue
 2913       am__tar='tar chf - "$$tardir"'
 2914       am__tar_='tar chf - "$tardir"'
 2915       am__untar='tar xf -'
 2916       ;;
 2917     pax)
 2918       am__tar='pax -L -x $1 -w "$$tardir"'
 2919       am__tar_='pax -L -x $1 -w "$tardir"'
 2920       am__untar='pax -r'
 2921       ;;
 2922     cpio)
 2923       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 2924       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 2925       am__untar='cpio -i -H $1 -d'
 2926       ;;
 2927     none)
 2928       am__tar=false
 2929       am__tar_=false
 2930       am__untar=false
 2931       ;;
 2932     esac
 2933 
 2934     # If the value was cached, stop now.  We just wanted to have am__tar
 2935     # and am__untar set.
 2936     test -n "${am_cv_prog_tar_$1}" && break
 2937 
 2938     # tar/untar a dummy directory, and stop if the command works.
 2939     rm -rf conftest.dir
 2940     mkdir conftest.dir
 2941     echo GrepMe > conftest.dir/file
 2942     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 2943     rm -rf conftest.dir
 2944     if test -s conftest.tar; then
 2945       AM_RUN_LOG([$am__untar <conftest.tar])
 2946       AM_RUN_LOG([cat conftest.dir/file])
 2947       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 2948     fi
 2949   done
 2950   rm -rf conftest.dir
 2951 
 2952   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 2953   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 2954 
 2955 AC_SUBST([am__tar])
 2956 AC_SUBST([am__untar])
 2957 ]) # _AM_PROG_TAR
 2958