"Fossies" - the Fresh Open Source Software Archive

Member "xfe-1.43.2/aclocal.m4" (24 Feb 2019, 224533 Bytes) of package /linux/privat/xfe-1.43.2.tar.gz:


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

    1 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
    2 
    3 # Copyright (C) 1996-2017 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 # codeset.m4 serial 5 (gettext-0.18.2)
   24 dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation,
   25 dnl Inc.
   26 dnl This file is free software; the Free Software Foundation
   27 dnl gives unlimited permission to copy and/or distribute it,
   28 dnl with or without modifications, as long as this notice is preserved.
   29 
   30 dnl From Bruno Haible.
   31 
   32 AC_DEFUN([AM_LANGINFO_CODESET],
   33 [
   34   AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
   35     [AC_LINK_IFELSE(
   36        [AC_LANG_PROGRAM(
   37           [[#include <langinfo.h>]],
   38           [[char* cs = nl_langinfo(CODESET); return !cs;]])],
   39        [am_cv_langinfo_codeset=yes],
   40        [am_cv_langinfo_codeset=no])
   41     ])
   42   if test $am_cv_langinfo_codeset = yes; then
   43     AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
   44       [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
   45   fi
   46 ])
   47 
   48 dnl 'extern inline' a la ISO C99.
   49 
   50 dnl Copyright 2012-2016 Free Software Foundation, Inc.
   51 dnl This file is free software; the Free Software Foundation
   52 dnl gives unlimited permission to copy and/or distribute it,
   53 dnl with or without modifications, as long as this notice is preserved.
   54 
   55 AC_DEFUN([gl_EXTERN_INLINE],
   56 [
   57   AH_VERBATIM([extern_inline],
   58 [/* Please see the Gnulib manual for how to use these macros.
   59 
   60    Suppress extern inline with HP-UX cc, as it appears to be broken; see
   61    <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
   62 
   63    Suppress extern inline with Sun C in standards-conformance mode, as it
   64    mishandles inline functions that call each other.  E.g., for 'inline void f
   65    (void) { } inline void g (void) { f (); }', c99 incorrectly complains
   66    'reference to static identifier "f" in extern inline function'.
   67    This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
   68 
   69    Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
   70    on configurations that mistakenly use 'static inline' to implement
   71    functions or macros in standard C headers like <ctype.h>.  For example,
   72    if isdigit is mistakenly implemented via a static inline function,
   73    a program containing an extern inline function that calls isdigit
   74    may not work since the C standard prohibits extern inline functions
   75    from calling static functions.  This bug is known to occur on:
   76 
   77      OS X 10.8 and earlier; see:
   78      http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
   79 
   80      DragonFly; see
   81      http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
   82 
   83      FreeBSD; see:
   84      http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
   85 
   86    OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
   87    for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
   88    Assume DragonFly and FreeBSD will be similar.  */
   89 #if (((defined __APPLE__ && defined __MACH__) \
   90       || defined __DragonFly__ || defined __FreeBSD__) \
   91      && (defined __header_inline \
   92          ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
   93             && ! defined __clang__) \
   94          : ((! defined _DONT_USE_CTYPE_INLINE_ \
   95              && (defined __GNUC__ || defined __cplusplus)) \
   96             || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
   97                 && defined __GNUC__ && ! defined __cplusplus))))
   98 # define _GL_EXTERN_INLINE_STDHEADER_BUG
   99 #endif
  100 #if ((__GNUC__ \
  101       ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
  102       : (199901L <= __STDC_VERSION__ \
  103          && !defined __HP_cc \
  104          && !defined __PGI \
  105          && !(defined __SUNPRO_C && __STDC__))) \
  106      && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
  107 # define _GL_INLINE inline
  108 # define _GL_EXTERN_INLINE extern inline
  109 # define _GL_EXTERN_INLINE_IN_USE
  110 #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
  111        && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
  112 # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
  113    /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
  114 #  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
  115 # else
  116 #  define _GL_INLINE extern inline
  117 # endif
  118 # define _GL_EXTERN_INLINE extern
  119 # define _GL_EXTERN_INLINE_IN_USE
  120 #else
  121 # define _GL_INLINE static _GL_UNUSED
  122 # define _GL_EXTERN_INLINE static _GL_UNUSED
  123 #endif
  124 
  125 /* In GCC 4.6 (inclusive) to 5.1 (exclusive),
  126    suppress bogus "no previous prototype for 'FOO'"
  127    and "no previous declaration for 'FOO'" diagnostics,
  128    when FOO is an inline function in the header; see
  129    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
  130    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.  */
  131 #if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
  132 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
  133 #  define _GL_INLINE_HEADER_CONST_PRAGMA
  134 # else
  135 #  define _GL_INLINE_HEADER_CONST_PRAGMA \
  136      _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
  137 # endif
  138 # define _GL_INLINE_HEADER_BEGIN \
  139     _Pragma ("GCC diagnostic push") \
  140     _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
  141     _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
  142     _GL_INLINE_HEADER_CONST_PRAGMA
  143 # define _GL_INLINE_HEADER_END \
  144     _Pragma ("GCC diagnostic pop")
  145 #else
  146 # define _GL_INLINE_HEADER_BEGIN
  147 # define _GL_INLINE_HEADER_END
  148 #endif])
  149 ])
  150 
  151 # fcntl-o.m4 serial 4
  152 dnl Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
  153 dnl This file is free software; the Free Software Foundation
  154 dnl gives unlimited permission to copy and/or distribute it,
  155 dnl with or without modifications, as long as this notice is preserved.
  156 
  157 dnl Written by Paul Eggert.
  158 
  159 # Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
  160 # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
  161 # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
  162 AC_DEFUN([gl_FCNTL_O_FLAGS],
  163 [
  164   dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
  165   dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
  166   dnl AC_GNU_SOURCE.
  167   m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
  168     [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
  169     [AC_REQUIRE([AC_GNU_SOURCE])])
  170 
  171   AC_CHECK_HEADERS_ONCE([unistd.h])
  172   AC_CHECK_FUNCS_ONCE([symlink])
  173   AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
  174     [AC_RUN_IFELSE(
  175        [AC_LANG_PROGRAM(
  176           [[#include <sys/types.h>
  177            #include <sys/stat.h>
  178            #if HAVE_UNISTD_H
  179            # include <unistd.h>
  180            #else /* on Windows with MSVC */
  181            # include <io.h>
  182            # include <stdlib.h>
  183            # defined sleep(n) _sleep ((n) * 1000)
  184            #endif
  185            #include <fcntl.h>
  186            #ifndef O_NOATIME
  187             #define O_NOATIME 0
  188            #endif
  189            #ifndef O_NOFOLLOW
  190             #define O_NOFOLLOW 0
  191            #endif
  192            static int const constants[] =
  193             {
  194               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
  195               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
  196             };
  197           ]],
  198           [[
  199             int result = !constants;
  200             #if HAVE_SYMLINK
  201             {
  202               static char const sym[] = "conftest.sym";
  203               if (symlink ("/dev/null", sym) != 0)
  204                 result |= 2;
  205               else
  206                 {
  207                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
  208                   if (fd >= 0)
  209                     {
  210                       close (fd);
  211                       result |= 4;
  212                     }
  213                 }
  214               if (unlink (sym) != 0 || symlink (".", sym) != 0)
  215                 result |= 2;
  216               else
  217                 {
  218                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
  219                   if (fd >= 0)
  220                     {
  221                       close (fd);
  222                       result |= 4;
  223                     }
  224                 }
  225               unlink (sym);
  226             }
  227             #endif
  228             {
  229               static char const file[] = "confdefs.h";
  230               int fd = open (file, O_RDONLY | O_NOATIME);
  231               if (fd < 0)
  232                 result |= 8;
  233               else
  234                 {
  235                   struct stat st0;
  236                   if (fstat (fd, &st0) != 0)
  237                     result |= 16;
  238                   else
  239                     {
  240                       char c;
  241                       sleep (1);
  242                       if (read (fd, &c, 1) != 1)
  243                         result |= 24;
  244                       else
  245                         {
  246                           if (close (fd) != 0)
  247                             result |= 32;
  248                           else
  249                             {
  250                               struct stat st1;
  251                               if (stat (file, &st1) != 0)
  252                                 result |= 40;
  253                               else
  254                                 if (st0.st_atime != st1.st_atime)
  255                                   result |= 64;
  256                             }
  257                         }
  258                     }
  259                 }
  260             }
  261             return result;]])],
  262        [gl_cv_header_working_fcntl_h=yes],
  263        [case $? in #(
  264         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
  265         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
  266         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
  267          *) gl_cv_header_working_fcntl_h='no';;
  268         esac],
  269        [gl_cv_header_working_fcntl_h=cross-compiling])])
  270 
  271   case $gl_cv_header_working_fcntl_h in #(
  272   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
  273   *) ac_val=1;;
  274   esac
  275   AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
  276     [Define to 1 if O_NOATIME works.])
  277 
  278   case $gl_cv_header_working_fcntl_h in #(
  279   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
  280   *) ac_val=1;;
  281   esac
  282   AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
  283     [Define to 1 if O_NOFOLLOW works.])
  284 ])
  285 
  286 # gettext.m4 serial 68 (gettext-0.19.8)
  287 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
  288 dnl This file is free software; the Free Software Foundation
  289 dnl gives unlimited permission to copy and/or distribute it,
  290 dnl with or without modifications, as long as this notice is preserved.
  291 dnl
  292 dnl This file can be used in projects which are not available under
  293 dnl the GNU General Public License or the GNU Library General Public
  294 dnl License but which still want to provide support for the GNU gettext
  295 dnl functionality.
  296 dnl Please note that the actual code of the GNU gettext library is covered
  297 dnl by the GNU Library General Public License, and the rest of the GNU
  298 dnl gettext package is covered by the GNU General Public License.
  299 dnl They are *not* in the public domain.
  300 
  301 dnl Authors:
  302 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  303 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
  304 
  305 dnl Macro to add for using GNU gettext.
  306 
  307 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
  308 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
  309 dnl    default (if it is not specified or empty) is 'no-libtool'.
  310 dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
  311 dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
  312 dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
  313 dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
  314 dnl    depending on --{enable,disable}-{shared,static} and on the presence of
  315 dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
  316 dnl    $(top_builddir)/intl/libintl.a will be created.
  317 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
  318 dnl    implementations (in libc or libintl) without the ngettext() function
  319 dnl    will be ignored.  If NEEDSYMBOL is specified and is
  320 dnl    'need-formatstring-macros', then GNU gettext implementations that don't
  321 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
  322 dnl INTLDIR is used to find the intl libraries.  If empty,
  323 dnl    the value '$(top_builddir)/intl/' is used.
  324 dnl
  325 dnl The result of the configuration is one of three cases:
  326 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
  327 dnl    and used.
  328 dnl    Catalog format: GNU --> install in $(datadir)
  329 dnl    Catalog extension: .mo after installation, .gmo in source tree
  330 dnl 2) GNU gettext has been found in the system's C library.
  331 dnl    Catalog format: GNU --> install in $(datadir)
  332 dnl    Catalog extension: .mo after installation, .gmo in source tree
  333 dnl 3) No internationalization, always use English msgid.
  334 dnl    Catalog format: none
  335 dnl    Catalog extension: none
  336 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
  337 dnl The use of .gmo is historical (it was needed to avoid overwriting the
  338 dnl GNU format catalogs when building on a platform with an X/Open gettext),
  339 dnl but we keep it in order not to force irrelevant filename changes on the
  340 dnl maintainers.
  341 dnl
  342 AC_DEFUN([AM_GNU_GETTEXT],
  343 [
  344   dnl Argument checking.
  345   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
  346     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
  347 ])])])])])
  348   ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
  349     [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
  350   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
  351     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
  352 ])])])])
  353   define([gt_included_intl],
  354     ifelse([$1], [external],
  355       ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
  356       [yes]))
  357   define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
  358   gt_NEEDS_INIT
  359   AM_GNU_GETTEXT_NEED([$2])
  360 
  361   AC_REQUIRE([AM_PO_SUBDIRS])dnl
  362   ifelse(gt_included_intl, yes, [
  363     AC_REQUIRE([AM_INTL_SUBDIR])dnl
  364   ])
  365 
  366   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  367   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  368   AC_REQUIRE([AC_LIB_RPATH])
  369 
  370   dnl Sometimes libintl requires libiconv, so first search for libiconv.
  371   dnl Ideally we would do this search only after the
  372   dnl      if test "$USE_NLS" = "yes"; then
  373   dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
  374   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
  375   dnl the configure script would need to contain the same shell code
  376   dnl again, outside any 'if'. There are two solutions:
  377   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
  378   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
  379   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
  380   dnl documented, we avoid it.
  381   ifelse(gt_included_intl, yes, , [
  382     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  383   ])
  384 
  385   dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
  386   gt_INTL_MACOSX
  387 
  388   dnl Set USE_NLS.
  389   AC_REQUIRE([AM_NLS])
  390 
  391   ifelse(gt_included_intl, yes, [
  392     BUILD_INCLUDED_LIBINTL=no
  393     USE_INCLUDED_LIBINTL=no
  394   ])
  395   LIBINTL=
  396   LTLIBINTL=
  397   POSUB=
  398 
  399   dnl Add a version number to the cache macros.
  400   case " $gt_needs " in
  401     *" need-formatstring-macros "*) gt_api_version=3 ;;
  402     *" need-ngettext "*) gt_api_version=2 ;;
  403     *) gt_api_version=1 ;;
  404   esac
  405   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
  406   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
  407 
  408   dnl If we use NLS figure out what method
  409   if test "$USE_NLS" = "yes"; then
  410     gt_use_preinstalled_gnugettext=no
  411     ifelse(gt_included_intl, yes, [
  412       AC_MSG_CHECKING([whether included gettext is requested])
  413       AC_ARG_WITH([included-gettext],
  414         [  --with-included-gettext use the GNU gettext library included here],
  415         nls_cv_force_use_gnu_gettext=$withval,
  416         nls_cv_force_use_gnu_gettext=no)
  417       AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
  418 
  419       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
  420       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
  421     ])
  422         dnl User does not insist on using GNU NLS library.  Figure out what
  423         dnl to use.  If GNU gettext is available we use this.  Else we have
  424         dnl to fall back to GNU NLS library.
  425 
  426         if test $gt_api_version -ge 3; then
  427           gt_revision_test_code='
  428 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  429 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
  430 #endif
  431 changequote(,)dnl
  432 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
  433 changequote([,])dnl
  434 '
  435         else
  436           gt_revision_test_code=
  437         fi
  438         if test $gt_api_version -ge 2; then
  439           gt_expression_test_code=' + * ngettext ("", "", 0)'
  440         else
  441           gt_expression_test_code=
  442         fi
  443 
  444         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
  445          [AC_LINK_IFELSE(
  446             [AC_LANG_PROGRAM(
  447                [[
  448 #include <libintl.h>
  449 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  450 extern int _nl_msg_cat_cntr;
  451 extern int *_nl_domain_bindings;
  452 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
  453 #else
  454 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
  455 #endif
  456 $gt_revision_test_code
  457                ]],
  458                [[
  459 bindtextdomain ("", "");
  460 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
  461                ]])],
  462             [eval "$gt_func_gnugettext_libc=yes"],
  463             [eval "$gt_func_gnugettext_libc=no"])])
  464 
  465         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
  466           dnl Sometimes libintl requires libiconv, so first search for libiconv.
  467           ifelse(gt_included_intl, yes, , [
  468             AM_ICONV_LINK
  469           ])
  470           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
  471           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
  472           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
  473           dnl even if libiconv doesn't exist.
  474           AC_LIB_LINKFLAGS_BODY([intl])
  475           AC_CACHE_CHECK([for GNU gettext in libintl],
  476             [$gt_func_gnugettext_libintl],
  477            [gt_save_CPPFLAGS="$CPPFLAGS"
  478             CPPFLAGS="$CPPFLAGS $INCINTL"
  479             gt_save_LIBS="$LIBS"
  480             LIBS="$LIBS $LIBINTL"
  481             dnl Now see whether libintl exists and does not depend on libiconv.
  482             AC_LINK_IFELSE(
  483               [AC_LANG_PROGRAM(
  484                  [[
  485 #include <libintl.h>
  486 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  487 extern int _nl_msg_cat_cntr;
  488 extern
  489 #ifdef __cplusplus
  490 "C"
  491 #endif
  492 const char *_nl_expand_alias (const char *);
  493 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
  494 #else
  495 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
  496 #endif
  497 $gt_revision_test_code
  498                  ]],
  499                  [[
  500 bindtextdomain ("", "");
  501 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
  502                  ]])],
  503               [eval "$gt_func_gnugettext_libintl=yes"],
  504               [eval "$gt_func_gnugettext_libintl=no"])
  505             dnl Now see whether libintl exists and depends on libiconv.
  506             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
  507               LIBS="$LIBS $LIBICONV"
  508               AC_LINK_IFELSE(
  509                 [AC_LANG_PROGRAM(
  510                    [[
  511 #include <libintl.h>
  512 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  513 extern int _nl_msg_cat_cntr;
  514 extern
  515 #ifdef __cplusplus
  516 "C"
  517 #endif
  518 const char *_nl_expand_alias (const char *);
  519 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
  520 #else
  521 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
  522 #endif
  523 $gt_revision_test_code
  524                    ]],
  525                    [[
  526 bindtextdomain ("", "");
  527 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
  528                    ]])],
  529                 [LIBINTL="$LIBINTL $LIBICONV"
  530                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
  531                  eval "$gt_func_gnugettext_libintl=yes"
  532                 ])
  533             fi
  534             CPPFLAGS="$gt_save_CPPFLAGS"
  535             LIBS="$gt_save_LIBS"])
  536         fi
  537 
  538         dnl If an already present or preinstalled GNU gettext() is found,
  539         dnl use it.  But if this macro is used in GNU gettext, and GNU
  540         dnl gettext is already preinstalled in libintl, we update this
  541         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
  542         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
  543            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
  544                 && test "$PACKAGE" != gettext-runtime \
  545                 && test "$PACKAGE" != gettext-tools; }; then
  546           gt_use_preinstalled_gnugettext=yes
  547         else
  548           dnl Reset the values set by searching for libintl.
  549           LIBINTL=
  550           LTLIBINTL=
  551           INCINTL=
  552         fi
  553 
  554     ifelse(gt_included_intl, yes, [
  555         if test "$gt_use_preinstalled_gnugettext" != "yes"; then
  556           dnl GNU gettext is not found in the C library.
  557           dnl Fall back on included GNU gettext library.
  558           nls_cv_use_gnu_gettext=yes
  559         fi
  560       fi
  561 
  562       if test "$nls_cv_use_gnu_gettext" = "yes"; then
  563         dnl Mark actions used to generate GNU NLS library.
  564         BUILD_INCLUDED_LIBINTL=yes
  565         USE_INCLUDED_LIBINTL=yes
  566         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
  567         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
  568         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
  569       fi
  570 
  571       CATOBJEXT=
  572       if test "$gt_use_preinstalled_gnugettext" = "yes" \
  573          || test "$nls_cv_use_gnu_gettext" = "yes"; then
  574         dnl Mark actions to use GNU gettext tools.
  575         CATOBJEXT=.gmo
  576       fi
  577     ])
  578 
  579     if test -n "$INTL_MACOSX_LIBS"; then
  580       if test "$gt_use_preinstalled_gnugettext" = "yes" \
  581          || test "$nls_cv_use_gnu_gettext" = "yes"; then
  582         dnl Some extra flags are needed during linking.
  583         LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
  584         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
  585       fi
  586     fi
  587 
  588     if test "$gt_use_preinstalled_gnugettext" = "yes" \
  589        || test "$nls_cv_use_gnu_gettext" = "yes"; then
  590       AC_DEFINE([ENABLE_NLS], [1],
  591         [Define to 1 if translation of program messages to the user's native language
  592    is requested.])
  593     else
  594       USE_NLS=no
  595     fi
  596   fi
  597 
  598   AC_MSG_CHECKING([whether to use NLS])
  599   AC_MSG_RESULT([$USE_NLS])
  600   if test "$USE_NLS" = "yes"; then
  601     AC_MSG_CHECKING([where the gettext function comes from])
  602     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
  603       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
  604         gt_source="external libintl"
  605       else
  606         gt_source="libc"
  607       fi
  608     else
  609       gt_source="included intl directory"
  610     fi
  611     AC_MSG_RESULT([$gt_source])
  612   fi
  613 
  614   if test "$USE_NLS" = "yes"; then
  615 
  616     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
  617       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
  618         AC_MSG_CHECKING([how to link with libintl])
  619         AC_MSG_RESULT([$LIBINTL])
  620         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
  621       fi
  622 
  623       dnl For backward compatibility. Some packages may be using this.
  624       AC_DEFINE([HAVE_GETTEXT], [1],
  625        [Define if the GNU gettext() function is already present or preinstalled.])
  626       AC_DEFINE([HAVE_DCGETTEXT], [1],
  627        [Define if the GNU dcgettext() function is already present or preinstalled.])
  628     fi
  629 
  630     dnl We need to process the po/ directory.
  631     POSUB=po
  632   fi
  633 
  634   ifelse(gt_included_intl, yes, [
  635     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
  636     dnl to 'yes' because some of the testsuite requires it.
  637     if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
  638       BUILD_INCLUDED_LIBINTL=yes
  639     fi
  640 
  641     dnl Make all variables we use known to autoconf.
  642     AC_SUBST([BUILD_INCLUDED_LIBINTL])
  643     AC_SUBST([USE_INCLUDED_LIBINTL])
  644     AC_SUBST([CATOBJEXT])
  645 
  646     dnl For backward compatibility. Some configure.ins may be using this.
  647     nls_cv_header_intl=
  648     nls_cv_header_libgt=
  649 
  650     dnl For backward compatibility. Some Makefiles may be using this.
  651     DATADIRNAME=share
  652     AC_SUBST([DATADIRNAME])
  653 
  654     dnl For backward compatibility. Some Makefiles may be using this.
  655     INSTOBJEXT=.mo
  656     AC_SUBST([INSTOBJEXT])
  657 
  658     dnl For backward compatibility. Some Makefiles may be using this.
  659     GENCAT=gencat
  660     AC_SUBST([GENCAT])
  661 
  662     dnl For backward compatibility. Some Makefiles may be using this.
  663     INTLOBJS=
  664     if test "$USE_INCLUDED_LIBINTL" = yes; then
  665       INTLOBJS="\$(GETTOBJS)"
  666     fi
  667     AC_SUBST([INTLOBJS])
  668 
  669     dnl Enable libtool support if the surrounding package wishes it.
  670     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
  671     AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
  672   ])
  673 
  674   dnl For backward compatibility. Some Makefiles may be using this.
  675   INTLLIBS="$LIBINTL"
  676   AC_SUBST([INTLLIBS])
  677 
  678   dnl Make all documented variables known to autoconf.
  679   AC_SUBST([LIBINTL])
  680   AC_SUBST([LTLIBINTL])
  681   AC_SUBST([POSUB])
  682 ])
  683 
  684 
  685 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
  686 m4_define([gt_NEEDS_INIT],
  687 [
  688   m4_divert_text([DEFAULTS], [gt_needs=])
  689   m4_define([gt_NEEDS_INIT], [])
  690 ])
  691 
  692 
  693 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
  694 AC_DEFUN([AM_GNU_GETTEXT_NEED],
  695 [
  696   m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
  697 ])
  698 
  699 
  700 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
  701 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
  702 
  703 
  704 dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
  705 AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
  706 
  707 # glibc2.m4 serial 3
  708 dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
  709 dnl Inc.
  710 dnl This file is free software; the Free Software Foundation
  711 dnl gives unlimited permission to copy and/or distribute it,
  712 dnl with or without modifications, as long as this notice is preserved.
  713 
  714 # Test for the GNU C Library, version 2.0 or newer.
  715 # From Bruno Haible.
  716 
  717 AC_DEFUN([gt_GLIBC2],
  718   [
  719     AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],
  720       [ac_cv_gnu_library_2],
  721       [AC_EGREP_CPP([Lucky GNU user],
  722         [
  723 #include <features.h>
  724 #ifdef __GNU_LIBRARY__
  725  #if (__GLIBC__ >= 2) && !defined __UCLIBC__
  726   Lucky GNU user
  727  #endif
  728 #endif
  729         ],
  730         [ac_cv_gnu_library_2=yes],
  731         [ac_cv_gnu_library_2=no])
  732       ]
  733     )
  734     AC_SUBST([GLIBC2])
  735     GLIBC2="$ac_cv_gnu_library_2"
  736   ]
  737 )
  738 
  739 # glibc21.m4 serial 5
  740 dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
  741 dnl Inc.
  742 dnl This file is free software; the Free Software Foundation
  743 dnl gives unlimited permission to copy and/or distribute it,
  744 dnl with or without modifications, as long as this notice is preserved.
  745 
  746 # Test for the GNU C Library, version 2.1 or newer, or uClibc.
  747 # From Bruno Haible.
  748 
  749 AC_DEFUN([gl_GLIBC21],
  750   [
  751     AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
  752       [ac_cv_gnu_library_2_1],
  753       [AC_EGREP_CPP([Lucky],
  754         [
  755 #include <features.h>
  756 #ifdef __GNU_LIBRARY__
  757  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  758   Lucky GNU user
  759  #endif
  760 #endif
  761 #ifdef __UCLIBC__
  762  Lucky user
  763 #endif
  764         ],
  765         [ac_cv_gnu_library_2_1=yes],
  766         [ac_cv_gnu_library_2_1=no])
  767       ]
  768     )
  769     AC_SUBST([GLIBC21])
  770     GLIBC21="$ac_cv_gnu_library_2_1"
  771   ]
  772 )
  773 
  774 # iconv.m4 serial 19 (gettext-0.18.2)
  775 dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
  776 dnl This file is free software; the Free Software Foundation
  777 dnl gives unlimited permission to copy and/or distribute it,
  778 dnl with or without modifications, as long as this notice is preserved.
  779 
  780 dnl From Bruno Haible.
  781 
  782 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
  783 [
  784   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  785   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  786   AC_REQUIRE([AC_LIB_RPATH])
  787 
  788   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  789   dnl accordingly.
  790   AC_LIB_LINKFLAGS_BODY([iconv])
  791 ])
  792 
  793 AC_DEFUN([AM_ICONV_LINK],
  794 [
  795   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
  796   dnl those with the standalone portable GNU libiconv installed).
  797   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
  798 
  799   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  800   dnl accordingly.
  801   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  802 
  803   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
  804   dnl because if the user has installed libiconv and not disabled its use
  805   dnl via --without-libiconv-prefix, he wants to use it. The first
  806   dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
  807   am_save_CPPFLAGS="$CPPFLAGS"
  808   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
  809 
  810   AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
  811     am_cv_func_iconv="no, consider installing GNU libiconv"
  812     am_cv_lib_iconv=no
  813     AC_LINK_IFELSE(
  814       [AC_LANG_PROGRAM(
  815          [[
  816 #include <stdlib.h>
  817 #include <iconv.h>
  818          ]],
  819          [[iconv_t cd = iconv_open("","");
  820            iconv(cd,NULL,NULL,NULL,NULL);
  821            iconv_close(cd);]])],
  822       [am_cv_func_iconv=yes])
  823     if test "$am_cv_func_iconv" != yes; then
  824       am_save_LIBS="$LIBS"
  825       LIBS="$LIBS $LIBICONV"
  826       AC_LINK_IFELSE(
  827         [AC_LANG_PROGRAM(
  828            [[
  829 #include <stdlib.h>
  830 #include <iconv.h>
  831            ]],
  832            [[iconv_t cd = iconv_open("","");
  833              iconv(cd,NULL,NULL,NULL,NULL);
  834              iconv_close(cd);]])],
  835         [am_cv_lib_iconv=yes]
  836         [am_cv_func_iconv=yes])
  837       LIBS="$am_save_LIBS"
  838     fi
  839   ])
  840   if test "$am_cv_func_iconv" = yes; then
  841     AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
  842       dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
  843       dnl Solaris 10.
  844       am_save_LIBS="$LIBS"
  845       if test $am_cv_lib_iconv = yes; then
  846         LIBS="$LIBS $LIBICONV"
  847       fi
  848       am_cv_func_iconv_works=no
  849       for ac_iconv_const in '' 'const'; do
  850         AC_RUN_IFELSE(
  851           [AC_LANG_PROGRAM(
  852              [[
  853 #include <iconv.h>
  854 #include <string.h>
  855 
  856 #ifndef ICONV_CONST
  857 # define ICONV_CONST $ac_iconv_const
  858 #endif
  859              ]],
  860              [[int result = 0;
  861   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
  862      returns.  */
  863   {
  864     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
  865     if (cd_utf8_to_88591 != (iconv_t)(-1))
  866       {
  867         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
  868         char buf[10];
  869         ICONV_CONST char *inptr = input;
  870         size_t inbytesleft = strlen (input);
  871         char *outptr = buf;
  872         size_t outbytesleft = sizeof (buf);
  873         size_t res = iconv (cd_utf8_to_88591,
  874                             &inptr, &inbytesleft,
  875                             &outptr, &outbytesleft);
  876         if (res == 0)
  877           result |= 1;
  878         iconv_close (cd_utf8_to_88591);
  879       }
  880   }
  881   /* Test against Solaris 10 bug: Failures are not distinguishable from
  882      successful returns.  */
  883   {
  884     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
  885     if (cd_ascii_to_88591 != (iconv_t)(-1))
  886       {
  887         static ICONV_CONST char input[] = "\263";
  888         char buf[10];
  889         ICONV_CONST char *inptr = input;
  890         size_t inbytesleft = strlen (input);
  891         char *outptr = buf;
  892         size_t outbytesleft = sizeof (buf);
  893         size_t res = iconv (cd_ascii_to_88591,
  894                             &inptr, &inbytesleft,
  895                             &outptr, &outbytesleft);
  896         if (res == 0)
  897           result |= 2;
  898         iconv_close (cd_ascii_to_88591);
  899       }
  900   }
  901   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
  902   {
  903     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
  904     if (cd_88591_to_utf8 != (iconv_t)(-1))
  905       {
  906         static ICONV_CONST char input[] = "\304";
  907         static char buf[2] = { (char)0xDE, (char)0xAD };
  908         ICONV_CONST char *inptr = input;
  909         size_t inbytesleft = 1;
  910         char *outptr = buf;
  911         size_t outbytesleft = 1;
  912         size_t res = iconv (cd_88591_to_utf8,
  913                             &inptr, &inbytesleft,
  914                             &outptr, &outbytesleft);
  915         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
  916           result |= 4;
  917         iconv_close (cd_88591_to_utf8);
  918       }
  919   }
  920 #if 0 /* This bug could be worked around by the caller.  */
  921   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
  922   {
  923     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
  924     if (cd_88591_to_utf8 != (iconv_t)(-1))
  925       {
  926         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
  927         char buf[50];
  928         ICONV_CONST char *inptr = input;
  929         size_t inbytesleft = strlen (input);
  930         char *outptr = buf;
  931         size_t outbytesleft = sizeof (buf);
  932         size_t res = iconv (cd_88591_to_utf8,
  933                             &inptr, &inbytesleft,
  934                             &outptr, &outbytesleft);
  935         if ((int)res > 0)
  936           result |= 8;
  937         iconv_close (cd_88591_to_utf8);
  938       }
  939   }
  940 #endif
  941   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
  942      provided.  */
  943   if (/* Try standardized names.  */
  944       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
  945       /* Try IRIX, OSF/1 names.  */
  946       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
  947       /* Try AIX names.  */
  948       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
  949       /* Try HP-UX names.  */
  950       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
  951     result |= 16;
  952   return result;
  953 ]])],
  954           [am_cv_func_iconv_works=yes], ,
  955           [case "$host_os" in
  956              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
  957              *)            am_cv_func_iconv_works="guessing yes" ;;
  958            esac])
  959         test "$am_cv_func_iconv_works" = no || break
  960       done
  961       LIBS="$am_save_LIBS"
  962     ])
  963     case "$am_cv_func_iconv_works" in
  964       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
  965       *)   am_func_iconv=yes ;;
  966     esac
  967   else
  968     am_func_iconv=no am_cv_lib_iconv=no
  969   fi
  970   if test "$am_func_iconv" = yes; then
  971     AC_DEFINE([HAVE_ICONV], [1],
  972       [Define if you have the iconv() function and it works.])
  973   fi
  974   if test "$am_cv_lib_iconv" = yes; then
  975     AC_MSG_CHECKING([how to link with libiconv])
  976     AC_MSG_RESULT([$LIBICONV])
  977   else
  978     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
  979     dnl either.
  980     CPPFLAGS="$am_save_CPPFLAGS"
  981     LIBICONV=
  982     LTLIBICONV=
  983   fi
  984   AC_SUBST([LIBICONV])
  985   AC_SUBST([LTLIBICONV])
  986 ])
  987 
  988 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
  989 dnl avoid warnings like
  990 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
  991 dnl This is tricky because of the way 'aclocal' is implemented:
  992 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
  993 dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
  994 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
  995 dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
  996 dnl   warnings.
  997 m4_define([gl_iconv_AC_DEFUN],
  998   m4_version_prereq([2.64],
  999     [[AC_DEFUN_ONCE(
 1000         [$1], [$2])]],
 1001     [m4_ifdef([gl_00GNULIB],
 1002        [[AC_DEFUN_ONCE(
 1003            [$1], [$2])]],
 1004        [[AC_DEFUN(
 1005            [$1], [$2])]])]))
 1006 gl_iconv_AC_DEFUN([AM_ICONV],
 1007 [
 1008   AM_ICONV_LINK
 1009   if test "$am_cv_func_iconv" = yes; then
 1010     AC_MSG_CHECKING([for iconv declaration])
 1011     AC_CACHE_VAL([am_cv_proto_iconv], [
 1012       AC_COMPILE_IFELSE(
 1013         [AC_LANG_PROGRAM(
 1014            [[
 1015 #include <stdlib.h>
 1016 #include <iconv.h>
 1017 extern
 1018 #ifdef __cplusplus
 1019 "C"
 1020 #endif
 1021 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
 1022 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 1023 #else
 1024 size_t iconv();
 1025 #endif
 1026            ]],
 1027            [[]])],
 1028         [am_cv_proto_iconv_arg1=""],
 1029         [am_cv_proto_iconv_arg1="const"])
 1030       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
 1031     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 1032     AC_MSG_RESULT([
 1033          $am_cv_proto_iconv])
 1034     AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
 1035       [Define as const if the declaration of iconv() needs const.])
 1036     dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
 1037     m4_ifdef([gl_ICONV_H_DEFAULTS],
 1038       [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
 1039        if test -n "$am_cv_proto_iconv_arg1"; then
 1040          ICONV_CONST="const"
 1041        fi
 1042       ])
 1043   fi
 1044 ])
 1045 
 1046 # intdiv0.m4 serial 6 (gettext-0.18.2)
 1047 dnl Copyright (C) 2002, 2007-2008, 2010-2016 Free Software Foundation, Inc.
 1048 dnl This file is free software; the Free Software Foundation
 1049 dnl gives unlimited permission to copy and/or distribute it,
 1050 dnl with or without modifications, as long as this notice is preserved.
 1051 
 1052 dnl From Bruno Haible.
 1053 
 1054 AC_DEFUN([gt_INTDIV0],
 1055 [
 1056   AC_REQUIRE([AC_PROG_CC])dnl
 1057   AC_REQUIRE([AC_CANONICAL_HOST])dnl
 1058 
 1059   AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
 1060     gt_cv_int_divbyzero_sigfpe,
 1061     [
 1062       gt_cv_int_divbyzero_sigfpe=
 1063 changequote(,)dnl
 1064       case "$host_os" in
 1065         macos* | darwin[6-9]* | darwin[1-9][0-9]*)
 1066           # On Mac OS X 10.2 or newer, just assume the same as when cross-
 1067           # compiling. If we were to perform the real test, 1 Crash Report
 1068           # dialog window would pop up.
 1069           case "$host_cpu" in
 1070             i[34567]86 | x86_64)
 1071               gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
 1072           esac
 1073           ;;
 1074       esac
 1075 changequote([,])dnl
 1076       if test -z "$gt_cv_int_divbyzero_sigfpe"; then
 1077         AC_RUN_IFELSE(
 1078           [AC_LANG_SOURCE([[
 1079 #include <stdlib.h>
 1080 #include <signal.h>
 1081 
 1082 static void
 1083 sigfpe_handler (int sig)
 1084 {
 1085   /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
 1086   _exit (sig != SIGFPE);
 1087 }
 1088 
 1089 int x = 1;
 1090 int y = 0;
 1091 int z;
 1092 int nan;
 1093 
 1094 int main ()
 1095 {
 1096   signal (SIGFPE, sigfpe_handler);
 1097 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
 1098 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
 1099   signal (SIGTRAP, sigfpe_handler);
 1100 #endif
 1101 /* Linux/SPARC yields signal SIGILL.  */
 1102 #if defined (__sparc__) && defined (__linux__)
 1103   signal (SIGILL, sigfpe_handler);
 1104 #endif
 1105 
 1106   z = x / y;
 1107   nan = y / y;
 1108   exit (2);
 1109 }
 1110 ]])],
 1111           [gt_cv_int_divbyzero_sigfpe=yes],
 1112           [gt_cv_int_divbyzero_sigfpe=no],
 1113           [
 1114             # Guess based on the CPU.
 1115 changequote(,)dnl
 1116             case "$host_cpu" in
 1117               alpha* | i[34567]86 | x86_64 | m68k | s390*)
 1118                 gt_cv_int_divbyzero_sigfpe="guessing yes";;
 1119               *)
 1120                 gt_cv_int_divbyzero_sigfpe="guessing no";;
 1121             esac
 1122 changequote([,])dnl
 1123           ])
 1124       fi
 1125     ])
 1126   case "$gt_cv_int_divbyzero_sigfpe" in
 1127     *yes) value=1;;
 1128     *) value=0;;
 1129   esac
 1130   AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
 1131     [Define if integer division by zero raises signal SIGFPE.])
 1132 ])
 1133 
 1134 # intl.m4 serial 29 (gettext-0.19)
 1135 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
 1136 dnl This file is free software; the Free Software Foundation
 1137 dnl gives unlimited permission to copy and/or distribute it,
 1138 dnl with or without modifications, as long as this notice is preserved.
 1139 dnl
 1140 dnl This file can be used in projects which are not available under
 1141 dnl the GNU General Public License or the GNU Library General Public
 1142 dnl License but which still want to provide support for the GNU gettext
 1143 dnl functionality.
 1144 dnl Please note that the actual code of the GNU gettext library is covered
 1145 dnl by the GNU Library General Public License, and the rest of the GNU
 1146 dnl gettext package is covered by the GNU General Public License.
 1147 dnl They are *not* in the public domain.
 1148 
 1149 dnl Authors:
 1150 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 1151 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2009.
 1152 
 1153 AC_PREREQ([2.60])
 1154 
 1155 dnl Checks for all prerequisites of the intl subdirectory,
 1156 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
 1157 dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
 1158 AC_DEFUN([AM_INTL_SUBDIR],
 1159 [
 1160   AC_REQUIRE([AC_PROG_INSTALL])dnl
 1161   AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 1162   AC_REQUIRE([AC_PROG_CC])dnl
 1163   AC_REQUIRE([AC_CANONICAL_HOST])dnl
 1164   AC_REQUIRE([gt_GLIBC2])dnl
 1165   AC_REQUIRE([AC_PROG_RANLIB])dnl
 1166   AC_REQUIRE([gl_VISIBILITY])dnl
 1167   AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
 1168   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
 1169   AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
 1170   AC_REQUIRE([gt_TYPE_WINT_T])dnl
 1171   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
 1172   AC_REQUIRE([gt_TYPE_INTMAX_T])
 1173   AC_REQUIRE([gt_PRINTF_POSIX])
 1174   AC_REQUIRE([gl_GLIBC21])dnl
 1175   AC_REQUIRE([gl_XSIZE])dnl
 1176   AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
 1177   AC_REQUIRE([gt_INTL_MACOSX])dnl
 1178   AC_REQUIRE([gl_EXTERN_INLINE])dnl
 1179   AC_REQUIRE([gt_GL_ATTRIBUTE])dnl
 1180 
 1181   dnl Support for automake's --enable-silent-rules.
 1182   case "$enable_silent_rules" in
 1183     yes) INTL_DEFAULT_VERBOSITY=0;;
 1184     no)  INTL_DEFAULT_VERBOSITY=1;;
 1185     *)   INTL_DEFAULT_VERBOSITY=1;;
 1186   esac
 1187   AC_SUBST([INTL_DEFAULT_VERBOSITY])
 1188 
 1189   AC_CHECK_TYPE([ptrdiff_t], ,
 1190     [AC_DEFINE([ptrdiff_t], [long],
 1191        [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
 1192     ])
 1193   AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h])
 1194   AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
 1195     snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
 1196 
 1197   dnl Use the _snprintf function only if it is declared (because on NetBSD it
 1198   dnl is defined as a weak alias of snprintf; we prefer to use the latter).
 1199   AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include <stdio.h>])
 1200 
 1201   dnl Use the *_unlocked functions only if they are declared.
 1202   dnl (because some of them were defined without being declared in Solaris
 1203   dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
 1204   dnl on Solaris 2.5.1 to run on Solaris 2.6).
 1205   AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>])
 1206 
 1207   case $gt_cv_func_printf_posix in
 1208     *yes) HAVE_POSIX_PRINTF=1 ;;
 1209     *) HAVE_POSIX_PRINTF=0 ;;
 1210   esac
 1211   AC_SUBST([HAVE_POSIX_PRINTF])
 1212   if test "$ac_cv_func_asprintf" = yes; then
 1213     HAVE_ASPRINTF=1
 1214   else
 1215     HAVE_ASPRINTF=0
 1216   fi
 1217   AC_SUBST([HAVE_ASPRINTF])
 1218   if test "$ac_cv_func_snprintf" = yes; then
 1219     HAVE_SNPRINTF=1
 1220   else
 1221     HAVE_SNPRINTF=0
 1222   fi
 1223   AC_SUBST([HAVE_SNPRINTF])
 1224   if test "$ac_cv_func_newlocale" = yes; then
 1225     HAVE_NEWLOCALE=1
 1226   else
 1227     HAVE_NEWLOCALE=0
 1228   fi
 1229   AC_SUBST([HAVE_NEWLOCALE])
 1230   if test "$ac_cv_func_wprintf" = yes; then
 1231     HAVE_WPRINTF=1
 1232   else
 1233     HAVE_WPRINTF=0
 1234   fi
 1235   AC_SUBST([HAVE_WPRINTF])
 1236 
 1237   AM_LANGINFO_CODESET
 1238   gt_LC_MESSAGES
 1239 
 1240   dnl Compilation on mingw and Cygwin needs special Makefile rules, because
 1241   dnl 1. when we install a shared library, we must arrange to export
 1242   dnl    auxiliary pointer variables for every exported variable,
 1243   dnl 2. when we install a shared library and a static library simultaneously,
 1244   dnl    the include file specifies __declspec(dllimport) and therefore we
 1245   dnl    must arrange to define the auxiliary pointer variables for the
 1246   dnl    exported variables _also_ in the static library.
 1247   if test "$enable_shared" = yes; then
 1248     case "$host_os" in
 1249       mingw* | cygwin*) is_woe32dll=yes ;;
 1250       *) is_woe32dll=no ;;
 1251     esac
 1252   else
 1253     is_woe32dll=no
 1254   fi
 1255   WOE32DLL=$is_woe32dll
 1256   AC_SUBST([WOE32DLL])
 1257 
 1258   dnl On mingw and Cygwin, we can activate special Makefile rules which add
 1259   dnl version information to the shared libraries and executables.
 1260   case "$host_os" in
 1261     mingw* | cygwin*) is_woe32=yes ;;
 1262     *) is_woe32=no ;;
 1263   esac
 1264   WOE32=$is_woe32
 1265   AC_SUBST([WOE32])
 1266   if test $WOE32 = yes; then
 1267     dnl Check for a program that compiles Windows resource files.
 1268     AC_CHECK_TOOL([WINDRES], [windres])
 1269   fi
 1270 
 1271   dnl Determine whether when creating a library, "-lc" should be passed to
 1272   dnl libtool or not. On many platforms, it is required for the libtool option
 1273   dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
 1274   dnl in the *.la files - makes it impossible to create multithreaded programs,
 1275   dnl because libtool also reorders the -lc to come before the -pthread, and
 1276   dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>.
 1277   case "$host_os" in
 1278     hpux*) LTLIBC="" ;;
 1279     *)     LTLIBC="-lc" ;;
 1280   esac
 1281   AC_SUBST([LTLIBC])
 1282 
 1283   dnl Rename some macros and functions used for locking.
 1284   AH_BOTTOM([
 1285 #define __libc_lock_t                   gl_lock_t
 1286 #define __libc_lock_define              gl_lock_define
 1287 #define __libc_lock_define_initialized  gl_lock_define_initialized
 1288 #define __libc_lock_init                gl_lock_init
 1289 #define __libc_lock_lock                gl_lock_lock
 1290 #define __libc_lock_unlock              gl_lock_unlock
 1291 #define __libc_lock_recursive_t                   gl_recursive_lock_t
 1292 #define __libc_lock_define_recursive              gl_recursive_lock_define
 1293 #define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
 1294 #define __libc_lock_init_recursive                gl_recursive_lock_init
 1295 #define __libc_lock_lock_recursive                gl_recursive_lock_lock
 1296 #define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
 1297 #define glthread_in_use  libintl_thread_in_use
 1298 #define glthread_lock_init_func     libintl_lock_init_func
 1299 #define glthread_lock_lock_func     libintl_lock_lock_func
 1300 #define glthread_lock_unlock_func   libintl_lock_unlock_func
 1301 #define glthread_lock_destroy_func  libintl_lock_destroy_func
 1302 #define glthread_rwlock_init_multithreaded     libintl_rwlock_init_multithreaded
 1303 #define glthread_rwlock_init_func              libintl_rwlock_init_func
 1304 #define glthread_rwlock_rdlock_multithreaded   libintl_rwlock_rdlock_multithreaded
 1305 #define glthread_rwlock_rdlock_func            libintl_rwlock_rdlock_func
 1306 #define glthread_rwlock_wrlock_multithreaded   libintl_rwlock_wrlock_multithreaded
 1307 #define glthread_rwlock_wrlock_func            libintl_rwlock_wrlock_func
 1308 #define glthread_rwlock_unlock_multithreaded   libintl_rwlock_unlock_multithreaded
 1309 #define glthread_rwlock_unlock_func            libintl_rwlock_unlock_func
 1310 #define glthread_rwlock_destroy_multithreaded  libintl_rwlock_destroy_multithreaded
 1311 #define glthread_rwlock_destroy_func           libintl_rwlock_destroy_func
 1312 #define glthread_recursive_lock_init_multithreaded     libintl_recursive_lock_init_multithreaded
 1313 #define glthread_recursive_lock_init_func              libintl_recursive_lock_init_func
 1314 #define glthread_recursive_lock_lock_multithreaded     libintl_recursive_lock_lock_multithreaded
 1315 #define glthread_recursive_lock_lock_func              libintl_recursive_lock_lock_func
 1316 #define glthread_recursive_lock_unlock_multithreaded   libintl_recursive_lock_unlock_multithreaded
 1317 #define glthread_recursive_lock_unlock_func            libintl_recursive_lock_unlock_func
 1318 #define glthread_recursive_lock_destroy_multithreaded  libintl_recursive_lock_destroy_multithreaded
 1319 #define glthread_recursive_lock_destroy_func           libintl_recursive_lock_destroy_func
 1320 #define glthread_once_func            libintl_once_func
 1321 #define glthread_once_singlethreaded  libintl_once_singlethreaded
 1322 #define glthread_once_multithreaded   libintl_once_multithreaded
 1323 ])
 1324 ])
 1325 
 1326 
 1327 dnl Checks for the core files of the intl subdirectory:
 1328 dnl   dcigettext.c
 1329 dnl   eval-plural.h
 1330 dnl   explodename.c
 1331 dnl   finddomain.c
 1332 dnl   gettextP.h
 1333 dnl   gmo.h
 1334 dnl   hash-string.h hash-string.c
 1335 dnl   l10nflist.c
 1336 dnl   libgnuintl.h.in (except the *printf stuff)
 1337 dnl   loadinfo.h
 1338 dnl   loadmsgcat.c
 1339 dnl   localealias.c
 1340 dnl   log.c
 1341 dnl   plural-exp.h plural-exp.c
 1342 dnl   plural.y
 1343 dnl Used by libglocale.
 1344 AC_DEFUN([gt_INTL_SUBDIR_CORE],
 1345 [
 1346   AC_REQUIRE([AC_C_INLINE])dnl
 1347   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 1348   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
 1349   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 1350   AC_REQUIRE([AC_FUNC_MMAP])dnl
 1351   AC_REQUIRE([gt_INTDIV0])dnl
 1352   AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
 1353   AC_REQUIRE([gt_INTTYPES_PRI])dnl
 1354   AC_REQUIRE([gl_LOCK])dnl
 1355 
 1356   AC_LINK_IFELSE(
 1357     [AC_LANG_PROGRAM(
 1358        [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]],
 1359        [[]])],
 1360     [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
 1361        [Define to 1 if the compiler understands __builtin_expect.])])
 1362 
 1363   AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
 1364   AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
 1365     stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \
 1366     argz_stringify argz_next __fsetlocking])
 1367 
 1368   dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
 1369   dnl it nor the equivalent.
 1370   if test $ac_cv_func_uselocale = yes; then
 1371     AC_CHECK_FUNCS([getlocalename_l])
 1372   fi
 1373 
 1374   dnl Use the *_unlocked functions only if they are declared.
 1375   dnl (because some of them were defined without being declared in Solaris
 1376   dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
 1377   dnl on Solaris 2.5.1 to run on Solaris 2.6).
 1378   AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include <stdio.h>])
 1379 
 1380   AM_ICONV
 1381 
 1382   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
 1383   dnl because plural.y uses bison specific features. It requires at least
 1384   dnl bison-2.7 for %define api.pure.
 1385   dnl bison is only needed for the maintainer (who touches plural.y). But in
 1386   dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
 1387   dnl the rule in general Makefile. Now, some people carelessly touch the
 1388   dnl files or have a broken "make" program, hence the plural.c rule will
 1389   dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
 1390   dnl present or too old.
 1391   AC_CHECK_PROGS([INTLBISON], [bison])
 1392   if test -z "$INTLBISON"; then
 1393     ac_verc_fail=yes
 1394   else
 1395     dnl Found it, now check the version.
 1396     AC_MSG_CHECKING([version of bison])
 1397 changequote(<<,>>)dnl
 1398     ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
 1399     case $ac_prog_version in
 1400       '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
 1401       2.[7-9]* | [3-9].*)
 1402 changequote([,])dnl
 1403          ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
 1404       *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 1405     esac
 1406     AC_MSG_RESULT([$ac_prog_version])
 1407   fi
 1408   if test $ac_verc_fail = yes; then
 1409     INTLBISON=:
 1410   fi
 1411 ])
 1412 
 1413 dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from
 1414 dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib.
 1415 AC_DEFUN([gt_GL_ATTRIBUTE], [
 1416   m4_ifndef([gl_[]COMMON],
 1417     AH_VERBATIM([gt_gl_attribute],
 1418 [/* Define as a marker that can be attached to declarations that might not
 1419     be used.  This helps to reduce warnings, such as from
 1420     GCC -Wunused-parameter.  */
 1421 #ifndef _GL_UNUSED
 1422 # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
 1423 #  define _GL_UNUSED __attribute__ ((__unused__))
 1424 # else
 1425 #  define _GL_UNUSED
 1426 # endif
 1427 #endif
 1428 
 1429 /* The __pure__ attribute was added in gcc 2.96.  */
 1430 #ifndef _GL_ATTRIBUTE_PURE
 1431 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
 1432 #  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
 1433 # else
 1434 #  define _GL_ATTRIBUTE_PURE /* empty */
 1435 # endif
 1436 #endif
 1437 ]))])
 1438 
 1439 # intlmacosx.m4 serial 5 (gettext-0.18.2)
 1440 dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
 1441 dnl This file is free software; the Free Software Foundation
 1442 dnl gives unlimited permission to copy and/or distribute it,
 1443 dnl with or without modifications, as long as this notice is preserved.
 1444 dnl
 1445 dnl This file can be used in projects which are not available under
 1446 dnl the GNU General Public License or the GNU Library General Public
 1447 dnl License but which still want to provide support for the GNU gettext
 1448 dnl functionality.
 1449 dnl Please note that the actual code of the GNU gettext library is covered
 1450 dnl by the GNU Library General Public License, and the rest of the GNU
 1451 dnl gettext package is covered by the GNU General Public License.
 1452 dnl They are *not* in the public domain.
 1453 
 1454 dnl Checks for special options needed on Mac OS X.
 1455 dnl Defines INTL_MACOSX_LIBS.
 1456 AC_DEFUN([gt_INTL_MACOSX],
 1457 [
 1458   dnl Check for API introduced in Mac OS X 10.2.
 1459   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
 1460     [gt_cv_func_CFPreferencesCopyAppValue],
 1461     [gt_save_LIBS="$LIBS"
 1462      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
 1463      AC_LINK_IFELSE(
 1464        [AC_LANG_PROGRAM(
 1465           [[#include <CoreFoundation/CFPreferences.h>]],
 1466           [[CFPreferencesCopyAppValue(NULL, NULL)]])],
 1467        [gt_cv_func_CFPreferencesCopyAppValue=yes],
 1468        [gt_cv_func_CFPreferencesCopyAppValue=no])
 1469      LIBS="$gt_save_LIBS"])
 1470   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
 1471     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
 1472       [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
 1473   fi
 1474   dnl Check for API introduced in Mac OS X 10.3.
 1475   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
 1476     [gt_save_LIBS="$LIBS"
 1477      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
 1478      AC_LINK_IFELSE(
 1479        [AC_LANG_PROGRAM(
 1480           [[#include <CoreFoundation/CFLocale.h>]],
 1481           [[CFLocaleCopyCurrent();]])],
 1482        [gt_cv_func_CFLocaleCopyCurrent=yes],
 1483        [gt_cv_func_CFLocaleCopyCurrent=no])
 1484      LIBS="$gt_save_LIBS"])
 1485   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 1486     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
 1487       [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
 1488   fi
 1489   INTL_MACOSX_LIBS=
 1490   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 1491     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
 1492   fi
 1493   AC_SUBST([INTL_MACOSX_LIBS])
 1494 ])
 1495 
 1496 
 1497 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 1498 # serial 42 IT_PROG_INTLTOOL
 1499 AC_DEFUN([IT_PROG_INTLTOOL], [
 1500 AC_PREREQ([2.50])dnl
 1501 AC_REQUIRE([AM_NLS])dnl
 1502 
 1503 case "$am__api_version" in
 1504     1.[01234])
 1505 	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 1506     ;;
 1507     *)
 1508     ;;
 1509 esac
 1510 
 1511 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 1512 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 1513 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 1514 if test -n "$1"; then
 1515     AC_MSG_CHECKING([for intltool >= $1])
 1516     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 1517     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 1518 	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 1519 fi
 1520 
 1521 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 1522 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 1523 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 1524 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 1525     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 1526 fi
 1527 
 1528 if test -z "$AM_DEFAULT_VERBOSITY"; then
 1529   AM_DEFAULT_VERBOSITY=1
 1530 fi
 1531 AC_SUBST([AM_DEFAULT_VERBOSITY])
 1532 
 1533 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
 1534 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
 1535 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
 1536 AC_SUBST(INTLTOOL_V_MERGE)
 1537 AC_SUBST(INTLTOOL__v_MERGE_)
 1538 AC_SUBST(INTLTOOL__v_MERGE_0)
 1539 
 1540 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
 1541 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
 1542 intltool__v_merge_options_0='-q'
 1543 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
 1544 AC_SUBST(intltool__v_merge_options_)
 1545 AC_SUBST(intltool__v_merge_options_0)
 1546 
 1547   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1548 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1549      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1550      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1551       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
 1552      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1553    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1554     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1555 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1556        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1557       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1558 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
 1559       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
 1560 else
 1561       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
 1562 fi
 1563       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1564       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1565     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1566   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1567     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 1568     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 1569    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 1570 
 1571 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
 1572 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 1573 _IT_SUBST(INTLTOOL_KEYS_RULE)
 1574 _IT_SUBST(INTLTOOL_PROP_RULE)
 1575 _IT_SUBST(INTLTOOL_OAF_RULE)
 1576 _IT_SUBST(INTLTOOL_PONG_RULE)
 1577 _IT_SUBST(INTLTOOL_SERVER_RULE)
 1578 _IT_SUBST(INTLTOOL_SHEET_RULE)
 1579 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 1580 _IT_SUBST(INTLTOOL_UI_RULE)
 1581 _IT_SUBST(INTLTOOL_XAM_RULE)
 1582 _IT_SUBST(INTLTOOL_KBD_RULE)
 1583 _IT_SUBST(INTLTOOL_XML_RULE)
 1584 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 1585 _IT_SUBST(INTLTOOL_CAVES_RULE)
 1586 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 1587 _IT_SUBST(INTLTOOL_THEME_RULE)
 1588 _IT_SUBST(INTLTOOL_SERVICE_RULE)
 1589 _IT_SUBST(INTLTOOL_POLICY_RULE)
 1590 
 1591 # Check the gettext tools to make sure they are GNU
 1592 AC_PATH_PROG(XGETTEXT, xgettext)
 1593 AC_PATH_PROG(MSGMERGE, msgmerge)
 1594 AC_PATH_PROG(MSGFMT, msgfmt)
 1595 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 1596 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 1597     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 1598 fi
 1599 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 1600 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 1601 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 1602 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 1603     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 1604 fi
 1605 
 1606 AC_PATH_PROG(INTLTOOL_PERL, perl)
 1607 if test -z "$INTLTOOL_PERL"; then
 1608    AC_MSG_ERROR([perl not found])
 1609 fi
 1610 AC_MSG_CHECKING([for perl >= 5.8.1])
 1611 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 1612 if test $? -ne 0; then
 1613    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 1614 else
 1615    IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
 1616    AC_MSG_RESULT([$IT_PERL_VERSION])
 1617 fi
 1618 if test "x$2" != "xno-xml"; then
 1619    AC_MSG_CHECKING([for XML::Parser])
 1620    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 1621        AC_MSG_RESULT([ok])
 1622    else
 1623        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 1624    fi
 1625 fi
 1626 
 1627 # Substitute ALL_LINGUAS so we can use it in po/Makefile
 1628 AC_SUBST(ALL_LINGUAS)
 1629 
 1630 IT_PO_SUBDIR([po])
 1631 
 1632 ])
 1633 
 1634 
 1635 # IT_PO_SUBDIR(DIRNAME)
 1636 # ---------------------
 1637 # All po subdirs have to be declared with this macro; the subdir "po" is
 1638 # declared by IT_PROG_INTLTOOL.
 1639 #
 1640 AC_DEFUN([IT_PO_SUBDIR],
 1641 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 1642 dnl
 1643 dnl The following CONFIG_COMMANDS should be executed at the very end
 1644 dnl of config.status.
 1645 AC_CONFIG_COMMANDS_PRE([
 1646   AC_CONFIG_COMMANDS([$1/stamp-it], [
 1647     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 1648        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 1649     fi
 1650     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 1651     >"$1/stamp-it.tmp"
 1652     [sed '/^#/d
 1653 	 s/^[[].*] *//
 1654 	 /^[ 	]*$/d
 1655 	'"s|^|	$ac_top_srcdir/|" \
 1656       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 1657     ]
 1658     [sed '/^POTFILES =/,/[^\\]$/ {
 1659 		/^POTFILES =/!d
 1660 		r $1/POTFILES
 1661 	  }
 1662 	 ' "$1/Makefile.in" >"$1/Makefile"]
 1663     rm -f "$1/Makefile.tmp"
 1664     mv "$1/stamp-it.tmp" "$1/stamp-it"
 1665   ])
 1666 ])dnl
 1667 ])
 1668 
 1669 # _IT_SUBST(VARIABLE)
 1670 # -------------------
 1671 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 1672 #
 1673 AC_DEFUN([_IT_SUBST],
 1674 [
 1675 AC_SUBST([$1])
 1676 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 1677 ]
 1678 )
 1679 
 1680 # deprecated macros
 1681 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 1682 # A hint is needed for aclocal from Automake <= 1.9.4:
 1683 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
 1684 
 1685 
 1686 # intmax.m4 serial 6 (gettext-0.18.2)
 1687 dnl Copyright (C) 2002-2005, 2008-2016 Free Software Foundation, Inc.
 1688 dnl This file is free software; the Free Software Foundation
 1689 dnl gives unlimited permission to copy and/or distribute it,
 1690 dnl with or without modifications, as long as this notice is preserved.
 1691 
 1692 dnl From Bruno Haible.
 1693 dnl Test whether the system has the 'intmax_t' type, but don't attempt to
 1694 dnl find a replacement if it is lacking.
 1695 
 1696 AC_DEFUN([gt_TYPE_INTMAX_T],
 1697 [
 1698   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
 1699   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
 1700   AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
 1701     [AC_COMPILE_IFELSE(
 1702        [AC_LANG_PROGRAM(
 1703           [[
 1704 #include <stddef.h>
 1705 #include <stdlib.h>
 1706 #if HAVE_STDINT_H_WITH_UINTMAX
 1707 #include <stdint.h>
 1708 #endif
 1709 #if HAVE_INTTYPES_H_WITH_UINTMAX
 1710 #include <inttypes.h>
 1711 #endif
 1712           ]],
 1713           [[intmax_t x = -1;
 1714             return !x;]])],
 1715        [gt_cv_c_intmax_t=yes],
 1716        [gt_cv_c_intmax_t=no])])
 1717   if test $gt_cv_c_intmax_t = yes; then
 1718     AC_DEFINE([HAVE_INTMAX_T], [1],
 1719       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
 1720   fi
 1721 ])
 1722 
 1723 # inttypes-pri.m4 serial 7 (gettext-0.18.2)
 1724 dnl Copyright (C) 1997-2002, 2006, 2008-2016 Free Software Foundation, Inc.
 1725 dnl This file is free software; the Free Software Foundation
 1726 dnl gives unlimited permission to copy and/or distribute it,
 1727 dnl with or without modifications, as long as this notice is preserved.
 1728 
 1729 dnl From Bruno Haible.
 1730 
 1731 AC_PREREQ([2.53])
 1732 
 1733 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
 1734 # macros to non-string values.  This is the case on AIX 4.3.3.
 1735 
 1736 AC_DEFUN([gt_INTTYPES_PRI],
 1737 [
 1738   AC_CHECK_HEADERS([inttypes.h])
 1739   if test $ac_cv_header_inttypes_h = yes; then
 1740     AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
 1741       [gt_cv_inttypes_pri_broken],
 1742       [
 1743         AC_COMPILE_IFELSE(
 1744           [AC_LANG_PROGRAM(
 1745              [[
 1746 #include <inttypes.h>
 1747 #ifdef PRId32
 1748 char *p = PRId32;
 1749 #endif
 1750              ]],
 1751              [[]])],
 1752           [gt_cv_inttypes_pri_broken=no],
 1753           [gt_cv_inttypes_pri_broken=yes])
 1754       ])
 1755   fi
 1756   if test "$gt_cv_inttypes_pri_broken" = yes; then
 1757     AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
 1758       [Define if <inttypes.h> exists and defines unusable PRI* macros.])
 1759     PRI_MACROS_BROKEN=1
 1760   else
 1761     PRI_MACROS_BROKEN=0
 1762   fi
 1763   AC_SUBST([PRI_MACROS_BROKEN])
 1764 ])
 1765 
 1766 # inttypes_h.m4 serial 10
 1767 dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
 1768 dnl This file is free software; the Free Software Foundation
 1769 dnl gives unlimited permission to copy and/or distribute it,
 1770 dnl with or without modifications, as long as this notice is preserved.
 1771 
 1772 dnl From Paul Eggert.
 1773 
 1774 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
 1775 # doesn't clash with <sys/types.h>, and declares uintmax_t.
 1776 
 1777 AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
 1778 [
 1779   AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
 1780     [AC_COMPILE_IFELSE(
 1781        [AC_LANG_PROGRAM(
 1782           [[
 1783 #include <sys/types.h>
 1784 #include <inttypes.h>
 1785           ]],
 1786           [[uintmax_t i = (uintmax_t) -1; return !i;]])],
 1787        [gl_cv_header_inttypes_h=yes],
 1788        [gl_cv_header_inttypes_h=no])])
 1789   if test $gl_cv_header_inttypes_h = yes; then
 1790     AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
 1791       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
 1792        and declares uintmax_t. ])
 1793   fi
 1794 ])
 1795 
 1796 # lcmessage.m4 serial 7 (gettext-0.18.2)
 1797 dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software
 1798 dnl Foundation, Inc.
 1799 dnl This file is free software; the Free Software Foundation
 1800 dnl gives unlimited permission to copy and/or distribute it,
 1801 dnl with or without modifications, as long as this notice is preserved.
 1802 dnl
 1803 dnl This file can be used in projects which are not available under
 1804 dnl the GNU General Public License or the GNU Library General Public
 1805 dnl License but which still want to provide support for the GNU gettext
 1806 dnl functionality.
 1807 dnl Please note that the actual code of the GNU gettext library is covered
 1808 dnl by the GNU Library General Public License, and the rest of the GNU
 1809 dnl gettext package is covered by the GNU General Public License.
 1810 dnl They are *not* in the public domain.
 1811 
 1812 dnl Authors:
 1813 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
 1814 
 1815 # Check whether LC_MESSAGES is available in <locale.h>.
 1816 
 1817 AC_DEFUN([gt_LC_MESSAGES],
 1818 [
 1819   AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
 1820     [AC_LINK_IFELSE(
 1821        [AC_LANG_PROGRAM(
 1822           [[#include <locale.h>]],
 1823           [[return LC_MESSAGES]])],
 1824        [gt_cv_val_LC_MESSAGES=yes],
 1825        [gt_cv_val_LC_MESSAGES=no])])
 1826   if test $gt_cv_val_LC_MESSAGES = yes; then
 1827     AC_DEFINE([HAVE_LC_MESSAGES], [1],
 1828       [Define if your <locale.h> file defines LC_MESSAGES.])
 1829   fi
 1830 ])
 1831 
 1832 # lib-ld.m4 serial 6
 1833 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
 1834 dnl This file is free software; the Free Software Foundation
 1835 dnl gives unlimited permission to copy and/or distribute it,
 1836 dnl with or without modifications, as long as this notice is preserved.
 1837 
 1838 dnl Subroutines of libtool.m4,
 1839 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
 1840 dnl collision with libtool.m4.
 1841 
 1842 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
 1843 AC_DEFUN([AC_LIB_PROG_LD_GNU],
 1844 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
 1845 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
 1846 case `$LD -v 2>&1 </dev/null` in
 1847 *GNU* | *'with BFD'*)
 1848   acl_cv_prog_gnu_ld=yes
 1849   ;;
 1850 *)
 1851   acl_cv_prog_gnu_ld=no
 1852   ;;
 1853 esac])
 1854 with_gnu_ld=$acl_cv_prog_gnu_ld
 1855 ])
 1856 
 1857 dnl From libtool-2.4. Sets the variable LD.
 1858 AC_DEFUN([AC_LIB_PROG_LD],
 1859 [AC_REQUIRE([AC_PROG_CC])dnl
 1860 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 1861 
 1862 AC_ARG_WITH([gnu-ld],
 1863     [AS_HELP_STRING([--with-gnu-ld],
 1864         [assume the C compiler uses GNU ld [default=no]])],
 1865     [test "$withval" = no || with_gnu_ld=yes],
 1866     [with_gnu_ld=no])dnl
 1867 
 1868 # Prepare PATH_SEPARATOR.
 1869 # The user is always right.
 1870 if test "${PATH_SEPARATOR+set}" != set; then
 1871   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
 1872   # contains only /bin. Note that ksh looks also at the FPATH variable,
 1873   # so we have to set that as well for the test.
 1874   PATH_SEPARATOR=:
 1875   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
 1876     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
 1877            || PATH_SEPARATOR=';'
 1878        }
 1879 fi
 1880 
 1881 ac_prog=ld
 1882 if test "$GCC" = yes; then
 1883   # Check if gcc -print-prog-name=ld gives a path.
 1884   AC_MSG_CHECKING([for ld used by $CC])
 1885   case $host in
 1886   *-*-mingw*)
 1887     # gcc leaves a trailing carriage return which upsets mingw
 1888     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 1889   *)
 1890     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 1891   esac
 1892   case $ac_prog in
 1893     # Accept absolute paths.
 1894     [[\\/]]* | ?:[[\\/]]*)
 1895       re_direlt='/[[^/]][[^/]]*/\.\./'
 1896       # Canonicalize the pathname of ld
 1897       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
 1898       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
 1899         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 1900       done
 1901       test -z "$LD" && LD="$ac_prog"
 1902       ;;
 1903   "")
 1904     # If it fails, then pretend we aren't using GCC.
 1905     ac_prog=ld
 1906     ;;
 1907   *)
 1908     # If it is relative, then search for the first ld in PATH.
 1909     with_gnu_ld=unknown
 1910     ;;
 1911   esac
 1912 elif test "$with_gnu_ld" = yes; then
 1913   AC_MSG_CHECKING([for GNU ld])
 1914 else
 1915   AC_MSG_CHECKING([for non-GNU ld])
 1916 fi
 1917 AC_CACHE_VAL([acl_cv_path_LD],
 1918 [if test -z "$LD"; then
 1919   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 1920   for ac_dir in $PATH; do
 1921     IFS="$acl_save_ifs"
 1922     test -z "$ac_dir" && ac_dir=.
 1923     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 1924       acl_cv_path_LD="$ac_dir/$ac_prog"
 1925       # Check to see if the program is GNU ld.  I'd rather use --version,
 1926       # but apparently some variants of GNU ld only accept -v.
 1927       # Break only if it was the GNU/non-GNU ld that we prefer.
 1928       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
 1929       *GNU* | *'with BFD'*)
 1930         test "$with_gnu_ld" != no && break
 1931         ;;
 1932       *)
 1933         test "$with_gnu_ld" != yes && break
 1934         ;;
 1935       esac
 1936     fi
 1937   done
 1938   IFS="$acl_save_ifs"
 1939 else
 1940   acl_cv_path_LD="$LD" # Let the user override the test with a path.
 1941 fi])
 1942 LD="$acl_cv_path_LD"
 1943 if test -n "$LD"; then
 1944   AC_MSG_RESULT([$LD])
 1945 else
 1946   AC_MSG_RESULT([no])
 1947 fi
 1948 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 1949 AC_LIB_PROG_LD_GNU
 1950 ])
 1951 
 1952 # lib-link.m4 serial 26 (gettext-0.18.2)
 1953 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
 1954 dnl This file is free software; the Free Software Foundation
 1955 dnl gives unlimited permission to copy and/or distribute it,
 1956 dnl with or without modifications, as long as this notice is preserved.
 1957 
 1958 dnl From Bruno Haible.
 1959 
 1960 AC_PREREQ([2.54])
 1961 
 1962 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 1963 dnl the libraries corresponding to explicit and implicit dependencies.
 1964 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 1965 dnl augments the CPPFLAGS variable.
 1966 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
 1967 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 1968 AC_DEFUN([AC_LIB_LINKFLAGS],
 1969 [
 1970   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 1971   AC_REQUIRE([AC_LIB_RPATH])
 1972   pushdef([Name],[m4_translit([$1],[./+-], [____])])
 1973   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
 1974                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 1975   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 1976     AC_LIB_LINKFLAGS_BODY([$1], [$2])
 1977     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 1978     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 1979     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 1980     ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
 1981   ])
 1982   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 1983   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 1984   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 1985   LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
 1986   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 1987   AC_SUBST([LIB]NAME)
 1988   AC_SUBST([LTLIB]NAME)
 1989   AC_SUBST([LIB]NAME[_PREFIX])
 1990   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 1991   dnl results of this search when this library appears as a dependency.
 1992   HAVE_LIB[]NAME=yes
 1993   popdef([NAME])
 1994   popdef([Name])
 1995 ])
 1996 
 1997 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
 1998 dnl searches for libname and the libraries corresponding to explicit and
 1999 dnl implicit dependencies, together with the specified include files and
 2000 dnl the ability to compile and link the specified testcode. The missing-message
 2001 dnl defaults to 'no' and may contain additional hints for the user.
 2002 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
 2003 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 2004 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 2005 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 2006 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
 2007 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 2008 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 2009 [
 2010   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 2011   AC_REQUIRE([AC_LIB_RPATH])
 2012   pushdef([Name],[m4_translit([$1],[./+-], [____])])
 2013   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
 2014                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 2015 
 2016   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 2017   dnl accordingly.
 2018   AC_LIB_LINKFLAGS_BODY([$1], [$2])
 2019 
 2020   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 2021   dnl because if the user has installed lib[]Name and not disabled its use
 2022   dnl via --without-lib[]Name-prefix, he wants to use it.
 2023   ac_save_CPPFLAGS="$CPPFLAGS"
 2024   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 2025 
 2026   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 2027     ac_save_LIBS="$LIBS"
 2028     dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
 2029     dnl because these -l options might require -L options that are present in
 2030     dnl LIBS. -l options benefit only from the -L options listed before it.
 2031     dnl Otherwise, add it to the front of LIBS, because it may be a static
 2032     dnl library that depends on another static library that is present in LIBS.
 2033     dnl Static libraries benefit only from the static libraries listed after
 2034     dnl it.
 2035     case " $LIB[]NAME" in
 2036       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
 2037       *)       LIBS="$LIB[]NAME $LIBS" ;;
 2038     esac
 2039     AC_LINK_IFELSE(
 2040       [AC_LANG_PROGRAM([[$3]], [[$4]])],
 2041       [ac_cv_lib[]Name=yes],
 2042       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
 2043     LIBS="$ac_save_LIBS"
 2044   ])
 2045   if test "$ac_cv_lib[]Name" = yes; then
 2046     HAVE_LIB[]NAME=yes
 2047     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
 2048     AC_MSG_CHECKING([how to link with lib[]$1])
 2049     AC_MSG_RESULT([$LIB[]NAME])
 2050   else
 2051     HAVE_LIB[]NAME=no
 2052     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 2053     dnl $INC[]NAME either.
 2054     CPPFLAGS="$ac_save_CPPFLAGS"
 2055     LIB[]NAME=
 2056     LTLIB[]NAME=
 2057     LIB[]NAME[]_PREFIX=
 2058   fi
 2059   AC_SUBST([HAVE_LIB]NAME)
 2060   AC_SUBST([LIB]NAME)
 2061   AC_SUBST([LTLIB]NAME)
 2062   AC_SUBST([LIB]NAME[_PREFIX])
 2063   popdef([NAME])
 2064   popdef([Name])
 2065 ])
 2066 
 2067 dnl Determine the platform dependent parameters needed to use rpath:
 2068 dnl   acl_libext,
 2069 dnl   acl_shlibext,
 2070 dnl   acl_libname_spec,
 2071 dnl   acl_library_names_spec,
 2072 dnl   acl_hardcode_libdir_flag_spec,
 2073 dnl   acl_hardcode_libdir_separator,
 2074 dnl   acl_hardcode_direct,
 2075 dnl   acl_hardcode_minus_L.
 2076 AC_DEFUN([AC_LIB_RPATH],
 2077 [
 2078   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
 2079   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
 2080   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 2081   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 2082   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 2083   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 2084   AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
 2085     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 2086     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 2087     . ./conftest.sh
 2088     rm -f ./conftest.sh
 2089     acl_cv_rpath=done
 2090   ])
 2091   wl="$acl_cv_wl"
 2092   acl_libext="$acl_cv_libext"
 2093   acl_shlibext="$acl_cv_shlibext"
 2094   acl_libname_spec="$acl_cv_libname_spec"
 2095   acl_library_names_spec="$acl_cv_library_names_spec"
 2096   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 2097   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 2098   acl_hardcode_direct="$acl_cv_hardcode_direct"
 2099   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
 2100   dnl Determine whether the user wants rpath handling at all.
 2101   AC_ARG_ENABLE([rpath],
 2102     [  --disable-rpath         do not hardcode runtime library paths],
 2103     :, enable_rpath=yes)
 2104 ])
 2105 
 2106 dnl AC_LIB_FROMPACKAGE(name, package)
 2107 dnl declares that libname comes from the given package. The configure file
 2108 dnl will then not have a --with-libname-prefix option but a
 2109 dnl --with-package-prefix option. Several libraries can come from the same
 2110 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
 2111 dnl macro call that searches for libname.
 2112 AC_DEFUN([AC_LIB_FROMPACKAGE],
 2113 [
 2114   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
 2115                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 2116   define([acl_frompackage_]NAME, [$2])
 2117   popdef([NAME])
 2118   pushdef([PACK],[$2])
 2119   pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
 2120                                      [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 2121   define([acl_libsinpackage_]PACKUP,
 2122     m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
 2123   popdef([PACKUP])
 2124   popdef([PACK])
 2125 ])
 2126 
 2127 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 2128 dnl the libraries corresponding to explicit and implicit dependencies.
 2129 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 2130 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
 2131 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 2132 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 2133 [
 2134   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 2135   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
 2136                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 2137   pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
 2138   pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
 2139                                      [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 2140   pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
 2141   dnl Autoconf >= 2.61 supports dots in --with options.
 2142   pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
 2143   dnl By default, look in $includedir and $libdir.
 2144   use_additional=yes
 2145   AC_LIB_WITH_FINAL_PREFIX([
 2146     eval additional_includedir=\"$includedir\"
 2147     eval additional_libdir=\"$libdir\"
 2148   ])
 2149   AC_ARG_WITH(P_A_C_K[-prefix],
 2150 [[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
 2151   --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
 2152 [
 2153     if test "X$withval" = "Xno"; then
 2154       use_additional=no
 2155     else
 2156       if test "X$withval" = "X"; then
 2157         AC_LIB_WITH_FINAL_PREFIX([
 2158           eval additional_includedir=\"$includedir\"
 2159           eval additional_libdir=\"$libdir\"
 2160         ])
 2161       else
 2162         additional_includedir="$withval/include"
 2163         additional_libdir="$withval/$acl_libdirstem"
 2164         if test "$acl_libdirstem2" != "$acl_libdirstem" \
 2165            && ! test -d "$withval/$acl_libdirstem"; then
 2166           additional_libdir="$withval/$acl_libdirstem2"
 2167         fi
 2168       fi
 2169     fi
 2170 ])
 2171   dnl Search the library and its dependencies in $additional_libdir and
 2172   dnl $LDFLAGS. Using breadth-first-seach.
 2173   LIB[]NAME=
 2174   LTLIB[]NAME=
 2175   INC[]NAME=
 2176   LIB[]NAME[]_PREFIX=
 2177   dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
 2178   dnl computed. So it has to be reset here.
 2179   HAVE_LIB[]NAME=
 2180   rpathdirs=
 2181   ltrpathdirs=
 2182   names_already_handled=
 2183   names_next_round='$1 $2'
 2184   while test -n "$names_next_round"; do
 2185     names_this_round="$names_next_round"
 2186     names_next_round=
 2187     for name in $names_this_round; do
 2188       already_handled=
 2189       for n in $names_already_handled; do
 2190         if test "$n" = "$name"; then
 2191           already_handled=yes
 2192           break
 2193         fi
 2194       done
 2195       if test -z "$already_handled"; then
 2196         names_already_handled="$names_already_handled $name"
 2197         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 2198         dnl or AC_LIB_HAVE_LINKFLAGS call.
 2199         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
 2200         eval value=\"\$HAVE_LIB$uppername\"
 2201         if test -n "$value"; then
 2202           if test "$value" = yes; then
 2203             eval value=\"\$LIB$uppername\"
 2204             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 2205             eval value=\"\$LTLIB$uppername\"
 2206             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 2207           else
 2208             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 2209             dnl that this library doesn't exist. So just drop it.
 2210             :
 2211           fi
 2212         else
 2213           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 2214           dnl and the already constructed $LIBNAME/$LTLIBNAME.
 2215           found_dir=
 2216           found_la=
 2217           found_so=
 2218           found_a=
 2219           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
 2220           if test -n "$acl_shlibext"; then
 2221             shrext=".$acl_shlibext"             # typically: shrext=.so
 2222           else
 2223             shrext=
 2224           fi
 2225           if test $use_additional = yes; then
 2226             dir="$additional_libdir"
 2227             dnl The same code as in the loop below:
 2228             dnl First look for a shared library.
 2229             if test -n "$acl_shlibext"; then
 2230               if test -f "$dir/$libname$shrext"; then
 2231                 found_dir="$dir"
 2232                 found_so="$dir/$libname$shrext"
 2233               else
 2234                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 2235                   ver=`(cd "$dir" && \
 2236                         for f in "$libname$shrext".*; do echo "$f"; done \
 2237                         | sed -e "s,^$libname$shrext\\\\.,," \
 2238                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 2239                         | sed 1q ) 2>/dev/null`
 2240                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 2241                     found_dir="$dir"
 2242                     found_so="$dir/$libname$shrext.$ver"
 2243                   fi
 2244                 else
 2245                   eval library_names=\"$acl_library_names_spec\"
 2246                   for f in $library_names; do
 2247                     if test -f "$dir/$f"; then
 2248                       found_dir="$dir"
 2249                       found_so="$dir/$f"
 2250                       break
 2251                     fi
 2252                   done
 2253                 fi
 2254               fi
 2255             fi
 2256             dnl Then look for a static library.
 2257             if test "X$found_dir" = "X"; then
 2258               if test -f "$dir/$libname.$acl_libext"; then
 2259                 found_dir="$dir"
 2260                 found_a="$dir/$libname.$acl_libext"
 2261               fi
 2262             fi
 2263             if test "X$found_dir" != "X"; then
 2264               if test -f "$dir/$libname.la"; then
 2265                 found_la="$dir/$libname.la"
 2266               fi
 2267             fi
 2268           fi
 2269           if test "X$found_dir" = "X"; then
 2270             for x in $LDFLAGS $LTLIB[]NAME; do
 2271               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2272               case "$x" in
 2273                 -L*)
 2274                   dir=`echo "X$x" | sed -e 's/^X-L//'`
 2275                   dnl First look for a shared library.
 2276                   if test -n "$acl_shlibext"; then
 2277                     if test -f "$dir/$libname$shrext"; then
 2278                       found_dir="$dir"
 2279                       found_so="$dir/$libname$shrext"
 2280                     else
 2281                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 2282                         ver=`(cd "$dir" && \
 2283                               for f in "$libname$shrext".*; do echo "$f"; done \
 2284                               | sed -e "s,^$libname$shrext\\\\.,," \
 2285                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 2286                               | sed 1q ) 2>/dev/null`
 2287                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 2288                           found_dir="$dir"
 2289                           found_so="$dir/$libname$shrext.$ver"
 2290                         fi
 2291                       else
 2292                         eval library_names=\"$acl_library_names_spec\"
 2293                         for f in $library_names; do
 2294                           if test -f "$dir/$f"; then
 2295                             found_dir="$dir"
 2296                             found_so="$dir/$f"
 2297                             break
 2298                           fi
 2299                         done
 2300                       fi
 2301                     fi
 2302                   fi
 2303                   dnl Then look for a static library.
 2304                   if test "X$found_dir" = "X"; then
 2305                     if test -f "$dir/$libname.$acl_libext"; then
 2306                       found_dir="$dir"
 2307                       found_a="$dir/$libname.$acl_libext"
 2308                     fi
 2309                   fi
 2310                   if test "X$found_dir" != "X"; then
 2311                     if test -f "$dir/$libname.la"; then
 2312                       found_la="$dir/$libname.la"
 2313                     fi
 2314                   fi
 2315                   ;;
 2316               esac
 2317               if test "X$found_dir" != "X"; then
 2318                 break
 2319               fi
 2320             done
 2321           fi
 2322           if test "X$found_dir" != "X"; then
 2323             dnl Found the library.
 2324             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 2325             if test "X$found_so" != "X"; then
 2326               dnl Linking with a shared library. We attempt to hardcode its
 2327               dnl directory into the executable's runpath, unless it's the
 2328               dnl standard /usr/lib.
 2329               if test "$enable_rpath" = no \
 2330                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
 2331                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
 2332                 dnl No hardcoding is needed.
 2333                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 2334               else
 2335                 dnl Use an explicit option to hardcode DIR into the resulting
 2336                 dnl binary.
 2337                 dnl Potentially add DIR to ltrpathdirs.
 2338                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 2339                 haveit=
 2340                 for x in $ltrpathdirs; do
 2341                   if test "X$x" = "X$found_dir"; then
 2342                     haveit=yes
 2343                     break
 2344                   fi
 2345                 done
 2346                 if test -z "$haveit"; then
 2347                   ltrpathdirs="$ltrpathdirs $found_dir"
 2348                 fi
 2349                 dnl The hardcoding into $LIBNAME is system dependent.
 2350                 if test "$acl_hardcode_direct" = yes; then
 2351                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 2352                   dnl resulting binary.
 2353                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 2354                 else
 2355                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
 2356                     dnl Use an explicit option to hardcode DIR into the resulting
 2357                     dnl binary.
 2358                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 2359                     dnl Potentially add DIR to rpathdirs.
 2360                     dnl The rpathdirs will be appended to $LIBNAME at the end.
 2361                     haveit=
 2362                     for x in $rpathdirs; do
 2363                       if test "X$x" = "X$found_dir"; then
 2364                         haveit=yes
 2365                         break
 2366                       fi
 2367                     done
 2368                     if test -z "$haveit"; then
 2369                       rpathdirs="$rpathdirs $found_dir"
 2370                     fi
 2371                   else
 2372                     dnl Rely on "-L$found_dir".
 2373                     dnl But don't add it if it's already contained in the LDFLAGS
 2374                     dnl or the already constructed $LIBNAME
 2375                     haveit=
 2376                     for x in $LDFLAGS $LIB[]NAME; do
 2377                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2378                       if test "X$x" = "X-L$found_dir"; then
 2379                         haveit=yes
 2380                         break
 2381                       fi
 2382                     done
 2383                     if test -z "$haveit"; then
 2384                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 2385                     fi
 2386                     if test "$acl_hardcode_minus_L" != no; then
 2387                       dnl FIXME: Not sure whether we should use
 2388                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 2389                       dnl here.
 2390                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 2391                     else
 2392                       dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
 2393                       dnl here, because this doesn't fit in flags passed to the
 2394                       dnl compiler. So give up. No hardcoding. This affects only
 2395                       dnl very old systems.
 2396                       dnl FIXME: Not sure whether we should use
 2397                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 2398                       dnl here.
 2399                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 2400                     fi
 2401                   fi
 2402                 fi
 2403               fi
 2404             else
 2405               if test "X$found_a" != "X"; then
 2406                 dnl Linking with a static library.
 2407                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 2408               else
 2409                 dnl We shouldn't come here, but anyway it's good to have a
 2410                 dnl fallback.
 2411                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 2412               fi
 2413             fi
 2414             dnl Assume the include files are nearby.
 2415             additional_includedir=
 2416             case "$found_dir" in
 2417               */$acl_libdirstem | */$acl_libdirstem/)
 2418                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
 2419                 if test "$name" = '$1'; then
 2420                   LIB[]NAME[]_PREFIX="$basedir"
 2421                 fi
 2422                 additional_includedir="$basedir/include"
 2423                 ;;
 2424               */$acl_libdirstem2 | */$acl_libdirstem2/)
 2425                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
 2426                 if test "$name" = '$1'; then
 2427                   LIB[]NAME[]_PREFIX="$basedir"
 2428                 fi
 2429                 additional_includedir="$basedir/include"
 2430                 ;;
 2431             esac
 2432             if test "X$additional_includedir" != "X"; then
 2433               dnl Potentially add $additional_includedir to $INCNAME.
 2434               dnl But don't add it
 2435               dnl   1. if it's the standard /usr/include,
 2436               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 2437               dnl   3. if it's already present in $CPPFLAGS or the already
 2438               dnl      constructed $INCNAME,
 2439               dnl   4. if it doesn't exist as a directory.
 2440               if test "X$additional_includedir" != "X/usr/include"; then
 2441                 haveit=
 2442                 if test "X$additional_includedir" = "X/usr/local/include"; then
 2443                   if test -n "$GCC"; then
 2444                     case $host_os in
 2445                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 2446                     esac
 2447                   fi
 2448                 fi
 2449                 if test -z "$haveit"; then
 2450                   for x in $CPPFLAGS $INC[]NAME; do
 2451                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2452                     if test "X$x" = "X-I$additional_includedir"; then
 2453                       haveit=yes
 2454                       break
 2455                     fi
 2456                   done
 2457                   if test -z "$haveit"; then
 2458                     if test -d "$additional_includedir"; then
 2459                       dnl Really add $additional_includedir to $INCNAME.
 2460                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 2461                     fi
 2462                   fi
 2463                 fi
 2464               fi
 2465             fi
 2466             dnl Look for dependencies.
 2467             if test -n "$found_la"; then
 2468               dnl Read the .la file. It defines the variables
 2469               dnl dlname, library_names, old_library, dependency_libs, current,
 2470               dnl age, revision, installed, dlopen, dlpreopen, libdir.
 2471               save_libdir="$libdir"
 2472               case "$found_la" in
 2473                 */* | *\\*) . "$found_la" ;;
 2474                 *) . "./$found_la" ;;
 2475               esac
 2476               libdir="$save_libdir"
 2477               dnl We use only dependency_libs.
 2478               for dep in $dependency_libs; do
 2479                 case "$dep" in
 2480                   -L*)
 2481                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 2482                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 2483                     dnl But don't add it
 2484                     dnl   1. if it's the standard /usr/lib,
 2485                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 2486                     dnl   3. if it's already present in $LDFLAGS or the already
 2487                     dnl      constructed $LIBNAME,
 2488                     dnl   4. if it doesn't exist as a directory.
 2489                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
 2490                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
 2491                       haveit=
 2492                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
 2493                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
 2494                         if test -n "$GCC"; then
 2495                           case $host_os in
 2496                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 2497                           esac
 2498                         fi
 2499                       fi
 2500                       if test -z "$haveit"; then
 2501                         haveit=
 2502                         for x in $LDFLAGS $LIB[]NAME; do
 2503                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2504                           if test "X$x" = "X-L$additional_libdir"; then
 2505                             haveit=yes
 2506                             break
 2507                           fi
 2508                         done
 2509                         if test -z "$haveit"; then
 2510                           if test -d "$additional_libdir"; then
 2511                             dnl Really add $additional_libdir to $LIBNAME.
 2512                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 2513                           fi
 2514                         fi
 2515                         haveit=
 2516                         for x in $LDFLAGS $LTLIB[]NAME; do
 2517                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2518                           if test "X$x" = "X-L$additional_libdir"; then
 2519                             haveit=yes
 2520                             break
 2521                           fi
 2522                         done
 2523                         if test -z "$haveit"; then
 2524                           if test -d "$additional_libdir"; then
 2525                             dnl Really add $additional_libdir to $LTLIBNAME.
 2526                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 2527                           fi
 2528                         fi
 2529                       fi
 2530                     fi
 2531                     ;;
 2532                   -R*)
 2533                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
 2534                     if test "$enable_rpath" != no; then
 2535                       dnl Potentially add DIR to rpathdirs.
 2536                       dnl The rpathdirs will be appended to $LIBNAME at the end.
 2537                       haveit=
 2538                       for x in $rpathdirs; do
 2539                         if test "X$x" = "X$dir"; then
 2540                           haveit=yes
 2541                           break
 2542                         fi
 2543                       done
 2544                       if test -z "$haveit"; then
 2545                         rpathdirs="$rpathdirs $dir"
 2546                       fi
 2547                       dnl Potentially add DIR to ltrpathdirs.
 2548                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 2549                       haveit=
 2550                       for x in $ltrpathdirs; do
 2551                         if test "X$x" = "X$dir"; then
 2552                           haveit=yes
 2553                           break
 2554                         fi
 2555                       done
 2556                       if test -z "$haveit"; then
 2557                         ltrpathdirs="$ltrpathdirs $dir"
 2558                       fi
 2559                     fi
 2560                     ;;
 2561                   -l*)
 2562                     dnl Handle this in the next round.
 2563                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 2564                     ;;
 2565                   *.la)
 2566                     dnl Handle this in the next round. Throw away the .la's
 2567                     dnl directory; it is already contained in a preceding -L
 2568                     dnl option.
 2569                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 2570                     ;;
 2571                   *)
 2572                     dnl Most likely an immediate library name.
 2573                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 2574                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 2575                     ;;
 2576                 esac
 2577               done
 2578             fi
 2579           else
 2580             dnl Didn't find the library; assume it is in the system directories
 2581             dnl known to the linker and runtime loader. (All the system
 2582             dnl directories known to the linker should also be known to the
 2583             dnl runtime loader, otherwise the system is severely misconfigured.)
 2584             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 2585             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 2586           fi
 2587         fi
 2588       fi
 2589     done
 2590   done
 2591   if test "X$rpathdirs" != "X"; then
 2592     if test -n "$acl_hardcode_libdir_separator"; then
 2593       dnl Weird platform: only the last -rpath option counts, the user must
 2594       dnl pass all path elements in one option. We can arrange that for a
 2595       dnl single library, but not when more than one $LIBNAMEs are used.
 2596       alldirs=
 2597       for found_dir in $rpathdirs; do
 2598         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
 2599       done
 2600       dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
 2601       acl_save_libdir="$libdir"
 2602       libdir="$alldirs"
 2603       eval flag=\"$acl_hardcode_libdir_flag_spec\"
 2604       libdir="$acl_save_libdir"
 2605       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 2606     else
 2607       dnl The -rpath options are cumulative.
 2608       for found_dir in $rpathdirs; do
 2609         acl_save_libdir="$libdir"
 2610         libdir="$found_dir"
 2611         eval flag=\"$acl_hardcode_libdir_flag_spec\"
 2612         libdir="$acl_save_libdir"
 2613         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 2614       done
 2615     fi
 2616   fi
 2617   if test "X$ltrpathdirs" != "X"; then
 2618     dnl When using libtool, the option that works for both libraries and
 2619     dnl executables is -R. The -R options are cumulative.
 2620     for found_dir in $ltrpathdirs; do
 2621       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 2622     done
 2623   fi
 2624   popdef([P_A_C_K])
 2625   popdef([PACKLIBS])
 2626   popdef([PACKUP])
 2627   popdef([PACK])
 2628   popdef([NAME])
 2629 ])
 2630 
 2631 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 2632 dnl unless already present in VAR.
 2633 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 2634 dnl contains two or three consecutive elements that belong together.
 2635 AC_DEFUN([AC_LIB_APPENDTOVAR],
 2636 [
 2637   for element in [$2]; do
 2638     haveit=
 2639     for x in $[$1]; do
 2640       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2641       if test "X$x" = "X$element"; then
 2642         haveit=yes
 2643         break
 2644       fi
 2645     done
 2646     if test -z "$haveit"; then
 2647       [$1]="${[$1]}${[$1]:+ }$element"
 2648     fi
 2649   done
 2650 ])
 2651 
 2652 dnl For those cases where a variable contains several -L and -l options
 2653 dnl referring to unknown libraries and directories, this macro determines the
 2654 dnl necessary additional linker options for the runtime path.
 2655 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
 2656 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
 2657 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
 2658 dnl otherwise linking without libtool is assumed.
 2659 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
 2660 [
 2661   AC_REQUIRE([AC_LIB_RPATH])
 2662   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 2663   $1=
 2664   if test "$enable_rpath" != no; then
 2665     if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
 2666       dnl Use an explicit option to hardcode directories into the resulting
 2667       dnl binary.
 2668       rpathdirs=
 2669       next=
 2670       for opt in $2; do
 2671         if test -n "$next"; then
 2672           dir="$next"
 2673           dnl No need to hardcode the standard /usr/lib.
 2674           if test "X$dir" != "X/usr/$acl_libdirstem" \
 2675              && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 2676             rpathdirs="$rpathdirs $dir"
 2677           fi
 2678           next=
 2679         else
 2680           case $opt in
 2681             -L) next=yes ;;
 2682             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
 2683                  dnl No need to hardcode the standard /usr/lib.
 2684                  if test "X$dir" != "X/usr/$acl_libdirstem" \
 2685                     && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 2686                    rpathdirs="$rpathdirs $dir"
 2687                  fi
 2688                  next= ;;
 2689             *) next= ;;
 2690           esac
 2691         fi
 2692       done
 2693       if test "X$rpathdirs" != "X"; then
 2694         if test -n ""$3""; then
 2695           dnl libtool is used for linking. Use -R options.
 2696           for dir in $rpathdirs; do
 2697             $1="${$1}${$1:+ }-R$dir"
 2698           done
 2699         else
 2700           dnl The linker is used for linking directly.
 2701           if test -n "$acl_hardcode_libdir_separator"; then
 2702             dnl Weird platform: only the last -rpath option counts, the user
 2703             dnl must pass all path elements in one option.
 2704             alldirs=
 2705             for dir in $rpathdirs; do
 2706               alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
 2707             done
 2708             acl_save_libdir="$libdir"
 2709             libdir="$alldirs"
 2710             eval flag=\"$acl_hardcode_libdir_flag_spec\"
 2711             libdir="$acl_save_libdir"
 2712             $1="$flag"
 2713           else
 2714             dnl The -rpath options are cumulative.
 2715             for dir in $rpathdirs; do
 2716               acl_save_libdir="$libdir"
 2717               libdir="$dir"
 2718               eval flag=\"$acl_hardcode_libdir_flag_spec\"
 2719               libdir="$acl_save_libdir"
 2720               $1="${$1}${$1:+ }$flag"
 2721             done
 2722           fi
 2723         fi
 2724       fi
 2725     fi
 2726   fi
 2727   AC_SUBST([$1])
 2728 ])
 2729 
 2730 # lib-prefix.m4 serial 7 (gettext-0.18)
 2731 dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
 2732 dnl This file is free software; the Free Software Foundation
 2733 dnl gives unlimited permission to copy and/or distribute it,
 2734 dnl with or without modifications, as long as this notice is preserved.
 2735 
 2736 dnl From Bruno Haible.
 2737 
 2738 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 2739 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 2740 dnl require excessive bracketing.
 2741 ifdef([AC_HELP_STRING],
 2742 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 2743 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 2744 
 2745 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 2746 dnl to access previously installed libraries. The basic assumption is that
 2747 dnl a user will want packages to use other packages he previously installed
 2748 dnl with the same --prefix option.
 2749 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 2750 dnl libraries, but is otherwise very convenient.
 2751 AC_DEFUN([AC_LIB_PREFIX],
 2752 [
 2753   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 2754   AC_REQUIRE([AC_PROG_CC])
 2755   AC_REQUIRE([AC_CANONICAL_HOST])
 2756   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 2757   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 2758   dnl By default, look in $includedir and $libdir.
 2759   use_additional=yes
 2760   AC_LIB_WITH_FINAL_PREFIX([
 2761     eval additional_includedir=\"$includedir\"
 2762     eval additional_libdir=\"$libdir\"
 2763   ])
 2764   AC_LIB_ARG_WITH([lib-prefix],
 2765 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 2766   --without-lib-prefix    don't search for libraries in includedir and libdir],
 2767 [
 2768     if test "X$withval" = "Xno"; then
 2769       use_additional=no
 2770     else
 2771       if test "X$withval" = "X"; then
 2772         AC_LIB_WITH_FINAL_PREFIX([
 2773           eval additional_includedir=\"$includedir\"
 2774           eval additional_libdir=\"$libdir\"
 2775         ])
 2776       else
 2777         additional_includedir="$withval/include"
 2778         additional_libdir="$withval/$acl_libdirstem"
 2779       fi
 2780     fi
 2781 ])
 2782   if test $use_additional = yes; then
 2783     dnl Potentially add $additional_includedir to $CPPFLAGS.
 2784     dnl But don't add it
 2785     dnl   1. if it's the standard /usr/include,
 2786     dnl   2. if it's already present in $CPPFLAGS,
 2787     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 2788     dnl   4. if it doesn't exist as a directory.
 2789     if test "X$additional_includedir" != "X/usr/include"; then
 2790       haveit=
 2791       for x in $CPPFLAGS; do
 2792         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2793         if test "X$x" = "X-I$additional_includedir"; then
 2794           haveit=yes
 2795           break
 2796         fi
 2797       done
 2798       if test -z "$haveit"; then
 2799         if test "X$additional_includedir" = "X/usr/local/include"; then
 2800           if test -n "$GCC"; then
 2801             case $host_os in
 2802               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 2803             esac
 2804           fi
 2805         fi
 2806         if test -z "$haveit"; then
 2807           if test -d "$additional_includedir"; then
 2808             dnl Really add $additional_includedir to $CPPFLAGS.
 2809             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 2810           fi
 2811         fi
 2812       fi
 2813     fi
 2814     dnl Potentially add $additional_libdir to $LDFLAGS.
 2815     dnl But don't add it
 2816     dnl   1. if it's the standard /usr/lib,
 2817     dnl   2. if it's already present in $LDFLAGS,
 2818     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 2819     dnl   4. if it doesn't exist as a directory.
 2820     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
 2821       haveit=
 2822       for x in $LDFLAGS; do
 2823         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 2824         if test "X$x" = "X-L$additional_libdir"; then
 2825           haveit=yes
 2826           break
 2827         fi
 2828       done
 2829       if test -z "$haveit"; then
 2830         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
 2831           if test -n "$GCC"; then
 2832             case $host_os in
 2833               linux*) haveit=yes;;
 2834             esac
 2835           fi
 2836         fi
 2837         if test -z "$haveit"; then
 2838           if test -d "$additional_libdir"; then
 2839             dnl Really add $additional_libdir to $LDFLAGS.
 2840             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 2841           fi
 2842         fi
 2843       fi
 2844     fi
 2845   fi
 2846 ])
 2847 
 2848 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 2849 dnl acl_final_exec_prefix, containing the values to which $prefix and
 2850 dnl $exec_prefix will expand at the end of the configure script.
 2851 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 2852 [
 2853   dnl Unfortunately, prefix and exec_prefix get only finally determined
 2854   dnl at the end of configure.
 2855   if test "X$prefix" = "XNONE"; then
 2856     acl_final_prefix="$ac_default_prefix"
 2857   else
 2858     acl_final_prefix="$prefix"
 2859   fi
 2860   if test "X$exec_prefix" = "XNONE"; then
 2861     acl_final_exec_prefix='${prefix}'
 2862   else
 2863     acl_final_exec_prefix="$exec_prefix"
 2864   fi
 2865   acl_save_prefix="$prefix"
 2866   prefix="$acl_final_prefix"
 2867   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 2868   prefix="$acl_save_prefix"
 2869 ])
 2870 
 2871 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 2872 dnl variables prefix and exec_prefix bound to the values they will have
 2873 dnl at the end of the configure script.
 2874 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 2875 [
 2876   acl_save_prefix="$prefix"
 2877   prefix="$acl_final_prefix"
 2878   acl_save_exec_prefix="$exec_prefix"
 2879   exec_prefix="$acl_final_exec_prefix"
 2880   $1
 2881   exec_prefix="$acl_save_exec_prefix"
 2882   prefix="$acl_save_prefix"
 2883 ])
 2884 
 2885 dnl AC_LIB_PREPARE_MULTILIB creates
 2886 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
 2887 dnl   "lib" or "lib64" or "lib/64",
 2888 dnl - a variable acl_libdirstem2, as a secondary possible value for
 2889 dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
 2890 dnl   "lib/amd64".
 2891 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
 2892 [
 2893   dnl There is no formal standard regarding lib and lib64.
 2894   dnl On glibc systems, the current practice is that on a system supporting
 2895   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 2896   dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
 2897   dnl the compiler's default mode by looking at the compiler's library search
 2898   dnl path. If at least one of its elements ends in /lib64 or points to a
 2899   dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
 2900   dnl Otherwise we use the default, namely "lib".
 2901   dnl On Solaris systems, the current practice is that on a system supporting
 2902   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 2903   dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
 2904   dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
 2905   AC_REQUIRE([AC_CANONICAL_HOST])
 2906   acl_libdirstem=lib
 2907   acl_libdirstem2=
 2908   case "$host_os" in
 2909     solaris*)
 2910       dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
 2911       dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
 2912       dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
 2913       dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
 2914       dnl symlink is missing, so we set acl_libdirstem2 too.
 2915       AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
 2916         [AC_EGREP_CPP([sixtyfour bits], [
 2917 #ifdef _LP64
 2918 sixtyfour bits
 2919 #endif
 2920            ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
 2921         ])
 2922       if test $gl_cv_solaris_64bit = yes; then
 2923         acl_libdirstem=lib/64
 2924         case "$host_cpu" in
 2925           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
 2926           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
 2927         esac
 2928       fi
 2929       ;;
 2930     *)
 2931       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
 2932       if test -n "$searchpath"; then
 2933         acl_save_IFS="${IFS= 	}"; IFS=":"
 2934         for searchdir in $searchpath; do
 2935           if test -d "$searchdir"; then
 2936             case "$searchdir" in
 2937               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
 2938               */../ | */.. )
 2939                 # Better ignore directories of this form. They are misleading.
 2940                 ;;
 2941               *) searchdir=`cd "$searchdir" && pwd`
 2942                  case "$searchdir" in
 2943                    */lib64 ) acl_libdirstem=lib64 ;;
 2944                  esac ;;
 2945             esac
 2946           fi
 2947         done
 2948         IFS="$acl_save_IFS"
 2949       fi
 2950       ;;
 2951   esac
 2952   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
 2953 ])
 2954 
 2955 # lock.m4 serial 13 (gettext-0.18.2)
 2956 dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
 2957 dnl This file is free software; the Free Software Foundation
 2958 dnl gives unlimited permission to copy and/or distribute it,
 2959 dnl with or without modifications, as long as this notice is preserved.
 2960 
 2961 dnl From Bruno Haible.
 2962 
 2963 AC_DEFUN([gl_LOCK],
 2964 [
 2965   AC_REQUIRE([gl_THREADLIB])
 2966   if test "$gl_threads_api" = posix; then
 2967     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
 2968     # pthread_rwlock_* functions.
 2969     AC_CHECK_TYPE([pthread_rwlock_t],
 2970       [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
 2971          [Define if the POSIX multithreading library has read/write locks.])],
 2972       [],
 2973       [#include <pthread.h>])
 2974     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
 2975     AC_COMPILE_IFELSE([
 2976       AC_LANG_PROGRAM(
 2977         [[#include <pthread.h>]],
 2978         [[
 2979 #if __FreeBSD__ == 4
 2980 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
 2981 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
 2982        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
 2983 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
 2984 #else
 2985 int x = (int)PTHREAD_MUTEX_RECURSIVE;
 2986 return !x;
 2987 #endif
 2988         ]])],
 2989       [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
 2990          [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
 2991   fi
 2992   gl_PREREQ_LOCK
 2993 ])
 2994 
 2995 # Prerequisites of lib/glthread/lock.c.
 2996 AC_DEFUN([gl_PREREQ_LOCK], [:])
 2997 
 2998 # longlong.m4 serial 17
 2999 dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
 3000 dnl This file is free software; the Free Software Foundation
 3001 dnl gives unlimited permission to copy and/or distribute it,
 3002 dnl with or without modifications, as long as this notice is preserved.
 3003 
 3004 dnl From Paul Eggert.
 3005 
 3006 # Define HAVE_LONG_LONG_INT if 'long long int' works.
 3007 # This fixes a bug in Autoconf 2.61, and can be faster
 3008 # than what's in Autoconf 2.62 through 2.68.
 3009 
 3010 # Note: If the type 'long long int' exists but is only 32 bits large
 3011 # (as on some very old compilers), HAVE_LONG_LONG_INT will not be
 3012 # defined. In this case you can treat 'long long int' like 'long int'.
 3013 
 3014 AC_DEFUN([AC_TYPE_LONG_LONG_INT],
 3015 [
 3016   AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
 3017   AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
 3018      [ac_cv_type_long_long_int=yes
 3019       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
 3020         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
 3021         if test $ac_cv_type_long_long_int = yes; then
 3022           dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
 3023           dnl If cross compiling, assume the bug is not important, since
 3024           dnl nobody cross compiles for this platform as far as we know.
 3025           AC_RUN_IFELSE(
 3026             [AC_LANG_PROGRAM(
 3027                [[@%:@include <limits.h>
 3028                  @%:@ifndef LLONG_MAX
 3029                  @%:@ define HALF \
 3030                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
 3031                  @%:@ define LLONG_MAX (HALF - 1 + HALF)
 3032                  @%:@endif]],
 3033                [[long long int n = 1;
 3034                  int i;
 3035                  for (i = 0; ; i++)
 3036                    {
 3037                      long long int m = n << i;
 3038                      if (m >> i != n)
 3039                        return 1;
 3040                      if (LLONG_MAX / 2 < m)
 3041                        break;
 3042                    }
 3043                  return 0;]])],
 3044             [],
 3045             [ac_cv_type_long_long_int=no],
 3046             [:])
 3047         fi
 3048       fi])
 3049   if test $ac_cv_type_long_long_int = yes; then
 3050     AC_DEFINE([HAVE_LONG_LONG_INT], [1],
 3051       [Define to 1 if the system has the type 'long long int'.])
 3052   fi
 3053 ])
 3054 
 3055 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
 3056 # This fixes a bug in Autoconf 2.61, and can be faster
 3057 # than what's in Autoconf 2.62 through 2.68.
 3058 
 3059 # Note: If the type 'unsigned long long int' exists but is only 32 bits
 3060 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
 3061 # will not be defined. In this case you can treat 'unsigned long long int'
 3062 # like 'unsigned long int'.
 3063 
 3064 AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
 3065 [
 3066   AC_CACHE_CHECK([for unsigned long long int],
 3067     [ac_cv_type_unsigned_long_long_int],
 3068     [ac_cv_type_unsigned_long_long_int=yes
 3069      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
 3070        AC_LINK_IFELSE(
 3071          [_AC_TYPE_LONG_LONG_SNIPPET],
 3072          [],
 3073          [ac_cv_type_unsigned_long_long_int=no])
 3074      fi])
 3075   if test $ac_cv_type_unsigned_long_long_int = yes; then
 3076     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
 3077       [Define to 1 if the system has the type 'unsigned long long int'.])
 3078   fi
 3079 ])
 3080 
 3081 # Expands to a C program that can be used to test for simultaneous support
 3082 # of 'long long' and 'unsigned long long'. We don't want to say that
 3083 # 'long long' is available if 'unsigned long long' is not, or vice versa,
 3084 # because too many programs rely on the symmetry between signed and unsigned
 3085 # integer types (excluding 'bool').
 3086 AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
 3087 [
 3088   AC_LANG_PROGRAM(
 3089     [[/* For now, do not test the preprocessor; as of 2007 there are too many
 3090          implementations with broken preprocessors.  Perhaps this can
 3091          be revisited in 2012.  In the meantime, code should not expect
 3092          #if to work with literals wider than 32 bits.  */
 3093       /* Test literals.  */
 3094       long long int ll = 9223372036854775807ll;
 3095       long long int nll = -9223372036854775807LL;
 3096       unsigned long long int ull = 18446744073709551615ULL;
 3097       /* Test constant expressions.   */
 3098       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
 3099                      ? 1 : -1)];
 3100       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
 3101                      ? 1 : -1)];
 3102       int i = 63;]],
 3103     [[/* Test availability of runtime routines for shift and division.  */
 3104       long long int llmax = 9223372036854775807ll;
 3105       unsigned long long int ullmax = 18446744073709551615ull;
 3106       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
 3107               | (llmax / ll) | (llmax % ll)
 3108               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
 3109               | (ullmax / ull) | (ullmax % ull));]])
 3110 ])
 3111 
 3112 # nls.m4 serial 5 (gettext-0.18)
 3113 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
 3114 dnl Foundation, Inc.
 3115 dnl This file is free software; the Free Software Foundation
 3116 dnl gives unlimited permission to copy and/or distribute it,
 3117 dnl with or without modifications, as long as this notice is preserved.
 3118 dnl
 3119 dnl This file can be used in projects which are not available under
 3120 dnl the GNU General Public License or the GNU Library General Public
 3121 dnl License but which still want to provide support for the GNU gettext
 3122 dnl functionality.
 3123 dnl Please note that the actual code of the GNU gettext library is covered
 3124 dnl by the GNU Library General Public License, and the rest of the GNU
 3125 dnl gettext package is covered by the GNU General Public License.
 3126 dnl They are *not* in the public domain.
 3127 
 3128 dnl Authors:
 3129 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 3130 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 3131 
 3132 AC_PREREQ([2.50])
 3133 
 3134 AC_DEFUN([AM_NLS],
 3135 [
 3136   AC_MSG_CHECKING([whether NLS is requested])
 3137   dnl Default is enabled NLS
 3138   AC_ARG_ENABLE([nls],
 3139     [  --disable-nls           do not use Native Language Support],
 3140     USE_NLS=$enableval, USE_NLS=yes)
 3141   AC_MSG_RESULT([$USE_NLS])
 3142   AC_SUBST([USE_NLS])
 3143 ])
 3144 
 3145 dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
 3146 dnl serial 11 (pkg-config-0.29.1)
 3147 dnl
 3148 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 3149 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
 3150 dnl
 3151 dnl This program is free software; you can redistribute it and/or modify
 3152 dnl it under the terms of the GNU General Public License as published by
 3153 dnl the Free Software Foundation; either version 2 of the License, or
 3154 dnl (at your option) any later version.
 3155 dnl
 3156 dnl This program is distributed in the hope that it will be useful, but
 3157 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
 3158 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 3159 dnl General Public License for more details.
 3160 dnl
 3161 dnl You should have received a copy of the GNU General Public License
 3162 dnl along with this program; if not, write to the Free Software
 3163 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 3164 dnl 02111-1307, USA.
 3165 dnl
 3166 dnl As a special exception to the GNU General Public License, if you
 3167 dnl distribute this file as part of a program that contains a
 3168 dnl configuration script generated by Autoconf, you may include it under
 3169 dnl the same distribution terms that you use for the rest of that
 3170 dnl program.
 3171 
 3172 dnl PKG_PREREQ(MIN-VERSION)
 3173 dnl -----------------------
 3174 dnl Since: 0.29
 3175 dnl
 3176 dnl Verify that the version of the pkg-config macros are at least
 3177 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
 3178 dnl installed version of pkg-config, this checks the developer's version
 3179 dnl of pkg.m4 when generating configure.
 3180 dnl
 3181 dnl To ensure that this macro is defined, also add:
 3182 dnl m4_ifndef([PKG_PREREQ],
 3183 dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
 3184 dnl
 3185 dnl See the "Since" comment for each macro you use to see what version
 3186 dnl of the macros you require.
 3187 m4_defun([PKG_PREREQ],
 3188 [m4_define([PKG_MACROS_VERSION], [0.29.1])
 3189 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
 3190     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 3191 ])dnl PKG_PREREQ
 3192 
 3193 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
 3194 dnl ----------------------------------
 3195 dnl Since: 0.16
 3196 dnl
 3197 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
 3198 dnl first found in the path. Checks that the version of pkg-config found
 3199 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
 3200 dnl used since that's the first version where most current features of
 3201 dnl pkg-config existed.
 3202 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 3203 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 3204 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 3205 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 3206 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 3207 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 3208 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 3209 
 3210 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 3211 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 3212 fi
 3213 if test -n "$PKG_CONFIG"; then
 3214 	_pkg_min_version=m4_default([$1], [0.9.0])
 3215 	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 3216 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 3217 		AC_MSG_RESULT([yes])
 3218 	else
 3219 		AC_MSG_RESULT([no])
 3220 		PKG_CONFIG=""
 3221 	fi
 3222 fi[]dnl
 3223 ])dnl PKG_PROG_PKG_CONFIG
 3224 
 3225 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 3226 dnl -------------------------------------------------------------------
 3227 dnl Since: 0.18
 3228 dnl
 3229 dnl Check to see whether a particular set of modules exists. Similar to
 3230 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
 3231 dnl
 3232 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 3233 dnl only at the first occurence in configure.ac, so if the first place
 3234 dnl it's called might be skipped (such as if it is within an "if", you
 3235 dnl have to call PKG_CHECK_EXISTS manually
 3236 AC_DEFUN([PKG_CHECK_EXISTS],
 3237 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 3238 if test -n "$PKG_CONFIG" && \
 3239     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 3240   m4_default([$2], [:])
 3241 m4_ifvaln([$3], [else
 3242   $3])dnl
 3243 fi])
 3244 
 3245 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 3246 dnl ---------------------------------------------
 3247 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
 3248 dnl pkg_failed based on the result.
 3249 m4_define([_PKG_CONFIG],
 3250 [if test -n "$$1"; then
 3251     pkg_cv_[]$1="$$1"
 3252  elif test -n "$PKG_CONFIG"; then
 3253     PKG_CHECK_EXISTS([$3],
 3254                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 3255 		      test "x$?" != "x0" && pkg_failed=yes ],
 3256 		     [pkg_failed=yes])
 3257  else
 3258     pkg_failed=untried
 3259 fi[]dnl
 3260 ])dnl _PKG_CONFIG
 3261 
 3262 dnl _PKG_SHORT_ERRORS_SUPPORTED
 3263 dnl ---------------------------
 3264 dnl Internal check to see if pkg-config supports short errors.
 3265 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 3266 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 3267 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 3268         _pkg_short_errors_supported=yes
 3269 else
 3270         _pkg_short_errors_supported=no
 3271 fi[]dnl
 3272 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
 3273 
 3274 
 3275 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 3276 dnl   [ACTION-IF-NOT-FOUND])
 3277 dnl --------------------------------------------------------------
 3278 dnl Since: 0.4.0
 3279 dnl
 3280 dnl Note that if there is a possibility the first call to
 3281 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
 3282 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 3283 AC_DEFUN([PKG_CHECK_MODULES],
 3284 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 3285 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 3286 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 3287 
 3288 pkg_failed=no
 3289 AC_MSG_CHECKING([for $1])
 3290 
 3291 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 3292 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
 3293 
 3294 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 3295 and $1[]_LIBS to avoid the need to call pkg-config.
 3296 See the pkg-config man page for more details.])
 3297 
 3298 if test $pkg_failed = yes; then
 3299    	AC_MSG_RESULT([no])
 3300         _PKG_SHORT_ERRORS_SUPPORTED
 3301         if test $_pkg_short_errors_supported = yes; then
 3302 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 3303         else 
 3304 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 3305         fi
 3306 	# Put the nasty error message in config.log where it belongs
 3307 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 3308 
 3309 	m4_default([$4], [AC_MSG_ERROR(
 3310 [Package requirements ($2) were not met:
 3311 
 3312 $$1_PKG_ERRORS
 3313 
 3314 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 3315 installed software in a non-standard prefix.
 3316 
 3317 _PKG_TEXT])[]dnl
 3318         ])
 3319 elif test $pkg_failed = untried; then
 3320      	AC_MSG_RESULT([no])
 3321 	m4_default([$4], [AC_MSG_FAILURE(
 3322 [The pkg-config script could not be found or is too old.  Make sure it
 3323 is in your PATH or set the PKG_CONFIG environment variable to the full
 3324 path to pkg-config.
 3325 
 3326 _PKG_TEXT
 3327 
 3328 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 3329         ])
 3330 else
 3331 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 3332 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 3333         AC_MSG_RESULT([yes])
 3334 	$3
 3335 fi[]dnl
 3336 ])dnl PKG_CHECK_MODULES
 3337 
 3338 
 3339 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 3340 dnl   [ACTION-IF-NOT-FOUND])
 3341 dnl ---------------------------------------------------------------------
 3342 dnl Since: 0.29
 3343 dnl
 3344 dnl Checks for existence of MODULES and gathers its build flags with
 3345 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
 3346 dnl and VARIABLE-PREFIX_LIBS from --libs.
 3347 dnl
 3348 dnl Note that if there is a possibility the first call to
 3349 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
 3350 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
 3351 dnl configure.ac.
 3352 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
 3353 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 3354 _save_PKG_CONFIG=$PKG_CONFIG
 3355 PKG_CONFIG="$PKG_CONFIG --static"
 3356 PKG_CHECK_MODULES($@)
 3357 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
 3358 ])dnl PKG_CHECK_MODULES_STATIC
 3359 
 3360 
 3361 dnl PKG_INSTALLDIR([DIRECTORY])
 3362 dnl -------------------------
 3363 dnl Since: 0.27
 3364 dnl
 3365 dnl Substitutes the variable pkgconfigdir as the location where a module
 3366 dnl should install pkg-config .pc files. By default the directory is
 3367 dnl $libdir/pkgconfig, but the default can be changed by passing
 3368 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
 3369 dnl parameter.
 3370 AC_DEFUN([PKG_INSTALLDIR],
 3371 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
 3372 m4_pushdef([pkg_description],
 3373     [pkg-config installation directory @<:@]pkg_default[@:>@])
 3374 AC_ARG_WITH([pkgconfigdir],
 3375     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
 3376     [with_pkgconfigdir=]pkg_default)
 3377 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
 3378 m4_popdef([pkg_default])
 3379 m4_popdef([pkg_description])
 3380 ])dnl PKG_INSTALLDIR
 3381 
 3382 
 3383 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
 3384 dnl --------------------------------
 3385 dnl Since: 0.27
 3386 dnl
 3387 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
 3388 dnl module should install arch-independent pkg-config .pc files. By
 3389 dnl default the directory is $datadir/pkgconfig, but the default can be
 3390 dnl changed by passing DIRECTORY. The user can override through the
 3391 dnl --with-noarch-pkgconfigdir parameter.
 3392 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
 3393 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
 3394 m4_pushdef([pkg_description],
 3395     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
 3396 AC_ARG_WITH([noarch-pkgconfigdir],
 3397     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
 3398     [with_noarch_pkgconfigdir=]pkg_default)
 3399 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
 3400 m4_popdef([pkg_default])
 3401 m4_popdef([pkg_description])
 3402 ])dnl PKG_NOARCH_INSTALLDIR
 3403 
 3404 
 3405 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
 3406 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 3407 dnl -------------------------------------------
 3408 dnl Since: 0.28
 3409 dnl
 3410 dnl Retrieves the value of the pkg-config variable for the given module.
 3411 AC_DEFUN([PKG_CHECK_VAR],
 3412 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 3413 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
 3414 
 3415 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
 3416 AS_VAR_COPY([$1], [pkg_cv_][$1])
 3417 
 3418 AS_VAR_IF([$1], [""], [$5], [$4])dnl
 3419 ])dnl PKG_CHECK_VAR
 3420 
 3421 # po.m4 serial 24 (gettext-0.19)
 3422 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
 3423 dnl This file is free software; the Free Software Foundation
 3424 dnl gives unlimited permission to copy and/or distribute it,
 3425 dnl with or without modifications, as long as this notice is preserved.
 3426 dnl
 3427 dnl This file can be used in projects which are not available under
 3428 dnl the GNU General Public License or the GNU Library General Public
 3429 dnl License but which still want to provide support for the GNU gettext
 3430 dnl functionality.
 3431 dnl Please note that the actual code of the GNU gettext library is covered
 3432 dnl by the GNU Library General Public License, and the rest of the GNU
 3433 dnl gettext package is covered by the GNU General Public License.
 3434 dnl They are *not* in the public domain.
 3435 
 3436 dnl Authors:
 3437 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 3438 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 3439 
 3440 AC_PREREQ([2.60])
 3441 
 3442 dnl Checks for all prerequisites of the po subdirectory.
 3443 AC_DEFUN([AM_PO_SUBDIRS],
 3444 [
 3445   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 3446   AC_REQUIRE([AC_PROG_INSTALL])dnl
 3447   AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 3448   AC_REQUIRE([AC_PROG_SED])dnl
 3449   AC_REQUIRE([AM_NLS])dnl
 3450 
 3451   dnl Release version of the gettext macros. This is used to ensure that
 3452   dnl the gettext macros and po/Makefile.in.in are in sync.
 3453   AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
 3454 
 3455   dnl Perform the following tests also if --disable-nls has been given,
 3456   dnl because they are needed for "make dist" to work.
 3457 
 3458   dnl Search for GNU msgfmt in the PATH.
 3459   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
 3460   dnl The second test excludes FreeBSD msgfmt.
 3461   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 3462     [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
 3463      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 3464     :)
 3465   AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
 3466 
 3467   dnl Test whether it is GNU msgfmt >= 0.15.
 3468 changequote(,)dnl
 3469   case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 3470     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
 3471     *) MSGFMT_015=$MSGFMT ;;
 3472   esac
 3473 changequote([,])dnl
 3474   AC_SUBST([MSGFMT_015])
 3475 changequote(,)dnl
 3476   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 3477     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
 3478     *) GMSGFMT_015=$GMSGFMT ;;
 3479   esac
 3480 changequote([,])dnl
 3481   AC_SUBST([GMSGFMT_015])
 3482 
 3483   dnl Search for GNU xgettext 0.12 or newer in the PATH.
 3484   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
 3485   dnl The second test excludes FreeBSD xgettext.
 3486   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 3487     [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
 3488      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 3489     :)
 3490   dnl Remove leftover from FreeBSD xgettext call.
 3491   rm -f messages.po
 3492 
 3493   dnl Test whether it is GNU xgettext >= 0.15.
 3494 changequote(,)dnl
 3495   case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 3496     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
 3497     *) XGETTEXT_015=$XGETTEXT ;;
 3498   esac
 3499 changequote([,])dnl
 3500   AC_SUBST([XGETTEXT_015])
 3501 
 3502   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
 3503   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
 3504     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
 3505 
 3506   dnl Installation directories.
 3507   dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
 3508   dnl have to define it here, so that it can be used in po/Makefile.
 3509   test -n "$localedir" || localedir='${datadir}/locale'
 3510   AC_SUBST([localedir])
 3511 
 3512   dnl Support for AM_XGETTEXT_OPTION.
 3513   test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
 3514   AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
 3515 
 3516   AC_CONFIG_COMMANDS([po-directories], [[
 3517     for ac_file in $CONFIG_FILES; do
 3518       # Support "outfile[:infile[:infile...]]"
 3519       case "$ac_file" in
 3520         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 3521       esac
 3522       # PO directories have a Makefile.in generated from Makefile.in.in.
 3523       case "$ac_file" in */Makefile.in)
 3524         # Adjust a relative srcdir.
 3525         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 3526         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
 3527         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 3528         # In autoconf-2.13 it is called $ac_given_srcdir.
 3529         # In autoconf-2.50 it is called $srcdir.
 3530         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 3531         case "$ac_given_srcdir" in
 3532           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 3533           /*) top_srcdir="$ac_given_srcdir" ;;
 3534           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 3535         esac
 3536         # Treat a directory as a PO directory if and only if it has a
 3537         # POTFILES.in file. This allows packages to have multiple PO
 3538         # directories under different names or in different locations.
 3539         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
 3540           rm -f "$ac_dir/POTFILES"
 3541           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
 3542           gt_tab=`printf '\t'`
 3543           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 3544           POMAKEFILEDEPS="POTFILES.in"
 3545           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
 3546           # on $ac_dir but don't depend on user-specified configuration
 3547           # parameters.
 3548           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 3549             # The LINGUAS file contains the set of available languages.
 3550             if test -n "$OBSOLETE_ALL_LINGUAS"; then
 3551               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 3552             fi
 3553             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 3554             # Hide the ALL_LINGUAS assignment from automake < 1.5.
 3555             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 3556             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 3557           else
 3558             # The set of available languages was given in configure.in.
 3559             # Hide the ALL_LINGUAS assignment from automake < 1.5.
 3560             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
 3561           fi
 3562           # Compute POFILES
 3563           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 3564           # Compute UPDATEPOFILES
 3565           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 3566           # Compute DUMMYPOFILES
 3567           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 3568           # Compute GMOFILES
 3569           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 3570           case "$ac_given_srcdir" in
 3571             .) srcdirpre= ;;
 3572             *) srcdirpre='$(srcdir)/' ;;
 3573           esac
 3574           POFILES=
 3575           UPDATEPOFILES=
 3576           DUMMYPOFILES=
 3577           GMOFILES=
 3578           for lang in $ALL_LINGUAS; do
 3579             POFILES="$POFILES $srcdirpre$lang.po"
 3580             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 3581             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 3582             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 3583           done
 3584           # CATALOGS depends on both $ac_dir and the user's LINGUAS
 3585           # environment variable.
 3586           INST_LINGUAS=
 3587           if test -n "$ALL_LINGUAS"; then
 3588             for presentlang in $ALL_LINGUAS; do
 3589               useit=no
 3590               if test "%UNSET%" != "$LINGUAS"; then
 3591                 desiredlanguages="$LINGUAS"
 3592               else
 3593                 desiredlanguages="$ALL_LINGUAS"
 3594               fi
 3595               for desiredlang in $desiredlanguages; do
 3596                 # Use the presentlang catalog if desiredlang is
 3597                 #   a. equal to presentlang, or
 3598                 #   b. a variant of presentlang (because in this case,
 3599                 #      presentlang can be used as a fallback for messages
 3600                 #      which are not translated in the desiredlang catalog).
 3601                 case "$desiredlang" in
 3602                   "$presentlang"*) useit=yes;;
 3603                 esac
 3604               done
 3605               if test $useit = yes; then
 3606                 INST_LINGUAS="$INST_LINGUAS $presentlang"
 3607               fi
 3608             done
 3609           fi
 3610           CATALOGS=
 3611           if test -n "$INST_LINGUAS"; then
 3612             for lang in $INST_LINGUAS; do
 3613               CATALOGS="$CATALOGS $lang.gmo"
 3614             done
 3615           fi
 3616           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
 3617           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
 3618           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
 3619             if test -f "$f"; then
 3620               case "$f" in
 3621                 *.orig | *.bak | *~) ;;
 3622                 *) cat "$f" >> "$ac_dir/Makefile" ;;
 3623               esac
 3624             fi
 3625           done
 3626         fi
 3627         ;;
 3628       esac
 3629     done]],
 3630    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
 3631     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
 3632     # from automake < 1.5.
 3633     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
 3634     # Capture the value of LINGUAS because we need it to compute CATALOGS.
 3635     LINGUAS="${LINGUAS-%UNSET%}"
 3636    ])
 3637 ])
 3638 
 3639 dnl Postprocesses a Makefile in a directory containing PO files.
 3640 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
 3641 [
 3642   # When this code is run, in config.status, two variables have already been
 3643   # set:
 3644   # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
 3645   # - LINGUAS is the value of the environment variable LINGUAS at configure
 3646   #   time.
 3647 
 3648 changequote(,)dnl
 3649   # Adjust a relative srcdir.
 3650   ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 3651   ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
 3652   ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 3653   # In autoconf-2.13 it is called $ac_given_srcdir.
 3654   # In autoconf-2.50 it is called $srcdir.
 3655   test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 3656   case "$ac_given_srcdir" in
 3657     .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 3658     /*) top_srcdir="$ac_given_srcdir" ;;
 3659     *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 3660   esac
 3661 
 3662   # Find a way to echo strings without interpreting backslash.
 3663   if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
 3664     gt_echo='echo'
 3665   else
 3666     if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
 3667       gt_echo='printf %s\n'
 3668     else
 3669       echo_func () {
 3670         cat <<EOT
 3671 $*
 3672 EOT
 3673       }
 3674       gt_echo='echo_func'
 3675     fi
 3676   fi
 3677 
 3678   # A sed script that extracts the value of VARIABLE from a Makefile.
 3679   tab=`printf '\t'`
 3680   sed_x_variable='
 3681 # Test if the hold space is empty.
 3682 x
 3683 s/P/P/
 3684 x
 3685 ta
 3686 # Yes it was empty. Look if we have the expected variable definition.
 3687 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
 3688   # Seen the first line of the variable definition.
 3689   s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
 3690   ba
 3691 }
 3692 bd
 3693 :a
 3694 # Here we are processing a line from the variable definition.
 3695 # Remove comment, more precisely replace it with a space.
 3696 s/#.*$/ /
 3697 # See if the line ends in a backslash.
 3698 tb
 3699 :b
 3700 s/\\$//
 3701 # Print the line, without the trailing backslash.
 3702 p
 3703 tc
 3704 # There was no trailing backslash. The end of the variable definition is
 3705 # reached. Clear the hold space.
 3706 s/^.*$//
 3707 x
 3708 bd
 3709 :c
 3710 # A trailing backslash means that the variable definition continues in the
 3711 # next line. Put a nonempty string into the hold space to indicate this.
 3712 s/^.*$/P/
 3713 x
 3714 :d
 3715 '
 3716 changequote([,])dnl
 3717 
 3718   # Set POTFILES to the value of the Makefile variable POTFILES.
 3719   sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
 3720   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
 3721   # Compute POTFILES_DEPS as
 3722   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
 3723   POTFILES_DEPS=
 3724   for file in $POTFILES; do
 3725     POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
 3726   done
 3727   POMAKEFILEDEPS=""
 3728 
 3729   if test -n "$OBSOLETE_ALL_LINGUAS"; then
 3730     test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 3731   fi
 3732   if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 3733     # The LINGUAS file contains the set of available languages.
 3734     ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 3735     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 3736   else
 3737     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
 3738     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
 3739     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
 3740   fi
 3741   # Hide the ALL_LINGUAS assignment from automake < 1.5.
 3742   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 3743   # Compute POFILES
 3744   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 3745   # Compute UPDATEPOFILES
 3746   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 3747   # Compute DUMMYPOFILES
 3748   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 3749   # Compute GMOFILES
 3750   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 3751   # Compute PROPERTIESFILES
 3752   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
 3753   # Compute CLASSFILES
 3754   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
 3755   # Compute QMFILES
 3756   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
 3757   # Compute MSGFILES
 3758   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
 3759   # Compute RESOURCESDLLFILES
 3760   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
 3761   case "$ac_given_srcdir" in
 3762     .) srcdirpre= ;;
 3763     *) srcdirpre='$(srcdir)/' ;;
 3764   esac
 3765   POFILES=
 3766   UPDATEPOFILES=
 3767   DUMMYPOFILES=
 3768   GMOFILES=
 3769   PROPERTIESFILES=
 3770   CLASSFILES=
 3771   QMFILES=
 3772   MSGFILES=
 3773   RESOURCESDLLFILES=
 3774   for lang in $ALL_LINGUAS; do
 3775     POFILES="$POFILES $srcdirpre$lang.po"
 3776     UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 3777     DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 3778     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 3779     PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
 3780     CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
 3781     QMFILES="$QMFILES $srcdirpre$lang.qm"
 3782     frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 3783     MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
 3784     frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 3785     RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
 3786   done
 3787   # CATALOGS depends on both $ac_dir and the user's LINGUAS
 3788   # environment variable.
 3789   INST_LINGUAS=
 3790   if test -n "$ALL_LINGUAS"; then
 3791     for presentlang in $ALL_LINGUAS; do
 3792       useit=no
 3793       if test "%UNSET%" != "$LINGUAS"; then
 3794         desiredlanguages="$LINGUAS"
 3795       else
 3796         desiredlanguages="$ALL_LINGUAS"
 3797       fi
 3798       for desiredlang in $desiredlanguages; do
 3799         # Use the presentlang catalog if desiredlang is
 3800         #   a. equal to presentlang, or
 3801         #   b. a variant of presentlang (because in this case,
 3802         #      presentlang can be used as a fallback for messages
 3803         #      which are not translated in the desiredlang catalog).
 3804         case "$desiredlang" in
 3805           "$presentlang"*) useit=yes;;
 3806         esac
 3807       done
 3808       if test $useit = yes; then
 3809         INST_LINGUAS="$INST_LINGUAS $presentlang"
 3810       fi
 3811     done
 3812   fi
 3813   CATALOGS=
 3814   JAVACATALOGS=
 3815   QTCATALOGS=
 3816   TCLCATALOGS=
 3817   CSHARPCATALOGS=
 3818   if test -n "$INST_LINGUAS"; then
 3819     for lang in $INST_LINGUAS; do
 3820       CATALOGS="$CATALOGS $lang.gmo"
 3821       JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
 3822       QTCATALOGS="$QTCATALOGS $lang.qm"
 3823       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 3824       TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
 3825       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 3826       CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
 3827     done
 3828   fi
 3829 
 3830   sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
 3831   tab=`printf '\t'`
 3832   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
 3833     # Add dependencies that cannot be formulated as a simple suffix rule.
 3834     for lang in $ALL_LINGUAS; do
 3835       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 3836       cat >> "$ac_file.tmp" <<EOF
 3837 $frobbedlang.msg: $lang.po
 3838 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 3839 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 3840 EOF
 3841     done
 3842   fi
 3843   if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
 3844     # Add dependencies that cannot be formulated as a simple suffix rule.
 3845     for lang in $ALL_LINGUAS; do
 3846       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 3847       cat >> "$ac_file.tmp" <<EOF
 3848 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
 3849 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 3850 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 3851 EOF
 3852     done
 3853   fi
 3854   if test -n "$POMAKEFILEDEPS"; then
 3855     cat >> "$ac_file.tmp" <<EOF
 3856 Makefile: $POMAKEFILEDEPS
 3857 EOF
 3858   fi
 3859   mv "$ac_file.tmp" "$ac_file"
 3860 ])
 3861 
 3862 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
 3863 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
 3864 [
 3865   XGETTEXT_EXTRA_OPTIONS=
 3866 ])
 3867 
 3868 dnl Registers an option to be passed to xgettext in the po subdirectory.
 3869 AC_DEFUN([AM_XGETTEXT_OPTION],
 3870 [
 3871   AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
 3872   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
 3873 ])
 3874 
 3875 # printf-posix.m4 serial 6 (gettext-0.18.2)
 3876 dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc.
 3877 dnl This file is free software; the Free Software Foundation
 3878 dnl gives unlimited permission to copy and/or distribute it,
 3879 dnl with or without modifications, as long as this notice is preserved.
 3880 
 3881 dnl From Bruno Haible.
 3882 dnl Test whether the printf() function supports POSIX/XSI format strings with
 3883 dnl positions.
 3884 
 3885 AC_DEFUN([gt_PRINTF_POSIX],
 3886 [
 3887   AC_REQUIRE([AC_PROG_CC])
 3888   AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
 3889     gt_cv_func_printf_posix,
 3890     [
 3891       AC_RUN_IFELSE(
 3892         [AC_LANG_SOURCE([[
 3893 #include <stdio.h>
 3894 #include <string.h>
 3895 /* The string "%2$d %1$d", with dollar characters protected from the shell's
 3896    dollar expansion (possibly an autoconf bug).  */
 3897 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
 3898 static char buf[100];
 3899 int main ()
 3900 {
 3901   sprintf (buf, format, 33, 55);
 3902   return (strcmp (buf, "55 33") != 0);
 3903 }]])],
 3904         [gt_cv_func_printf_posix=yes],
 3905         [gt_cv_func_printf_posix=no],
 3906         [
 3907           AC_EGREP_CPP([notposix], [
 3908 #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
 3909   notposix
 3910 #endif
 3911             ],
 3912             [gt_cv_func_printf_posix="guessing no"],
 3913             [gt_cv_func_printf_posix="guessing yes"])
 3914         ])
 3915     ])
 3916   case $gt_cv_func_printf_posix in
 3917     *yes)
 3918       AC_DEFINE([HAVE_POSIX_PRINTF], [1],
 3919         [Define if your printf() function supports format strings with positions.])
 3920       ;;
 3921   esac
 3922 ])
 3923 
 3924 # progtest.m4 serial 7 (gettext-0.18.2)
 3925 dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
 3926 dnl This file is free software; the Free Software Foundation
 3927 dnl gives unlimited permission to copy and/or distribute it,
 3928 dnl with or without modifications, as long as this notice is preserved.
 3929 dnl
 3930 dnl This file can be used in projects which are not available under
 3931 dnl the GNU General Public License or the GNU Library General Public
 3932 dnl License but which still want to provide support for the GNU gettext
 3933 dnl functionality.
 3934 dnl Please note that the actual code of the GNU gettext library is covered
 3935 dnl by the GNU Library General Public License, and the rest of the GNU
 3936 dnl gettext package is covered by the GNU General Public License.
 3937 dnl They are *not* in the public domain.
 3938 
 3939 dnl Authors:
 3940 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
 3941 
 3942 AC_PREREQ([2.50])
 3943 
 3944 # Search path for a program which passes the given test.
 3945 
 3946 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 3947 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 3948 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
 3949 [
 3950 # Prepare PATH_SEPARATOR.
 3951 # The user is always right.
 3952 if test "${PATH_SEPARATOR+set}" != set; then
 3953   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
 3954   # contains only /bin. Note that ksh looks also at the FPATH variable,
 3955   # so we have to set that as well for the test.
 3956   PATH_SEPARATOR=:
 3957   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
 3958     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
 3959            || PATH_SEPARATOR=';'
 3960        }
 3961 fi
 3962 
 3963 # Find out how to test for executable files. Don't use a zero-byte file,
 3964 # as systems may use methods other than mode bits to determine executability.
 3965 cat >conf$$.file <<_ASEOF
 3966 #! /bin/sh
 3967 exit 0
 3968 _ASEOF
 3969 chmod +x conf$$.file
 3970 if test -x conf$$.file >/dev/null 2>&1; then
 3971   ac_executable_p="test -x"
 3972 else
 3973   ac_executable_p="test -f"
 3974 fi
 3975 rm -f conf$$.file
 3976 
 3977 # Extract the first word of "$2", so it can be a program name with args.
 3978 set dummy $2; ac_word=[$]2
 3979 AC_MSG_CHECKING([for $ac_word])
 3980 AC_CACHE_VAL([ac_cv_path_$1],
 3981 [case "[$]$1" in
 3982   [[\\/]]* | ?:[[\\/]]*)
 3983     ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 3984     ;;
 3985   *)
 3986     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
 3987     for ac_dir in ifelse([$5], , $PATH, [$5]); do
 3988       IFS="$ac_save_IFS"
 3989       test -z "$ac_dir" && ac_dir=.
 3990       for ac_exec_ext in '' $ac_executable_extensions; do
 3991         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
 3992           echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
 3993           if [$3]; then
 3994             ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
 3995             break 2
 3996           fi
 3997         fi
 3998       done
 3999     done
 4000     IFS="$ac_save_IFS"
 4001 dnl If no 4th arg is given, leave the cache variable unset,
 4002 dnl so AC_PATH_PROGS will keep looking.
 4003 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 4004 ])dnl
 4005     ;;
 4006 esac])dnl
 4007 $1="$ac_cv_path_$1"
 4008 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 4009   AC_MSG_RESULT([$][$1])
 4010 else
 4011   AC_MSG_RESULT([no])
 4012 fi
 4013 AC_SUBST([$1])dnl
 4014 ])
 4015 
 4016 # size_max.m4 serial 10
 4017 dnl Copyright (C) 2003, 2005-2006, 2008-2016 Free Software Foundation, Inc.
 4018 dnl This file is free software; the Free Software Foundation
 4019 dnl gives unlimited permission to copy and/or distribute it,
 4020 dnl with or without modifications, as long as this notice is preserved.
 4021 
 4022 dnl From Bruno Haible.
 4023 
 4024 AC_DEFUN([gl_SIZE_MAX],
 4025 [
 4026   AC_CHECK_HEADERS([stdint.h])
 4027   dnl First test whether the system already has SIZE_MAX.
 4028   AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
 4029     gl_cv_size_max=
 4030     AC_EGREP_CPP([Found it], [
 4031 #include <limits.h>
 4032 #if HAVE_STDINT_H
 4033 #include <stdint.h>
 4034 #endif
 4035 #ifdef SIZE_MAX
 4036 Found it
 4037 #endif
 4038 ], [gl_cv_size_max=yes])
 4039     if test -z "$gl_cv_size_max"; then
 4040       dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
 4041       dnl than the type 'unsigned long'. Try hard to find a definition that can
 4042       dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
 4043       AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
 4044         [#include <stddef.h>
 4045 #include <limits.h>], [size_t_bits_minus_1=])
 4046       AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
 4047         [#include <stddef.h>], [fits_in_uint=])
 4048       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
 4049         if test $fits_in_uint = 1; then
 4050           dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
 4051           dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
 4052           AC_COMPILE_IFELSE(
 4053             [AC_LANG_PROGRAM(
 4054                [[#include <stddef.h>
 4055                  extern size_t foo;
 4056                  extern unsigned long foo;
 4057                ]],
 4058                [[]])],
 4059             [fits_in_uint=0])
 4060         fi
 4061         dnl We cannot use 'expr' to simplify this expression, because 'expr'
 4062         dnl works only with 'long' integers in the host environment, while we
 4063         dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
 4064         if test $fits_in_uint = 1; then
 4065           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
 4066         else
 4067           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
 4068         fi
 4069       else
 4070         dnl Shouldn't happen, but who knows...
 4071         gl_cv_size_max='((size_t)~(size_t)0)'
 4072       fi
 4073     fi
 4074   ])
 4075   if test "$gl_cv_size_max" != yes; then
 4076     AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
 4077       [Define as the maximum value of type 'size_t', if the system doesn't define it.])
 4078   fi
 4079   dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
 4080   dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
 4081   dnl #define by AC_DEFINE_UNQUOTED.
 4082   AH_VERBATIM([SIZE_MAX],
 4083 [/* Define as the maximum value of type 'size_t', if the system doesn't define
 4084    it. */
 4085 #ifndef SIZE_MAX
 4086 # undef SIZE_MAX
 4087 #endif])
 4088 ])
 4089 
 4090 dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
 4091 dnl Remove this when we can assume autoconf >= 2.61.
 4092 m4_ifdef([AC_COMPUTE_INT], [], [
 4093   AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
 4094 ])
 4095 
 4096 # stdint_h.m4 serial 9
 4097 dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
 4098 dnl This file is free software; the Free Software Foundation
 4099 dnl gives unlimited permission to copy and/or distribute it,
 4100 dnl with or without modifications, as long as this notice is preserved.
 4101 
 4102 dnl From Paul Eggert.
 4103 
 4104 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
 4105 # doesn't clash with <sys/types.h>, and declares uintmax_t.
 4106 
 4107 AC_DEFUN([gl_AC_HEADER_STDINT_H],
 4108 [
 4109   AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
 4110     [AC_COMPILE_IFELSE(
 4111        [AC_LANG_PROGRAM(
 4112           [[#include <sys/types.h>
 4113             #include <stdint.h>]],
 4114           [[uintmax_t i = (uintmax_t) -1; return !i;]])],
 4115        [gl_cv_header_stdint_h=yes],
 4116        [gl_cv_header_stdint_h=no])])
 4117   if test $gl_cv_header_stdint_h = yes; then
 4118     AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
 4119       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
 4120        and declares uintmax_t. ])
 4121   fi
 4122 ])
 4123 
 4124 # threadlib.m4 serial 11 (gettext-0.18.2)
 4125 dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
 4126 dnl This file is free software; the Free Software Foundation
 4127 dnl gives unlimited permission to copy and/or distribute it,
 4128 dnl with or without modifications, as long as this notice is preserved.
 4129 
 4130 dnl From Bruno Haible.
 4131 
 4132 dnl gl_THREADLIB
 4133 dnl ------------
 4134 dnl Tests for a multithreading library to be used.
 4135 dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
 4136 dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
 4137 dnl default is 'no', otherwise it is system dependent. In both cases, the user
 4138 dnl can change the choice through the options --enable-threads=choice or
 4139 dnl --disable-threads.
 4140 dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
 4141 dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
 4142 dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
 4143 dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
 4144 dnl libtool).
 4145 dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
 4146 dnl programs that really need multithread functionality. The difference
 4147 dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
 4148 dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
 4149 dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
 4150 dnl multithread-safe programs.
 4151 
 4152 AC_DEFUN([gl_THREADLIB_EARLY],
 4153 [
 4154   AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
 4155 ])
 4156 
 4157 dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
 4158 
 4159 AC_DEFUN([gl_THREADLIB_EARLY_BODY],
 4160 [
 4161   dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
 4162   dnl influences the result of the autoconf tests that test for *_unlocked
 4163   dnl declarations, on AIX 5 at least. Therefore it must come early.
 4164   AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
 4165   AC_BEFORE([$0], [gl_ARGP])dnl
 4166 
 4167   AC_REQUIRE([AC_CANONICAL_HOST])
 4168   dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
 4169   dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
 4170   dnl AC_GNU_SOURCE.
 4171   m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
 4172     [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
 4173     [AC_REQUIRE([AC_GNU_SOURCE])])
 4174   dnl Check for multithreading.
 4175   m4_ifdef([gl_THREADLIB_DEFAULT_NO],
 4176     [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
 4177     [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
 4178   AC_ARG_ENABLE([threads],
 4179 AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
 4180 AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
 4181     [gl_use_threads=$enableval],
 4182     [if test -n "$gl_use_threads_default"; then
 4183        gl_use_threads="$gl_use_threads_default"
 4184      else
 4185 changequote(,)dnl
 4186        case "$host_os" in
 4187          dnl Disable multithreading by default on OSF/1, because it interferes
 4188          dnl with fork()/exec(): When msgexec is linked with -lpthread, its
 4189          dnl child process gets an endless segmentation fault inside execvp().
 4190          dnl Disable multithreading by default on Cygwin 1.5.x, because it has
 4191          dnl bugs that lead to endless loops or crashes. See
 4192          dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
 4193          osf*) gl_use_threads=no ;;
 4194          cygwin*)
 4195                case `uname -r` in
 4196                  1.[0-5].*) gl_use_threads=no ;;
 4197                  *)         gl_use_threads=yes ;;
 4198                esac
 4199                ;;
 4200          *)    gl_use_threads=yes ;;
 4201        esac
 4202 changequote([,])dnl
 4203      fi
 4204     ])
 4205   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
 4206     # For using <pthread.h>:
 4207     case "$host_os" in
 4208       osf*)
 4209         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
 4210         # groks <pthread.h>. cc also understands the flag -pthread, but
 4211         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
 4212         # 2. putting a flag into CPPFLAGS that has an effect on the linker
 4213         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
 4214         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
 4215         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
 4216         ;;
 4217     esac
 4218     # Some systems optimize for single-threaded programs by default, and
 4219     # need special flags to disable these optimizations. For example, the
 4220     # definition of 'errno' in <errno.h>.
 4221     case "$host_os" in
 4222       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
 4223       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
 4224     esac
 4225   fi
 4226 ])
 4227 
 4228 dnl The guts of gl_THREADLIB. Needs to be expanded only once.
 4229 
 4230 AC_DEFUN([gl_THREADLIB_BODY],
 4231 [
 4232   AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
 4233   gl_threads_api=none
 4234   LIBTHREAD=
 4235   LTLIBTHREAD=
 4236   LIBMULTITHREAD=
 4237   LTLIBMULTITHREAD=
 4238   if test "$gl_use_threads" != no; then
 4239     dnl Check whether the compiler and linker support weak declarations.
 4240     AC_CACHE_CHECK([whether imported symbols can be declared weak],
 4241       [gl_cv_have_weak],
 4242       [gl_cv_have_weak=no
 4243        dnl First, test whether the compiler accepts it syntactically.
 4244        AC_LINK_IFELSE(
 4245          [AC_LANG_PROGRAM(
 4246             [[extern void xyzzy ();
 4247 #pragma weak xyzzy]],
 4248             [[xyzzy();]])],
 4249          [gl_cv_have_weak=maybe])
 4250        if test $gl_cv_have_weak = maybe; then
 4251          dnl Second, test whether it actually works. On Cygwin 1.7.2, with
 4252          dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
 4253          AC_RUN_IFELSE(
 4254            [AC_LANG_SOURCE([[
 4255 #include <stdio.h>
 4256 #pragma weak fputs
 4257 int main ()
 4258 {
 4259   return (fputs == NULL);
 4260 }]])],
 4261            [gl_cv_have_weak=yes],
 4262            [gl_cv_have_weak=no],
 4263            [dnl When cross-compiling, assume that only ELF platforms support
 4264             dnl weak symbols.
 4265             AC_EGREP_CPP([Extensible Linking Format],
 4266               [#ifdef __ELF__
 4267                Extensible Linking Format
 4268                #endif
 4269               ],
 4270               [gl_cv_have_weak="guessing yes"],
 4271               [gl_cv_have_weak="guessing no"])
 4272            ])
 4273        fi
 4274       ])
 4275     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
 4276       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
 4277       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
 4278       AC_CHECK_HEADER([pthread.h],
 4279         [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
 4280       if test "$gl_have_pthread_h" = yes; then
 4281         # Other possible tests:
 4282         #   -lpthreads (FSU threads, PCthreads)
 4283         #   -lgthreads
 4284         gl_have_pthread=
 4285         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
 4286         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
 4287         # the second one only in libpthread, and lock.c needs it.
 4288         #
 4289         # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
 4290         # needs -pthread for some reason.  See:
 4291         # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
 4292         save_LIBS=$LIBS
 4293         for gl_pthread in '' '-pthread'; do
 4294           LIBS="$LIBS $gl_pthread"
 4295           AC_LINK_IFELSE(
 4296             [AC_LANG_PROGRAM(
 4297                [[#include <pthread.h>
 4298                  pthread_mutex_t m;
 4299                  pthread_mutexattr_t ma;
 4300                ]],
 4301                [[pthread_mutex_lock (&m);
 4302                  pthread_mutexattr_init (&ma);]])],
 4303             [gl_have_pthread=yes
 4304              LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
 4305              LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread])
 4306           LIBS=$save_LIBS
 4307           test -n "$gl_have_pthread" && break
 4308         done
 4309 
 4310         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
 4311         # since it is defined as a macro on OSF/1.)
 4312         if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
 4313           # The program links fine without libpthread. But it may actually
 4314           # need to link with libpthread in order to create multiple threads.
 4315           AC_CHECK_LIB([pthread], [pthread_kill],
 4316             [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
 4317              # On Solaris and HP-UX, most pthread functions exist also in libc.
 4318              # Therefore pthread_in_use() needs to actually try to create a
 4319              # thread: pthread_create from libc will fail, whereas
 4320              # pthread_create will actually create a thread.
 4321              case "$host_os" in
 4322                solaris* | hpux*)
 4323                  AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
 4324                    [Define if the pthread_in_use() detection is hard.])
 4325              esac
 4326             ])
 4327         elif test -z "$gl_have_pthread"; then
 4328           # Some library is needed. Try libpthread and libc_r.
 4329           AC_CHECK_LIB([pthread], [pthread_kill],
 4330             [gl_have_pthread=yes
 4331              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
 4332              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
 4333           if test -z "$gl_have_pthread"; then
 4334             # For FreeBSD 4.
 4335             AC_CHECK_LIB([c_r], [pthread_kill],
 4336               [gl_have_pthread=yes
 4337                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
 4338                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
 4339           fi
 4340         fi
 4341         if test -n "$gl_have_pthread"; then
 4342           gl_threads_api=posix
 4343           AC_DEFINE([USE_POSIX_THREADS], [1],
 4344             [Define if the POSIX multithreading library can be used.])
 4345           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
 4346             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
 4347               AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
 4348                 [Define if references to the POSIX multithreading library should be made weak.])
 4349               LIBTHREAD=
 4350               LTLIBTHREAD=
 4351             fi
 4352           fi
 4353         fi
 4354       fi
 4355     fi
 4356     if test -z "$gl_have_pthread"; then
 4357       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
 4358         gl_have_solaristhread=
 4359         gl_save_LIBS="$LIBS"
 4360         LIBS="$LIBS -lthread"
 4361         AC_LINK_IFELSE(
 4362           [AC_LANG_PROGRAM(
 4363              [[
 4364 #include <thread.h>
 4365 #include <synch.h>
 4366              ]],
 4367              [[thr_self();]])],
 4368           [gl_have_solaristhread=yes])
 4369         LIBS="$gl_save_LIBS"
 4370         if test -n "$gl_have_solaristhread"; then
 4371           gl_threads_api=solaris
 4372           LIBTHREAD=-lthread
 4373           LTLIBTHREAD=-lthread
 4374           LIBMULTITHREAD="$LIBTHREAD"
 4375           LTLIBMULTITHREAD="$LTLIBTHREAD"
 4376           AC_DEFINE([USE_SOLARIS_THREADS], [1],
 4377             [Define if the old Solaris multithreading library can be used.])
 4378           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
 4379             AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
 4380               [Define if references to the old Solaris multithreading library should be made weak.])
 4381             LIBTHREAD=
 4382             LTLIBTHREAD=
 4383           fi
 4384         fi
 4385       fi
 4386     fi
 4387     if test "$gl_use_threads" = pth; then
 4388       gl_save_CPPFLAGS="$CPPFLAGS"
 4389       AC_LIB_LINKFLAGS([pth])
 4390       gl_have_pth=
 4391       gl_save_LIBS="$LIBS"
 4392       LIBS="$LIBS $LIBPTH"
 4393       AC_LINK_IFELSE(
 4394         [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])],
 4395         [gl_have_pth=yes])
 4396       LIBS="$gl_save_LIBS"
 4397       if test -n "$gl_have_pth"; then
 4398         gl_threads_api=pth
 4399         LIBTHREAD="$LIBPTH"
 4400         LTLIBTHREAD="$LTLIBPTH"
 4401         LIBMULTITHREAD="$LIBTHREAD"
 4402         LTLIBMULTITHREAD="$LTLIBTHREAD"
 4403         AC_DEFINE([USE_PTH_THREADS], [1],
 4404           [Define if the GNU Pth multithreading library can be used.])
 4405         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
 4406           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
 4407             AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
 4408               [Define if references to the GNU Pth multithreading library should be made weak.])
 4409             LIBTHREAD=
 4410             LTLIBTHREAD=
 4411           fi
 4412         fi
 4413       else
 4414         CPPFLAGS="$gl_save_CPPFLAGS"
 4415       fi
 4416     fi
 4417     if test -z "$gl_have_pthread"; then
 4418       case "$gl_use_threads" in
 4419         yes | windows | win32) # The 'win32' is for backward compatibility.
 4420           if { case "$host_os" in
 4421                  mingw*) true;;
 4422                  *) false;;
 4423                esac
 4424              }; then
 4425             gl_threads_api=windows
 4426             AC_DEFINE([USE_WINDOWS_THREADS], [1],
 4427               [Define if the native Windows multithreading API can be used.])
 4428           fi
 4429           ;;
 4430       esac
 4431     fi
 4432   fi
 4433   AC_MSG_CHECKING([for multithread API to use])
 4434   AC_MSG_RESULT([$gl_threads_api])
 4435   AC_SUBST([LIBTHREAD])
 4436   AC_SUBST([LTLIBTHREAD])
 4437   AC_SUBST([LIBMULTITHREAD])
 4438   AC_SUBST([LTLIBMULTITHREAD])
 4439 ])
 4440 
 4441 AC_DEFUN([gl_THREADLIB],
 4442 [
 4443   AC_REQUIRE([gl_THREADLIB_EARLY])
 4444   AC_REQUIRE([gl_THREADLIB_BODY])
 4445 ])
 4446 
 4447 
 4448 dnl gl_DISABLE_THREADS
 4449 dnl ------------------
 4450 dnl Sets the gl_THREADLIB default so that threads are not used by default.
 4451 dnl The user can still override it at installation time, by using the
 4452 dnl configure option '--enable-threads'.
 4453 
 4454 AC_DEFUN([gl_DISABLE_THREADS], [
 4455   m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
 4456 ])
 4457 
 4458 
 4459 dnl Survey of platforms:
 4460 dnl
 4461 dnl Platform           Available  Compiler    Supports   test-lock
 4462 dnl                    flavours   option      weak       result
 4463 dnl ---------------    ---------  ---------   --------   ---------
 4464 dnl Linux 2.4/glibc    posix      -lpthread       Y      OK
 4465 dnl
 4466 dnl GNU Hurd/glibc     posix
 4467 dnl
 4468 dnl Ubuntu 14.04       posix      -pthread        Y      OK
 4469 dnl
 4470 dnl FreeBSD 5.3        posix      -lc_r           Y
 4471 dnl                    posix      -lkse ?         Y
 4472 dnl                    posix      -lpthread ?     Y
 4473 dnl                    posix      -lthr           Y
 4474 dnl
 4475 dnl FreeBSD 5.2        posix      -lc_r           Y
 4476 dnl                    posix      -lkse           Y
 4477 dnl                    posix      -lthr           Y
 4478 dnl
 4479 dnl FreeBSD 4.0,4.10   posix      -lc_r           Y      OK
 4480 dnl
 4481 dnl NetBSD 1.6         --
 4482 dnl
 4483 dnl OpenBSD 3.4        posix      -lpthread       Y      OK
 4484 dnl
 4485 dnl Mac OS X 10.[123]  posix      -lpthread       Y      OK
 4486 dnl
 4487 dnl Solaris 7,8,9      posix      -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
 4488 dnl                    solaris    -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
 4489 dnl
 4490 dnl HP-UX 11           posix      -lpthread       N (cc) OK
 4491 dnl                                               Y (gcc)
 4492 dnl
 4493 dnl IRIX 6.5           posix      -lpthread       Y      0.5
 4494 dnl
 4495 dnl AIX 4.3,5.1        posix      -lpthread       N      AIX 4: 0.5; AIX 5: OK
 4496 dnl
 4497 dnl OSF/1 4.0,5.1      posix      -pthread (cc)   N      OK
 4498 dnl                               -lpthread (gcc) Y
 4499 dnl
 4500 dnl Cygwin             posix      -lpthread       Y      OK
 4501 dnl
 4502 dnl Any of the above   pth        -lpth                  0.0
 4503 dnl
 4504 dnl Mingw              windows                    N      OK
 4505 dnl
 4506 dnl BeOS 5             --
 4507 dnl
 4508 dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
 4509 dnl turned off:
 4510 dnl   OK if all three tests terminate OK,
 4511 dnl   0.5 if the first test terminates OK but the second one loops endlessly,
 4512 dnl   0.0 if the first test already loops endlessly.
 4513 
 4514 # uintmax_t.m4 serial 12
 4515 dnl Copyright (C) 1997-2004, 2007-2016 Free Software Foundation, Inc.
 4516 dnl This file is free software; the Free Software Foundation
 4517 dnl gives unlimited permission to copy and/or distribute it,
 4518 dnl with or without modifications, as long as this notice is preserved.
 4519 
 4520 dnl From Paul Eggert.
 4521 
 4522 AC_PREREQ([2.13])
 4523 
 4524 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
 4525 # if it is not already defined in <stdint.h> or <inttypes.h>.
 4526 
 4527 AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
 4528 [
 4529   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
 4530   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
 4531   if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
 4532     AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
 4533     test $ac_cv_type_unsigned_long_long_int = yes \
 4534       && ac_type='unsigned long long' \
 4535       || ac_type='unsigned long'
 4536     AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
 4537       [Define to unsigned long or unsigned long long
 4538        if <stdint.h> and <inttypes.h> don't define.])
 4539   else
 4540     AC_DEFINE([HAVE_UINTMAX_T], [1],
 4541       [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
 4542   fi
 4543 ])
 4544 
 4545 # visibility.m4 serial 5 (gettext-0.18.2)
 4546 dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc.
 4547 dnl This file is free software; the Free Software Foundation
 4548 dnl gives unlimited permission to copy and/or distribute it,
 4549 dnl with or without modifications, as long as this notice is preserved.
 4550 
 4551 dnl From Bruno Haible.
 4552 
 4553 dnl Tests whether the compiler supports the command-line option
 4554 dnl -fvisibility=hidden and the function and variable attributes
 4555 dnl __attribute__((__visibility__("hidden"))) and
 4556 dnl __attribute__((__visibility__("default"))).
 4557 dnl Does *not* test for __visibility__("protected") - which has tricky
 4558 dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
 4559 dnl Mac OS X.
 4560 dnl Does *not* test for __visibility__("internal") - which has processor
 4561 dnl dependent semantics.
 4562 dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
 4563 dnl "really only recommended for legacy code".
 4564 dnl Set the variable CFLAG_VISIBILITY.
 4565 dnl Defines and sets the variable HAVE_VISIBILITY.
 4566 
 4567 AC_DEFUN([gl_VISIBILITY],
 4568 [
 4569   AC_REQUIRE([AC_PROG_CC])
 4570   CFLAG_VISIBILITY=
 4571   HAVE_VISIBILITY=0
 4572   if test -n "$GCC"; then
 4573     dnl First, check whether -Werror can be added to the command line, or
 4574     dnl whether it leads to an error because of some other option that the
 4575     dnl user has put into $CC $CFLAGS $CPPFLAGS.
 4576     AC_MSG_CHECKING([whether the -Werror option is usable])
 4577     AC_CACHE_VAL([gl_cv_cc_vis_werror], [
 4578       gl_save_CFLAGS="$CFLAGS"
 4579       CFLAGS="$CFLAGS -Werror"
 4580       AC_COMPILE_IFELSE(
 4581         [AC_LANG_PROGRAM([[]], [[]])],
 4582         [gl_cv_cc_vis_werror=yes],
 4583         [gl_cv_cc_vis_werror=no])
 4584       CFLAGS="$gl_save_CFLAGS"])
 4585     AC_MSG_RESULT([$gl_cv_cc_vis_werror])
 4586     dnl Now check whether visibility declarations are supported.
 4587     AC_MSG_CHECKING([for simple visibility declarations])
 4588     AC_CACHE_VAL([gl_cv_cc_visibility], [
 4589       gl_save_CFLAGS="$CFLAGS"
 4590       CFLAGS="$CFLAGS -fvisibility=hidden"
 4591       dnl We use the option -Werror and a function dummyfunc, because on some
 4592       dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
 4593       dnl "visibility attribute not supported in this configuration; ignored"
 4594       dnl at the first function definition in every compilation unit, and we
 4595       dnl don't want to use the option in this case.
 4596       if test $gl_cv_cc_vis_werror = yes; then
 4597         CFLAGS="$CFLAGS -Werror"
 4598       fi
 4599       AC_COMPILE_IFELSE(
 4600         [AC_LANG_PROGRAM(
 4601            [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
 4602              extern __attribute__((__visibility__("default"))) int exportedvar;
 4603              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
 4604              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
 4605              void dummyfunc (void) {}
 4606            ]],
 4607            [[]])],
 4608         [gl_cv_cc_visibility=yes],
 4609         [gl_cv_cc_visibility=no])
 4610       CFLAGS="$gl_save_CFLAGS"])
 4611     AC_MSG_RESULT([$gl_cv_cc_visibility])
 4612     if test $gl_cv_cc_visibility = yes; then
 4613       CFLAG_VISIBILITY="-fvisibility=hidden"
 4614       HAVE_VISIBILITY=1
 4615     fi
 4616   fi
 4617   AC_SUBST([CFLAG_VISIBILITY])
 4618   AC_SUBST([HAVE_VISIBILITY])
 4619   AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
 4620     [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
 4621 ])
 4622 
 4623 # wchar_t.m4 serial 4 (gettext-0.18.2)
 4624 dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc.
 4625 dnl This file is free software; the Free Software Foundation
 4626 dnl gives unlimited permission to copy and/or distribute it,
 4627 dnl with or without modifications, as long as this notice is preserved.
 4628 
 4629 dnl From Bruno Haible.
 4630 dnl Test whether <stddef.h> has the 'wchar_t' type.
 4631 dnl Prerequisite: AC_PROG_CC
 4632 
 4633 AC_DEFUN([gt_TYPE_WCHAR_T],
 4634 [
 4635   AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
 4636     [AC_COMPILE_IFELSE(
 4637        [AC_LANG_PROGRAM(
 4638           [[#include <stddef.h>
 4639             wchar_t foo = (wchar_t)'\0';]],
 4640           [[]])],
 4641        [gt_cv_c_wchar_t=yes],
 4642        [gt_cv_c_wchar_t=no])])
 4643   if test $gt_cv_c_wchar_t = yes; then
 4644     AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
 4645   fi
 4646 ])
 4647 
 4648 # wint_t.m4 serial 5 (gettext-0.18.2)
 4649 dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
 4650 dnl This file is free software; the Free Software Foundation
 4651 dnl gives unlimited permission to copy and/or distribute it,
 4652 dnl with or without modifications, as long as this notice is preserved.
 4653 
 4654 dnl From Bruno Haible.
 4655 dnl Test whether <wchar.h> has the 'wint_t' type.
 4656 dnl Prerequisite: AC_PROG_CC
 4657 
 4658 AC_DEFUN([gt_TYPE_WINT_T],
 4659 [
 4660   AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
 4661     [AC_COMPILE_IFELSE(
 4662        [AC_LANG_PROGRAM(
 4663           [[
 4664 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
 4665    <wchar.h>.
 4666    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
 4667    before <wchar.h>.  */
 4668 #include <stddef.h>
 4669 #include <stdio.h>
 4670 #include <time.h>
 4671 #include <wchar.h>
 4672             wint_t foo = (wchar_t)'\0';]],
 4673           [[]])],
 4674        [gt_cv_c_wint_t=yes],
 4675        [gt_cv_c_wint_t=no])])
 4676   if test $gt_cv_c_wint_t = yes; then
 4677     AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
 4678   fi
 4679 ])
 4680 
 4681 # xsize.m4 serial 5
 4682 dnl Copyright (C) 2003-2004, 2008-2016 Free Software Foundation, Inc.
 4683 dnl This file is free software; the Free Software Foundation
 4684 dnl gives unlimited permission to copy and/or distribute it,
 4685 dnl with or without modifications, as long as this notice is preserved.
 4686 
 4687 AC_DEFUN([gl_XSIZE],
 4688 [
 4689   dnl Prerequisites of lib/xsize.h.
 4690   AC_REQUIRE([gl_SIZE_MAX])
 4691   AC_CHECK_HEADERS([stdint.h])
 4692 ])
 4693 
 4694 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
 4695 #
 4696 # This file is free software; the Free Software Foundation
 4697 # gives unlimited permission to copy and/or distribute it,
 4698 # with or without modifications, as long as this notice is preserved.
 4699 
 4700 # AM_AUTOMAKE_VERSION(VERSION)
 4701 # ----------------------------
 4702 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 4703 # generated from the m4 files accompanying Automake X.Y.
 4704 # (This private macro should not be called outside this file.)
 4705 AC_DEFUN([AM_AUTOMAKE_VERSION],
 4706 [am__api_version='1.15'
 4707 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 4708 dnl require some minimum version.  Point them to the right macro.
 4709 m4_if([$1], [1.15.1], [],
 4710       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 4711 ])
 4712 
 4713 # _AM_AUTOCONF_VERSION(VERSION)
 4714 # -----------------------------
 4715 # aclocal traces this macro to find the Autoconf version.
 4716 # This is a private macro too.  Using m4_define simplifies
 4717 # the logic in aclocal, which can simply ignore this definition.
 4718 m4_define([_AM_AUTOCONF_VERSION], [])
 4719 
 4720 # AM_SET_CURRENT_AUTOMAKE_VERSION
 4721 # -------------------------------
 4722 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 4723 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 4724 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 4725 [AM_AUTOMAKE_VERSION([1.15.1])dnl
 4726 m4_ifndef([AC_AUTOCONF_VERSION],
 4727   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 4728 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 4729 
 4730 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 4731 
 4732 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
 4733 #
 4734 # This file is free software; the Free Software Foundation
 4735 # gives unlimited permission to copy and/or distribute it,
 4736 # with or without modifications, as long as this notice is preserved.
 4737 
 4738 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 4739 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 4740 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 4741 #
 4742 # Of course, Automake must honor this variable whenever it calls a
 4743 # tool from the auxiliary directory.  The problem is that $srcdir (and
 4744 # therefore $ac_aux_dir as well) can be either absolute or relative,
 4745 # depending on how configure is run.  This is pretty annoying, since
 4746 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
 4747 # source directory, any form will work fine, but in subdirectories a
 4748 # relative path needs to be adjusted first.
 4749 #
 4750 # $ac_aux_dir/missing
 4751 #    fails when called from a subdirectory if $ac_aux_dir is relative
 4752 # $top_srcdir/$ac_aux_dir/missing
 4753 #    fails if $ac_aux_dir is absolute,
 4754 #    fails when called from a subdirectory in a VPATH build with
 4755 #          a relative $ac_aux_dir
 4756 #
 4757 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 4758 # are both prefixed by $srcdir.  In an in-source build this is usually
 4759 # harmless because $srcdir is '.', but things will broke when you
 4760 # start a VPATH build or use an absolute $srcdir.
 4761 #
 4762 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 4763 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 4764 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 4765 # and then we would define $MISSING as
 4766 #   MISSING="\${SHELL} $am_aux_dir/missing"
 4767 # This will work as long as MISSING is not called from configure, because
 4768 # unfortunately $(top_srcdir) has no meaning in configure.
 4769 # However there are other variables, like CC, which are often used in
 4770 # configure, and could therefore not use this "fixed" $ac_aux_dir.
 4771 #
 4772 # Another solution, used here, is to always expand $ac_aux_dir to an
 4773 # absolute PATH.  The drawback is that using absolute paths prevent a
 4774 # configured tree to be moved without reconfiguration.
 4775 
 4776 AC_DEFUN([AM_AUX_DIR_EXPAND],
 4777 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 4778 # Expand $ac_aux_dir to an absolute path.
 4779 am_aux_dir=`cd "$ac_aux_dir" && pwd`
 4780 ])
 4781 
 4782 # AM_CONDITIONAL                                            -*- Autoconf -*-
 4783 
 4784 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
 4785 #
 4786 # This file is free software; the Free Software Foundation
 4787 # gives unlimited permission to copy and/or distribute it,
 4788 # with or without modifications, as long as this notice is preserved.
 4789 
 4790 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 4791 # -------------------------------------
 4792 # Define a conditional.
 4793 AC_DEFUN([AM_CONDITIONAL],
 4794 [AC_PREREQ([2.52])dnl
 4795  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 4796        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 4797 AC_SUBST([$1_TRUE])dnl
 4798 AC_SUBST([$1_FALSE])dnl
 4799 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 4800 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
 4801 m4_define([_AM_COND_VALUE_$1], [$2])dnl
 4802 if $2; then
 4803   $1_TRUE=
 4804   $1_FALSE='#'
 4805 else
 4806   $1_TRUE='#'
 4807   $1_FALSE=
 4808 fi
 4809 AC_CONFIG_COMMANDS_PRE(
 4810 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 4811   AC_MSG_ERROR([[conditional "$1" was never defined.
 4812 Usually this means the macro was only invoked conditionally.]])
 4813 fi])])
 4814 
 4815 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
 4816 #
 4817 # This file is free software; the Free Software Foundation
 4818 # gives unlimited permission to copy and/or distribute it,
 4819 # with or without modifications, as long as this notice is preserved.
 4820 
 4821 
 4822 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 4823 # written in clear, in which case automake, when reading aclocal.m4,
 4824 # will think it sees a *use*, and therefore will trigger all it's
 4825 # C support machinery.  Also note that it means that autoscan, seeing
 4826 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 4827 
 4828 
 4829 # _AM_DEPENDENCIES(NAME)
 4830 # ----------------------
 4831 # See how the compiler implements dependency checking.
 4832 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 4833 # We try a few techniques and use that to set a single cache variable.
 4834 #
 4835 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 4836 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 4837 # dependency, and given that the user is not expected to run this macro,
 4838 # just rely on AC_PROG_CC.
 4839 AC_DEFUN([_AM_DEPENDENCIES],
 4840 [AC_REQUIRE([AM_SET_DEPDIR])dnl
 4841 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 4842 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 4843 AC_REQUIRE([AM_DEP_TRACK])dnl
 4844 
 4845 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
 4846       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
 4847       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 4848       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
 4849       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
 4850       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 4851                     [depcc="$$1"   am_compiler_list=])
 4852 
 4853 AC_CACHE_CHECK([dependency style of $depcc],
 4854                [am_cv_$1_dependencies_compiler_type],
 4855 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 4856   # We make a subdir and do the tests there.  Otherwise we can end up
 4857   # making bogus files that we don't know about and never remove.  For
 4858   # instance it was reported that on HP-UX the gcc test will end up
 4859   # making a dummy file named 'D' -- because '-MD' means "put the output
 4860   # in D".
 4861   rm -rf conftest.dir
 4862   mkdir conftest.dir
 4863   # Copy depcomp to subdir because otherwise we won't find it if we're
 4864   # using a relative directory.
 4865   cp "$am_depcomp" conftest.dir
 4866   cd conftest.dir
 4867   # We will build objects and dependencies in a subdirectory because
 4868   # it helps to detect inapplicable dependency modes.  For instance
 4869   # both Tru64's cc and ICC support -MD to output dependencies as a
 4870   # side effect of compilation, but ICC will put the dependencies in
 4871   # the current directory while Tru64 will put them in the object
 4872   # directory.
 4873   mkdir sub
 4874 
 4875   am_cv_$1_dependencies_compiler_type=none
 4876   if test "$am_compiler_list" = ""; then
 4877      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 4878   fi
 4879   am__universal=false
 4880   m4_case([$1], [CC],
 4881     [case " $depcc " in #(
 4882      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 4883      esac],
 4884     [CXX],
 4885     [case " $depcc " in #(
 4886      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 4887      esac])
 4888 
 4889   for depmode in $am_compiler_list; do
 4890     # Setup a source with many dependencies, because some compilers
 4891     # like to wrap large dependency lists on column 80 (with \), and
 4892     # we should not choose a depcomp mode which is confused by this.
 4893     #
 4894     # We need to recreate these files for each test, as the compiler may
 4895     # overwrite some of them when testing with obscure command lines.
 4896     # This happens at least with the AIX C compiler.
 4897     : > sub/conftest.c
 4898     for i in 1 2 3 4 5 6; do
 4899       echo '#include "conftst'$i'.h"' >> sub/conftest.c
 4900       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
 4901       # Solaris 10 /bin/sh.
 4902       echo '/* dummy */' > sub/conftst$i.h
 4903     done
 4904     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 4905 
 4906     # We check with '-c' and '-o' for the sake of the "dashmstdout"
 4907     # mode.  It turns out that the SunPro C++ compiler does not properly
 4908     # handle '-M -o', and we need to detect this.  Also, some Intel
 4909     # versions had trouble with output in subdirs.
 4910     am__obj=sub/conftest.${OBJEXT-o}
 4911     am__minus_obj="-o $am__obj"
 4912     case $depmode in
 4913     gcc)
 4914       # This depmode causes a compiler race in universal mode.
 4915       test "$am__universal" = false || continue
 4916       ;;
 4917     nosideeffect)
 4918       # After this tag, mechanisms are not by side-effect, so they'll
 4919       # only be used when explicitly requested.
 4920       if test "x$enable_dependency_tracking" = xyes; then
 4921 	continue
 4922       else
 4923 	break
 4924       fi
 4925       ;;
 4926     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
 4927       # This compiler won't grok '-c -o', but also, the minuso test has
 4928       # not run yet.  These depmodes are late enough in the game, and
 4929       # so weak that their functioning should not be impacted.
 4930       am__obj=conftest.${OBJEXT-o}
 4931       am__minus_obj=
 4932       ;;
 4933     none) break ;;
 4934     esac
 4935     if depmode=$depmode \
 4936        source=sub/conftest.c object=$am__obj \
 4937        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 4938        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 4939          >/dev/null 2>conftest.err &&
 4940        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 4941        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 4942        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 4943        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 4944       # icc doesn't choke on unknown options, it will just issue warnings
 4945       # or remarks (even with -Werror).  So we grep stderr for any message
 4946       # that says an option was ignored or not supported.
 4947       # When given -MP, icc 7.0 and 7.1 complain thusly:
 4948       #   icc: Command line warning: ignoring option '-M'; no argument required
 4949       # The diagnosis changed in icc 8.0:
 4950       #   icc: Command line remark: option '-MP' not supported
 4951       if (grep 'ignoring option' conftest.err ||
 4952           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 4953         am_cv_$1_dependencies_compiler_type=$depmode
 4954         break
 4955       fi
 4956     fi
 4957   done
 4958 
 4959   cd ..
 4960   rm -rf conftest.dir
 4961 else
 4962   am_cv_$1_dependencies_compiler_type=none
 4963 fi
 4964 ])
 4965 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 4966 AM_CONDITIONAL([am__fastdep$1], [
 4967   test "x$enable_dependency_tracking" != xno \
 4968   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 4969 ])
 4970 
 4971 
 4972 # AM_SET_DEPDIR
 4973 # -------------
 4974 # Choose a directory name for dependency files.
 4975 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 4976 AC_DEFUN([AM_SET_DEPDIR],
 4977 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 4978 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 4979 ])
 4980 
 4981 
 4982 # AM_DEP_TRACK
 4983 # ------------
 4984 AC_DEFUN([AM_DEP_TRACK],
 4985 [AC_ARG_ENABLE([dependency-tracking], [dnl
 4986 AS_HELP_STRING(
 4987   [--enable-dependency-tracking],
 4988   [do not reject slow dependency extractors])
 4989 AS_HELP_STRING(
 4990   [--disable-dependency-tracking],
 4991   [speeds up one-time build])])
 4992 if test "x$enable_dependency_tracking" != xno; then
 4993   am_depcomp="$ac_aux_dir/depcomp"
 4994   AMDEPBACKSLASH='\'
 4995   am__nodep='_no'
 4996 fi
 4997 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 4998 AC_SUBST([AMDEPBACKSLASH])dnl
 4999 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 5000 AC_SUBST([am__nodep])dnl
 5001 _AM_SUBST_NOTMAKE([am__nodep])dnl
 5002 ])
 5003 
 5004 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 5005 
 5006 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
 5007 #
 5008 # This file is free software; the Free Software Foundation
 5009 # gives unlimited permission to copy and/or distribute it,
 5010 # with or without modifications, as long as this notice is preserved.
 5011 
 5012 
 5013 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 5014 # ------------------------------
 5015 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 5016 [{
 5017   # Older Autoconf quotes --file arguments for eval, but not when files
 5018   # are listed without --file.  Let's play safe and only enable the eval
 5019   # if we detect the quoting.
 5020   case $CONFIG_FILES in
 5021   *\'*) eval set x "$CONFIG_FILES" ;;
 5022   *)   set x $CONFIG_FILES ;;
 5023   esac
 5024   shift
 5025   for mf
 5026   do
 5027     # Strip MF so we end up with the name of the file.
 5028     mf=`echo "$mf" | sed -e 's/:.*$//'`
 5029     # Check whether this is an Automake generated Makefile or not.
 5030     # We used to match only the files named 'Makefile.in', but
 5031     # some people rename them; so instead we look at the file content.
 5032     # Grep'ing the first line is not enough: some people post-process
 5033     # each Makefile.in and add a new line on top of each file to say so.
 5034     # Grep'ing the whole file is not good either: AIX grep has a line
 5035     # limit of 2048, but all sed's we know have understand at least 4000.
 5036     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 5037       dirpart=`AS_DIRNAME("$mf")`
 5038     else
 5039       continue
 5040     fi
 5041     # Extract the definition of DEPDIR, am__include, and am__quote
 5042     # from the Makefile without running 'make'.
 5043     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 5044     test -z "$DEPDIR" && continue
 5045     am__include=`sed -n 's/^am__include = //p' < "$mf"`
 5046     test -z "$am__include" && continue
 5047     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 5048     # Find all dependency output files, they are included files with
 5049     # $(DEPDIR) in their names.  We invoke sed twice because it is the
 5050     # simplest approach to changing $(DEPDIR) to its actual value in the
 5051     # expansion.
 5052     for file in `sed -n "
 5053       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 5054 	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
 5055       # Make sure the directory exists.
 5056       test -f "$dirpart/$file" && continue
 5057       fdir=`AS_DIRNAME(["$file"])`
 5058       AS_MKDIR_P([$dirpart/$fdir])
 5059       # echo "creating $dirpart/$file"
 5060       echo '# dummy' > "$dirpart/$file"
 5061     done
 5062   done
 5063 }
 5064 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 5065 
 5066 
 5067 # AM_OUTPUT_DEPENDENCY_COMMANDS
 5068 # -----------------------------
 5069 # This macro should only be invoked once -- use via AC_REQUIRE.
 5070 #
 5071 # This code is only required when automatic dependency tracking
 5072 # is enabled.  FIXME.  This creates each '.P' file that we will
 5073 # need in order to bootstrap the dependency handling code.
 5074 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 5075 [AC_CONFIG_COMMANDS([depfiles],
 5076      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 5077      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 5078 ])
 5079 
 5080 # Do all the work for Automake.                             -*- Autoconf -*-
 5081 
 5082 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
 5083 #
 5084 # This file is free software; the Free Software Foundation
 5085 # gives unlimited permission to copy and/or distribute it,
 5086 # with or without modifications, as long as this notice is preserved.
 5087 
 5088 # This macro actually does too much.  Some checks are only needed if
 5089 # your package does certain things.  But this isn't really a big deal.
 5090 
 5091 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
 5092 m4_define([AC_PROG_CC],
 5093 m4_defn([AC_PROG_CC])
 5094 [_AM_PROG_CC_C_O
 5095 ])
 5096 
 5097 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 5098 # AM_INIT_AUTOMAKE([OPTIONS])
 5099 # -----------------------------------------------
 5100 # The call with PACKAGE and VERSION arguments is the old style
 5101 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
 5102 # and VERSION should now be passed to AC_INIT and removed from
 5103 # the call to AM_INIT_AUTOMAKE.
 5104 # We support both call styles for the transition.  After
 5105 # the next Automake release, Autoconf can make the AC_INIT
 5106 # arguments mandatory, and then we can depend on a new Autoconf
 5107 # release and drop the old call support.
 5108 AC_DEFUN([AM_INIT_AUTOMAKE],
 5109 [AC_PREREQ([2.65])dnl
 5110 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 5111 dnl the ones we care about.
 5112 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 5113 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 5114 AC_REQUIRE([AC_PROG_INSTALL])dnl
 5115 if test "`cd $srcdir && pwd`" != "`pwd`"; then
 5116   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 5117   # is not polluted with repeated "-I."
 5118   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 5119   # test to see if srcdir already configured
 5120   if test -f $srcdir/config.status; then
 5121     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 5122   fi
 5123 fi
 5124 
 5125 # test whether we have cygpath
 5126 if test -z "$CYGPATH_W"; then
 5127   if (cygpath --version) >/dev/null 2>/dev/null; then
 5128     CYGPATH_W='cygpath -w'
 5129   else
 5130     CYGPATH_W=echo
 5131   fi
 5132 fi
 5133 AC_SUBST([CYGPATH_W])
 5134 
 5135 # Define the identity of the package.
 5136 dnl Distinguish between old-style and new-style calls.
 5137 m4_ifval([$2],
 5138 [AC_DIAGNOSE([obsolete],
 5139              [$0: two- and three-arguments forms are deprecated.])
 5140 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 5141  AC_SUBST([PACKAGE], [$1])dnl
 5142  AC_SUBST([VERSION], [$2])],
 5143 [_AM_SET_OPTIONS([$1])dnl
 5144 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 5145 m4_if(
 5146   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
 5147   [ok:ok],,
 5148   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 5149  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 5150  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 5151 
 5152 _AM_IF_OPTION([no-define],,
 5153 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
 5154  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 5155 
 5156 # Some tools Automake needs.
 5157 AC_REQUIRE([AM_SANITY_CHECK])dnl
 5158 AC_REQUIRE([AC_ARG_PROGRAM])dnl
 5159 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
 5160 AM_MISSING_PROG([AUTOCONF], [autoconf])
 5161 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
 5162 AM_MISSING_PROG([AUTOHEADER], [autoheader])
 5163 AM_MISSING_PROG([MAKEINFO], [makeinfo])
 5164 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 5165 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 5166 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 5167 # For better backward compatibility.  To be removed once Automake 1.9.x
 5168 # dies out for good.  For more background, see:
 5169 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 5170 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 5171 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 5172 # We need awk for the "check" target (and possibly the TAP driver).  The
 5173 # system "awk" is bad on some platforms.
 5174 AC_REQUIRE([AC_PROG_AWK])dnl
 5175 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 5176 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 5177 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 5178 	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 5179 			     [_AM_PROG_TAR([v7])])])
 5180 _AM_IF_OPTION([no-dependencies],,
 5181 [AC_PROVIDE_IFELSE([AC_PROG_CC],
 5182 		  [_AM_DEPENDENCIES([CC])],
 5183 		  [m4_define([AC_PROG_CC],
 5184 			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 5185 AC_PROVIDE_IFELSE([AC_PROG_CXX],
 5186 		  [_AM_DEPENDENCIES([CXX])],
 5187 		  [m4_define([AC_PROG_CXX],
 5188 			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 5189 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 5190 		  [_AM_DEPENDENCIES([OBJC])],
 5191 		  [m4_define([AC_PROG_OBJC],
 5192 			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 5193 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 5194 		  [_AM_DEPENDENCIES([OBJCXX])],
 5195 		  [m4_define([AC_PROG_OBJCXX],
 5196 			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 5197 ])
 5198 AC_REQUIRE([AM_SILENT_RULES])dnl
 5199 dnl The testsuite driver may need to know about EXEEXT, so add the
 5200 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 5201 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 5202 AC_CONFIG_COMMANDS_PRE(dnl
 5203 [m4_provide_if([_AM_COMPILER_EXEEXT],
 5204   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 5205 
 5206 # POSIX will say in a future version that running "rm -f" with no argument
 5207 # is OK; and we want to be able to make that assumption in our Makefile
 5208 # recipes.  So use an aggressive probe to check that the usage we want is
 5209 # actually supported "in the wild" to an acceptable degree.
 5210 # See automake bug#10828.
 5211 # To make any issue more visible, cause the running configure to be aborted
 5212 # by default if the 'rm' program in use doesn't match our expectations; the
 5213 # user can still override this though.
 5214 if rm -f && rm -fr && rm -rf; then : OK; else
 5215   cat >&2 <<'END'
 5216 Oops!
 5217 
 5218 Your 'rm' program seems unable to run without file operands specified
 5219 on the command line, even when the '-f' option is present.  This is contrary
 5220 to the behaviour of most rm programs out there, and not conforming with
 5221 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 5222 
 5223 Please tell bug-automake@gnu.org about your system, including the value
 5224 of your $PATH and any error possibly output before this message.  This
 5225 can help us improve future automake versions.
 5226 
 5227 END
 5228   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
 5229     echo 'Configuration will proceed anyway, since you have set the' >&2
 5230     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
 5231     echo >&2
 5232   else
 5233     cat >&2 <<'END'
 5234 Aborting the configuration process, to ensure you take notice of the issue.
 5235 
 5236 You can download and install GNU coreutils to get an 'rm' implementation
 5237 that behaves properly: <http://www.gnu.org/software/coreutils/>.
 5238 
 5239 If you want to complete the configuration process using your problematic
 5240 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
 5241 to "yes", and re-run configure.
 5242 
 5243 END
 5244     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
 5245   fi
 5246 fi
 5247 dnl The trailing newline in this macro's definition is deliberate, for
 5248 dnl backward compatibility and to allow trailing 'dnl'-style comments
 5249 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 5250 ])
 5251 
 5252 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 5253 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 5254 dnl mangled by Autoconf and run in a shell conditional statement.
 5255 m4_define([_AC_COMPILER_EXEEXT],
 5256 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 5257 
 5258 # When config.status generates a header, we must update the stamp-h file.
 5259 # This file resides in the same directory as the config header
 5260 # that is generated.  The stamp files are numbered to have different names.
 5261 
 5262 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 5263 # loop where config.status creates the headers, so we can generate
 5264 # our stamp files there.
 5265 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 5266 [# Compute $1's index in $config_headers.
 5267 _am_arg=$1
 5268 _am_stamp_count=1
 5269 for _am_header in $config_headers :; do
 5270   case $_am_header in
 5271     $_am_arg | $_am_arg:* )
 5272       break ;;
 5273     * )
 5274       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 5275   esac
 5276 done
 5277 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 5278 
 5279 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
 5280 #
 5281 # This file is free software; the Free Software Foundation
 5282 # gives unlimited permission to copy and/or distribute it,
 5283 # with or without modifications, as long as this notice is preserved.
 5284 
 5285 # AM_PROG_INSTALL_SH
 5286 # ------------------
 5287 # Define $install_sh.
 5288 AC_DEFUN([AM_PROG_INSTALL_SH],
 5289 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 5290 if test x"${install_sh+set}" != xset; then
 5291   case $am_aux_dir in
 5292   *\ * | *\	*)
 5293     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 5294   *)
 5295     install_sh="\${SHELL} $am_aux_dir/install-sh"
 5296   esac
 5297 fi
 5298 AC_SUBST([install_sh])])
 5299 
 5300 # Copyright (C) 2003-2017 Free Software Foundation, Inc.
 5301 #
 5302 # This file is free software; the Free Software Foundation
 5303 # gives unlimited permission to copy and/or distribute it,
 5304 # with or without modifications, as long as this notice is preserved.
 5305 
 5306 # Check whether the underlying file-system supports filenames
 5307 # with a leading dot.  For instance MS-DOS doesn't.
 5308 AC_DEFUN([AM_SET_LEADING_DOT],
 5309 [rm -rf .tst 2>/dev/null
 5310 mkdir .tst 2>/dev/null
 5311 if test -d .tst; then
 5312   am__leading_dot=.
 5313 else
 5314   am__leading_dot=_
 5315 fi
 5316 rmdir .tst 2>/dev/null
 5317 AC_SUBST([am__leading_dot])])
 5318 
 5319 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 5320 
 5321 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
 5322 #
 5323 # This file is free software; the Free Software Foundation
 5324 # gives unlimited permission to copy and/or distribute it,
 5325 # with or without modifications, as long as this notice is preserved.
 5326 
 5327 # AM_MAKE_INCLUDE()
 5328 # -----------------
 5329 # Check to see how make treats includes.
 5330 AC_DEFUN([AM_MAKE_INCLUDE],
 5331 [am_make=${MAKE-make}
 5332 cat > confinc << 'END'
 5333 am__doit:
 5334 	@echo this is the am__doit target
 5335 .PHONY: am__doit
 5336 END
 5337 # If we don't find an include directive, just comment out the code.
 5338 AC_MSG_CHECKING([for style of include used by $am_make])
 5339 am__include="#"
 5340 am__quote=
 5341 _am_result=none
 5342 # First try GNU make style include.
 5343 echo "include confinc" > confmf
 5344 # Ignore all kinds of additional output from 'make'.
 5345 case `$am_make -s -f confmf 2> /dev/null` in #(
 5346 *the\ am__doit\ target*)
 5347   am__include=include
 5348   am__quote=
 5349   _am_result=GNU
 5350   ;;
 5351 esac
 5352 # Now try BSD make style include.
 5353 if test "$am__include" = "#"; then
 5354    echo '.include "confinc"' > confmf
 5355    case `$am_make -s -f confmf 2> /dev/null` in #(
 5356    *the\ am__doit\ target*)
 5357      am__include=.include
 5358      am__quote="\""
 5359      _am_result=BSD
 5360      ;;
 5361    esac
 5362 fi
 5363 AC_SUBST([am__include])
 5364 AC_SUBST([am__quote])
 5365 AC_MSG_RESULT([$_am_result])
 5366 rm -f confinc confmf
 5367 ])
 5368 
 5369 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 5370 
 5371 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
 5372 #
 5373 # This file is free software; the Free Software Foundation
 5374 # gives unlimited permission to copy and/or distribute it,
 5375 # with or without modifications, as long as this notice is preserved.
 5376 
 5377 # AM_MISSING_PROG(NAME, PROGRAM)
 5378 # ------------------------------
 5379 AC_DEFUN([AM_MISSING_PROG],
 5380 [AC_REQUIRE([AM_MISSING_HAS_RUN])
 5381 $1=${$1-"${am_missing_run}$2"}
 5382 AC_SUBST($1)])
 5383 
 5384 # AM_MISSING_HAS_RUN
 5385 # ------------------
 5386 # Define MISSING if not defined so far and test if it is modern enough.
 5387 # If it is, set am_missing_run to use it, otherwise, to nothing.
 5388 AC_DEFUN([AM_MISSING_HAS_RUN],
 5389 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 5390 AC_REQUIRE_AUX_FILE([missing])dnl
 5391 if test x"${MISSING+set}" != xset; then
 5392   case $am_aux_dir in
 5393   *\ * | *\	*)
 5394     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 5395   *)
 5396     MISSING="\${SHELL} $am_aux_dir/missing" ;;
 5397   esac
 5398 fi
 5399 # Use eval to expand $SHELL
 5400 if eval "$MISSING --is-lightweight"; then
 5401   am_missing_run="$MISSING "
 5402 else
 5403   am_missing_run=
 5404   AC_MSG_WARN(['missing' script is too old or missing])
 5405 fi
 5406 ])
 5407 
 5408 #  -*- Autoconf -*-
 5409 # Obsolete and "removed" macros, that must however still report explicit
 5410 # error messages when used, to smooth transition.
 5411 #
 5412 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
 5413 #
 5414 # This file is free software; the Free Software Foundation
 5415 # gives unlimited permission to copy and/or distribute it,
 5416 # with or without modifications, as long as this notice is preserved.
 5417 
 5418 AC_DEFUN([AM_CONFIG_HEADER],
 5419 [AC_DIAGNOSE([obsolete],
 5420 ['$0': this macro is obsolete.
 5421 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
 5422 AC_CONFIG_HEADERS($@)])
 5423 
 5424 AC_DEFUN([AM_PROG_CC_STDC],
 5425 [AC_PROG_CC
 5426 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
 5427 AC_DIAGNOSE([obsolete],
 5428 ['$0': this macro is obsolete.
 5429 You should simply use the 'AC][_PROG_CC' macro instead.
 5430 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
 5431 but upon 'ac_cv_prog_cc_stdc'.])])
 5432 
 5433 AC_DEFUN([AM_C_PROTOTYPES],
 5434          [AC_FATAL([automatic de-ANSI-fication support has been removed])])
 5435 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
 5436 
 5437 # Helper functions for option handling.                     -*- Autoconf -*-
 5438 
 5439 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
 5440 #
 5441 # This file is free software; the Free Software Foundation
 5442 # gives unlimited permission to copy and/or distribute it,
 5443 # with or without modifications, as long as this notice is preserved.
 5444 
 5445 # _AM_MANGLE_OPTION(NAME)
 5446 # -----------------------
 5447 AC_DEFUN([_AM_MANGLE_OPTION],
 5448 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 5449 
 5450 # _AM_SET_OPTION(NAME)
 5451 # --------------------
 5452 # Set option NAME.  Presently that only means defining a flag for this option.
 5453 AC_DEFUN([_AM_SET_OPTION],
 5454 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 5455 
 5456 # _AM_SET_OPTIONS(OPTIONS)
 5457 # ------------------------
 5458 # OPTIONS is a space-separated list of Automake options.
 5459 AC_DEFUN([_AM_SET_OPTIONS],
 5460 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 5461 
 5462 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 5463 # -------------------------------------------
 5464 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 5465 AC_DEFUN([_AM_IF_OPTION],
 5466 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 5467 
 5468 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
 5469 #
 5470 # This file is free software; the Free Software Foundation
 5471 # gives unlimited permission to copy and/or distribute it,
 5472 # with or without modifications, as long as this notice is preserved.
 5473 
 5474 # _AM_PROG_CC_C_O
 5475 # ---------------
 5476 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
 5477 # to automatically call this.
 5478 AC_DEFUN([_AM_PROG_CC_C_O],
 5479 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 5480 AC_REQUIRE_AUX_FILE([compile])dnl
 5481 AC_LANG_PUSH([C])dnl
 5482 AC_CACHE_CHECK(
 5483   [whether $CC understands -c and -o together],
 5484   [am_cv_prog_cc_c_o],
 5485   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 5486   # Make sure it works both with $CC and with simple cc.
 5487   # Following AC_PROG_CC_C_O, we do the test twice because some
 5488   # compilers refuse to overwrite an existing .o file with -o,
 5489   # though they will create one.
 5490   am_cv_prog_cc_c_o=yes
 5491   for am_i in 1 2; do
 5492     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
 5493          && test -f conftest2.$ac_objext; then
 5494       : OK
 5495     else
 5496       am_cv_prog_cc_c_o=no
 5497       break
 5498     fi
 5499   done
 5500   rm -f core conftest*
 5501   unset am_i])
 5502 if test "$am_cv_prog_cc_c_o" != yes; then
 5503    # Losing compiler, so override with the script.
 5504    # FIXME: It is wrong to rewrite CC.
 5505    # But if we don't then we get into trouble of one sort or another.
 5506    # A longer-term fix would be to have automake use am__CC in this case,
 5507    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 5508    CC="$am_aux_dir/compile $CC"
 5509 fi
 5510 AC_LANG_POP([C])])
 5511 
 5512 # For backward compatibility.
 5513 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 5514 
 5515 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
 5516 #
 5517 # This file is free software; the Free Software Foundation
 5518 # gives unlimited permission to copy and/or distribute it,
 5519 # with or without modifications, as long as this notice is preserved.
 5520 
 5521 # AM_RUN_LOG(COMMAND)
 5522 # -------------------
 5523 # Run COMMAND, save the exit status in ac_status, and log it.
 5524 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 5525 AC_DEFUN([AM_RUN_LOG],
 5526 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 5527    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 5528    ac_status=$?
 5529    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 5530    (exit $ac_status); }])
 5531 
 5532 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 5533 
 5534 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
 5535 #
 5536 # This file is free software; the Free Software Foundation
 5537 # gives unlimited permission to copy and/or distribute it,
 5538 # with or without modifications, as long as this notice is preserved.
 5539 
 5540 # AM_SANITY_CHECK
 5541 # ---------------
 5542 AC_DEFUN([AM_SANITY_CHECK],
 5543 [AC_MSG_CHECKING([whether build environment is sane])
 5544 # Reject unsafe characters in $srcdir or the absolute working directory
 5545 # name.  Accept space and tab only in the latter.
 5546 am_lf='
 5547 '
 5548 case `pwd` in
 5549   *[[\\\"\#\$\&\'\`$am_lf]]*)
 5550     AC_MSG_ERROR([unsafe absolute working directory name]);;
 5551 esac
 5552 case $srcdir in
 5553   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
 5554     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 5555 esac
 5556 
 5557 # Do 'set' in a subshell so we don't clobber the current shell's
 5558 # arguments.  Must try -L first in case configure is actually a
 5559 # symlink; some systems play weird games with the mod time of symlinks
 5560 # (eg FreeBSD returns the mod time of the symlink's containing
 5561 # directory).
 5562 if (
 5563    am_has_slept=no
 5564    for am_try in 1 2; do
 5565      echo "timestamp, slept: $am_has_slept" > conftest.file
 5566      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 5567      if test "$[*]" = "X"; then
 5568 	# -L didn't work.
 5569 	set X `ls -t "$srcdir/configure" conftest.file`
 5570      fi
 5571      if test "$[*]" != "X $srcdir/configure conftest.file" \
 5572 	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
 5573 
 5574 	# If neither matched, then we have a broken ls.  This can happen
 5575 	# if, for instance, CONFIG_SHELL is bash and it inherits a
 5576 	# broken ls alias from the environment.  This has actually
 5577 	# happened.  Such a system could not be considered "sane".
 5578 	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 5579   alias in your environment])
 5580      fi
 5581      if test "$[2]" = conftest.file || test $am_try -eq 2; then
 5582        break
 5583      fi
 5584      # Just in case.
 5585      sleep 1
 5586      am_has_slept=yes
 5587    done
 5588    test "$[2]" = conftest.file
 5589    )
 5590 then
 5591    # Ok.
 5592    :
 5593 else
 5594    AC_MSG_ERROR([newly created file is older than distributed files!
 5595 Check your system clock])
 5596 fi
 5597 AC_MSG_RESULT([yes])
 5598 # If we didn't sleep, we still need to ensure time stamps of config.status and
 5599 # generated files are strictly newer.
 5600 am_sleep_pid=
 5601 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
 5602   ( sleep 1 ) &
 5603   am_sleep_pid=$!
 5604 fi
 5605 AC_CONFIG_COMMANDS_PRE(
 5606   [AC_MSG_CHECKING([that generated files are newer than configure])
 5607    if test -n "$am_sleep_pid"; then
 5608      # Hide warnings about reused PIDs.
 5609      wait $am_sleep_pid 2>/dev/null
 5610    fi
 5611    AC_MSG_RESULT([done])])
 5612 rm -f conftest.file
 5613 ])
 5614 
 5615 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
 5616 #
 5617 # This file is free software; the Free Software Foundation
 5618 # gives unlimited permission to copy and/or distribute it,
 5619 # with or without modifications, as long as this notice is preserved.
 5620 
 5621 # AM_SILENT_RULES([DEFAULT])
 5622 # --------------------------
 5623 # Enable less verbose build rules; with the default set to DEFAULT
 5624 # ("yes" being less verbose, "no" or empty being verbose).
 5625 AC_DEFUN([AM_SILENT_RULES],
 5626 [AC_ARG_ENABLE([silent-rules], [dnl
 5627 AS_HELP_STRING(
 5628   [--enable-silent-rules],
 5629   [less verbose build output (undo: "make V=1")])
 5630 AS_HELP_STRING(
 5631   [--disable-silent-rules],
 5632   [verbose build output (undo: "make V=0")])dnl
 5633 ])
 5634 case $enable_silent_rules in @%:@ (((
 5635   yes) AM_DEFAULT_VERBOSITY=0;;
 5636    no) AM_DEFAULT_VERBOSITY=1;;
 5637     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 5638 esac
 5639 dnl
 5640 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 5641 dnl do not support nested variable expansions.
 5642 dnl See automake bug#9928 and bug#10237.
 5643 am_make=${MAKE-make}
 5644 AC_CACHE_CHECK([whether $am_make supports nested variables],
 5645    [am_cv_make_support_nested_variables],
 5646    [if AS_ECHO([['TRUE=$(BAR$(V))
 5647 BAR0=false
 5648 BAR1=true
 5649 V=1
 5650 am__doit:
 5651 	@$(TRUE)
 5652 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 5653   am_cv_make_support_nested_variables=yes
 5654 else
 5655   am_cv_make_support_nested_variables=no
 5656 fi])
 5657 if test $am_cv_make_support_nested_variables = yes; then
 5658   dnl Using '$V' instead of '$(V)' breaks IRIX make.
 5659   AM_V='$(V)'
 5660   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 5661 else
 5662   AM_V=$AM_DEFAULT_VERBOSITY
 5663   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 5664 fi
 5665 AC_SUBST([AM_V])dnl
 5666 AM_SUBST_NOTMAKE([AM_V])dnl
 5667 AC_SUBST([AM_DEFAULT_V])dnl
 5668 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
 5669 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 5670 AM_BACKSLASH='\'
 5671 AC_SUBST([AM_BACKSLASH])dnl
 5672 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 5673 ])
 5674 
 5675 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
 5676 #
 5677 # This file is free software; the Free Software Foundation
 5678 # gives unlimited permission to copy and/or distribute it,
 5679 # with or without modifications, as long as this notice is preserved.
 5680 
 5681 # AM_PROG_INSTALL_STRIP
 5682 # ---------------------
 5683 # One issue with vendor 'install' (even GNU) is that you can't
 5684 # specify the program used to strip binaries.  This is especially
 5685 # annoying in cross-compiling environments, where the build's strip
 5686 # is unlikely to handle the host's binaries.
 5687 # Fortunately install-sh will honor a STRIPPROG variable, so we
 5688 # always use install-sh in "make install-strip", and initialize
 5689 # STRIPPROG with the value of the STRIP variable (set by the user).
 5690 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 5691 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 5692 # Installed binaries are usually stripped using 'strip' when the user
 5693 # run "make install-strip".  However 'strip' might not be the right
 5694 # tool to use in cross-compilation environments, therefore Automake
 5695 # will honor the 'STRIP' environment variable to overrule this program.
 5696 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 5697 if test "$cross_compiling" != no; then
 5698   AC_CHECK_TOOL([STRIP], [strip], :)
 5699 fi
 5700 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 5701 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 5702 
 5703 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
 5704 #
 5705 # This file is free software; the Free Software Foundation
 5706 # gives unlimited permission to copy and/or distribute it,
 5707 # with or without modifications, as long as this notice is preserved.
 5708 
 5709 # _AM_SUBST_NOTMAKE(VARIABLE)
 5710 # ---------------------------
 5711 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 5712 # This macro is traced by Automake.
 5713 AC_DEFUN([_AM_SUBST_NOTMAKE])
 5714 
 5715 # AM_SUBST_NOTMAKE(VARIABLE)
 5716 # --------------------------
 5717 # Public sister of _AM_SUBST_NOTMAKE.
 5718 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 5719 
 5720 # Check how to create a tarball.                            -*- Autoconf -*-
 5721 
 5722 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
 5723 #
 5724 # This file is free software; the Free Software Foundation
 5725 # gives unlimited permission to copy and/or distribute it,
 5726 # with or without modifications, as long as this notice is preserved.
 5727 
 5728 # _AM_PROG_TAR(FORMAT)
 5729 # --------------------
 5730 # Check how to create a tarball in format FORMAT.
 5731 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
 5732 #
 5733 # Substitute a variable $(am__tar) that is a command
 5734 # writing to stdout a FORMAT-tarball containing the directory
 5735 # $tardir.
 5736 #     tardir=directory && $(am__tar) > result.tar
 5737 #
 5738 # Substitute a variable $(am__untar) that extract such
 5739 # a tarball read from stdin.
 5740 #     $(am__untar) < result.tar
 5741 #
 5742 AC_DEFUN([_AM_PROG_TAR],
 5743 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 5744 # in the wild :-(  We should find a proper way to deprecate it ...
 5745 AC_SUBST([AMTAR], ['$${TAR-tar}'])
 5746 
 5747 # We'll loop over all known methods to create a tar archive until one works.
 5748 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 5749 
 5750 m4_if([$1], [v7],
 5751   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 5752 
 5753   [m4_case([$1],
 5754     [ustar],
 5755      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
 5756       # There is notably a 21 bits limit for the UID and the GID.  In fact,
 5757       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
 5758       # and bug#13588).
 5759       am_max_uid=2097151 # 2^21 - 1
 5760       am_max_gid=$am_max_uid
 5761       # The $UID and $GID variables are not portable, so we need to resort
 5762       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
 5763       # below are definitely unexpected, so allow the users to see them
 5764       # (that is, avoid stderr redirection).
 5765       am_uid=`id -u || echo unknown`
 5766       am_gid=`id -g || echo unknown`
 5767       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
 5768       if test $am_uid -le $am_max_uid; then
 5769          AC_MSG_RESULT([yes])
 5770       else
 5771          AC_MSG_RESULT([no])
 5772          _am_tools=none
 5773       fi
 5774       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
 5775       if test $am_gid -le $am_max_gid; then
 5776          AC_MSG_RESULT([yes])
 5777       else
 5778         AC_MSG_RESULT([no])
 5779         _am_tools=none
 5780       fi],
 5781 
 5782   [pax],
 5783     [],
 5784 
 5785   [m4_fatal([Unknown tar format])])
 5786 
 5787   AC_MSG_CHECKING([how to create a $1 tar archive])
 5788 
 5789   # Go ahead even if we have the value already cached.  We do so because we
 5790   # need to set the values for the 'am__tar' and 'am__untar' variables.
 5791   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 5792 
 5793   for _am_tool in $_am_tools; do
 5794     case $_am_tool in
 5795     gnutar)
 5796       for _am_tar in tar gnutar gtar; do
 5797         AM_RUN_LOG([$_am_tar --version]) && break
 5798       done
 5799       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 5800       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 5801       am__untar="$_am_tar -xf -"
 5802       ;;
 5803     plaintar)
 5804       # Must skip GNU tar: if it does not support --format= it doesn't create
 5805       # ustar tarball either.
 5806       (tar --version) >/dev/null 2>&1 && continue
 5807       am__tar='tar chf - "$$tardir"'
 5808       am__tar_='tar chf - "$tardir"'
 5809       am__untar='tar xf -'
 5810       ;;
 5811     pax)
 5812       am__tar='pax -L -x $1 -w "$$tardir"'
 5813       am__tar_='pax -L -x $1 -w "$tardir"'
 5814       am__untar='pax -r'
 5815       ;;
 5816     cpio)
 5817       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 5818       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 5819       am__untar='cpio -i -H $1 -d'
 5820       ;;
 5821     none)
 5822       am__tar=false
 5823       am__tar_=false
 5824       am__untar=false
 5825       ;;
 5826     esac
 5827 
 5828     # If the value was cached, stop now.  We just wanted to have am__tar
 5829     # and am__untar set.
 5830     test -n "${am_cv_prog_tar_$1}" && break
 5831 
 5832     # tar/untar a dummy directory, and stop if the command works.
 5833     rm -rf conftest.dir
 5834     mkdir conftest.dir
 5835     echo GrepMe > conftest.dir/file
 5836     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 5837     rm -rf conftest.dir
 5838     if test -s conftest.tar; then
 5839       AM_RUN_LOG([$am__untar <conftest.tar])
 5840       AM_RUN_LOG([cat conftest.dir/file])
 5841       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 5842     fi
 5843   done
 5844   rm -rf conftest.dir
 5845 
 5846   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 5847   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 5848 
 5849 AC_SUBST([am__tar])
 5850 AC_SUBST([am__untar])
 5851 ]) # _AM_PROG_TAR
 5852