1 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23 # ===========================================================================
24 # https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
25 # ===========================================================================
29 # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
33 # Check whether the given FLAG works with the current language's compiler
34 # or gives an error. (Warnings, however, are ignored)
36 # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
39 # If EXTRA-FLAGS is defined, it is added to the current language's default
40 # flags (e.g. CFLAGS) when the check is done. The check is thus made with
41 # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
42 # force the compiler to issue an error when a bad flag is given.
44 # INPUT gives an alternative input source to AC_COMPILE_IFELSE.
46 # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
47 # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
51 # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
52 # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
54 # This program is free software: you can redistribute it and/or modify it
55 # under the terms of the GNU General Public License as published by the
56 # Free Software Foundation, either version 3 of the License, or (at your
57 # option) any later version.
59 # This program is distributed in the hope that it will be useful, but
60 # WITHOUT ANY WARRANTY; without even the implied warranty of
61 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
62 # Public License for more details.
64 # You should have received a copy of the GNU General Public License along
65 # with this program. If not, see <https://www.gnu.org/licenses/>.
67 # As a special exception, the respective Autoconf Macro's copyright owner
68 # gives unlimited permission to copy, distribute and modify the configure
69 # scripts that are the output of Autoconf when processing the Macro. You
70 # need not follow the terms of the GNU General Public License when using
71 # or distributing such scripts, even though portions of the text of the
72 # Macro appear in them. The GNU General Public License (GPL) does govern
73 # all other use of the material that constitutes the Autoconf Macro.
75 # This special exception to the GPL applies to versions of the Autoconf
76 # Macro released by the Autoconf Archive. When you make and distribute a
77 # modified version of the Autoconf Macro, you may extend this special
78 # exception to the GPL to apply to your modified version as well.
82 AC_DEFUN([AX_CHECK_COMPILE_FLAG],
83 [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
84 AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
85 AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
86 ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
87 _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
88 AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
89 [AS_VAR_SET(CACHEVAR,[yes])],
90 [AS_VAR_SET(CACHEVAR,[no])])
91 _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
92 AS_VAR_IF(CACHEVAR,yes,
93 [m4_default([$2], :)],
94 [m4_default([$3], :)])
95 AS_VAR_POPDEF([CACHEVAR])dnl
96 ])dnl AX_CHECK_COMPILE_FLAGS
98 # ===========================================================================
99 # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
100 # ===========================================================================
104 # AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
108 # Check for baseline language coverage in the compiler for the specified
109 # version of the C++ standard. If necessary, add switches to CXX and
110 # CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
111 # or '14' (for the C++14 standard).
113 # The second argument, if specified, indicates whether you insist on an
114 # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
115 # -std=c++11). If neither is specified, you get whatever works, with
116 # preference for an extended mode.
118 # The third argument, if specified 'mandatory' or if left unspecified,
119 # indicates that baseline support for the specified C++ standard is
120 # required and that the macro should error out if no mode with that
121 # support is found. If specified 'optional', then configuration proceeds
122 # regardless, after defining HAVE_CXX${VERSION} if and only if a
123 # supporting mode is found.
127 # Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
128 # Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
129 # Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
130 # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
131 # Copyright (c) 2015 Paul Norman <penorman@mac.com>
132 # Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
133 # Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
135 # Copying and distribution of this file, with or without modification, are
136 # permitted in any medium without royalty provided the copyright notice
137 # and this notice are preserved. This file is offered as-is, without any
142 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
143 dnl (serial version number 13).
145 AX_REQUIRE_DEFINED([AC_MSG_WARN])
146 AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
147 m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
148 [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
149 [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
150 [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
154 [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
155 m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
156 [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
157 [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
158 [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
159 AC_LANG_PUSH([C++])dnl
161 AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
162 ax_cv_cxx_compile_cxx$1,
163 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
164 [ax_cv_cxx_compile_cxx$1=yes],
165 [ax_cv_cxx_compile_cxx$1=no])])
166 if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
170 m4_if([$2], [noext], [], [dnl
171 if test x$ac_success = xno; then
172 for alternative in ${ax_cxx_compile_alternatives}; do
173 switch="-std=gnu++${alternative}"
174 cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
175 AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
179 AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
180 [eval $cachevar=yes],
183 if eval test x\$$cachevar = xyes; then
185 if test -n "$CXXCPP" ; then
186 CXXCPP="$CXXCPP $switch"
194 m4_if([$2], [ext], [], [dnl
195 if test x$ac_success = xno; then
196 dnl HP's aCC needs +std=c++11 according to:
197 dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
198 dnl Cray's crayCC needs "-h std=c++11"
199 for alternative in ${ax_cxx_compile_alternatives}; do
200 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
201 cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
202 AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
206 AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
207 [eval $cachevar=yes],
210 if eval test x\$$cachevar = xyes; then
212 if test -n "$CXXCPP" ; then
213 CXXCPP="$CXXCPP $switch"
219 if test x$ac_success = xyes; then
225 if test x$ax_cxx_compile_cxx$1_required = xtrue; then
226 if test x$ac_success = xno; then
227 AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
230 if test x$ac_success = xno; then
232 AC_MSG_NOTICE([No compiler with C++$1 support was found])
235 AC_DEFINE(HAVE_CXX$1,1,
236 [define if the compiler supports basic C++$1 syntax])
239 m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
243 dnl Test body for checking C++11 support
245 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
246 _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
250 dnl Test body for checking C++14 support
252 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
253 _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
254 _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
257 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
258 _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
259 _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
260 _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
263 dnl Tests for new features in C++11
265 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
267 // If the compiler admits that it is not ready for C++11, why torture it?
268 // Hopefully, this will speed up the test.
272 #error "This is not a C++ compiler"
274 #elif __cplusplus < 201103L
276 #error "This is not a C++11 compiler"
283 namespace test_static_assert
286 template <typename T>
289 static_assert(sizeof(int) <= sizeof(T), "not big enough");
294 namespace test_final_override
302 struct Derived : public Base
304 virtual void f() override {}
309 namespace test_double_right_angle_brackets
312 template < typename T >
315 typedef check<void> single_type;
316 typedef check<check<void>> double_type;
317 typedef check<check<check<void>>> triple_type;
318 typedef check<check<check<check<void>>>> quadruple_type;
322 namespace test_decltype
335 namespace test_type_deduction
338 template < typename T1, typename T2 >
341 static const bool value = false;
344 template < typename T >
347 static const bool value = true;
350 template < typename T1, typename T2 >
352 add(T1 a1, T2 a2) -> decltype(a1 + a2)
358 test(const int c, volatile int v)
360 static_assert(is_same<int, decltype(0)>::value == true, "");
361 static_assert(is_same<int, decltype(c)>::value == false, "");
362 static_assert(is_same<int, decltype(v)>::value == false, "");
365 auto sumi = ac + av + 'x';
366 auto sumf = ac + av + 1.0;
367 static_assert(is_same<int, decltype(ac)>::value == true, "");
368 static_assert(is_same<int, decltype(av)>::value == true, "");
369 static_assert(is_same<int, decltype(sumi)>::value == true, "");
370 static_assert(is_same<int, decltype(sumf)>::value == false, "");
371 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
372 return (sumf > 0.0) ? sumi : add(c, v);
377 namespace test_noexcept
380 int f() { return 0; }
381 int g() noexcept { return 0; }
383 static_assert(noexcept(f()) == false, "");
384 static_assert(noexcept(g()) == true, "");
388 namespace test_constexpr
391 template < typename CharT >
392 unsigned long constexpr
393 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
395 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
398 template < typename CharT >
399 unsigned long constexpr
400 strlen_c(const CharT *const s) noexcept
402 return strlen_c_r(s, 0UL);
405 static_assert(strlen_c("") == 0UL, "");
406 static_assert(strlen_c("1") == 1UL, "");
407 static_assert(strlen_c("example") == 7UL, "");
408 static_assert(strlen_c("another\0example") == 7UL, "");
412 namespace test_rvalue_references
418 static constexpr int value = N;
421 answer<1> f(int&) { return answer<1>(); }
422 answer<2> f(const int&) { return answer<2>(); }
423 answer<3> f(int&&) { return answer<3>(); }
430 static_assert(decltype(f(i))::value == 1, "");
431 static_assert(decltype(f(c))::value == 2, "");
432 static_assert(decltype(f(0))::value == 3, "");
437 namespace test_uniform_initialization
442 static const int zero {};
443 static const int one {1};
446 static_assert(test::zero == 0, "");
447 static_assert(test::one == 1, "");
451 namespace test_lambdas
457 auto lambda1 = [](){};
458 auto lambda2 = lambda1;
466 auto a = [](int i, int j){ return i + j; }(1, 2);
467 auto b = []() -> int { return '0'; }();
468 auto c = [=](){ return a + b; }();
469 auto d = [&](){ return c; }();
470 auto e = [a, &b](int x) mutable {
471 const auto identity = [](int y){ return y; };
472 for (auto i = 0; i < a; ++i)
474 return x + identity(a + b);
476 return a + b + c + d + e;
482 const auto nullary = [](){ return 0; };
483 const auto unary = [](int x){ return x; };
484 using nullary_t = decltype(nullary);
485 using unary_t = decltype(unary);
486 const auto higher1st = [](nullary_t f){ return f(); };
487 const auto higher2nd = [unary](nullary_t f1){
488 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
490 return higher1st(nullary) + higher2nd(nullary)(unary);
495 namespace test_variadic_templates
501 template <int N0, int... N1toN>
502 struct sum<N0, N1toN...>
504 static constexpr auto value = N0 + sum<N1toN...>::value;
510 static constexpr auto value = 0;
513 static_assert(sum<>::value == 0, "");
514 static_assert(sum<1>::value == 1, "");
515 static_assert(sum<23>::value == 23, "");
516 static_assert(sum<1, 2>::value == 3, "");
517 static_assert(sum<5, 5, 11>::value == 21, "");
518 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
522 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
523 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
525 namespace test_template_alias_sfinae
531 using member = typename T::member_type;
537 void func(member<T>*) {}
541 void test() { func<foo>(0); }
547 #endif // __cplusplus >= 201103L
552 dnl Tests for new features in C++14
554 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
556 // If the compiler admits that it is not ready for C++14, why torture it?
557 // Hopefully, this will speed up the test.
561 #error "This is not a C++ compiler"
563 #elif __cplusplus < 201402L
565 #error "This is not a C++14 compiler"
572 namespace test_polymorphic_lambdas
578 const auto lambda = [](auto&&... args){
579 const auto istiny = [](auto x){
580 return (sizeof(x) == 1UL) ? 1 : 0;
582 const int aretiny[] = { istiny(args)... };
585 return lambda(1, 1L, 1.0f, '1');
590 namespace test_binary_literals
593 constexpr auto ivii = 0b0000000000101010;
594 static_assert(ivii == 42, "wrong value");
598 namespace test_generalized_constexpr
601 template < typename CharT >
602 constexpr unsigned long
603 strlen_c(const CharT *const s) noexcept
606 for (auto p = s; *p; ++p)
611 static_assert(strlen_c("") == 0UL, "");
612 static_assert(strlen_c("x") == 1UL, "");
613 static_assert(strlen_c("test") == 4UL, "");
614 static_assert(strlen_c("another\0test") == 7UL, "");
618 namespace test_lambda_init_capture
625 const auto lambda1 = [a = x](int b){ return a + b; };
626 const auto lambda2 = [a = lambda1(x)](){ return a; };
632 namespace test_digit_separators
635 constexpr auto ten_million = 100'000'000;
636 static_assert(ten_million == 100000000, "");
640 namespace test_return_type_deduction
643 auto f(int& x) { return x; }
644 decltype(auto) g(int& x) { return x; }
646 template < typename T1, typename T2 >
649 static constexpr auto value = false;
652 template < typename T >
655 static constexpr auto value = true;
662 static_assert(is_same<int, decltype(f(x))>::value, "");
663 static_assert(is_same<int&, decltype(g(x))>::value, "");
671 #endif // __cplusplus >= 201402L
676 dnl Tests for new features in C++17
678 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
680 // If the compiler admits that it is not ready for C++17, why torture it?
681 // Hopefully, this will speed up the test.
685 #error "This is not a C++ compiler"
687 #elif __cplusplus <= 201402L
689 #error "This is not a C++17 compiler"
693 #if defined(__clang__)
696 #if defined(__GNUC__)
701 #include <initializer_list>
703 #include <type_traits>
708 #if !defined(REALLY_CLANG)
709 namespace test_constexpr_lambdas
712 // TODO: test it with clang++ from git
714 constexpr int foo = [](){return 42;}();
717 #endif // !defined(REALLY_CLANG)
719 namespace test::nested_namespace::definitions
724 namespace test_fold_expression
727 template<typename... Args>
728 int multiply(Args... args)
730 return (args * ... * 1);
733 template<typename... Args>
734 bool all(Args... args)
736 return (args && ...);
741 namespace test_extended_static_assert
744 static_assert (true);
748 namespace test_auto_brace_init_list
754 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
755 static_assert(std::is_same<int, decltype(bar)>::value);
758 namespace test_typename_in_template_template_parameter
761 template<template<typename> typename X> struct D;
765 namespace test_fallthrough_nodiscard_maybe_unused_attributes
773 [[nodiscard]] int f2()
775 [[maybe_unused]] auto unused = f1();
790 namespace test_extended_aggregate_initialization
806 struct derived : base1, base2
811 derived d1 {{1, 2}, {}, 4}; // full initialization
812 derived d2 {{}, {}, 4}; // value-initialized bases
816 namespace test_general_range_based_for_loop
828 const int& operator* () const
845 bool operator== (const iter& i, const sentinel& s)
850 bool operator!= (const iter& i, const sentinel& s)
874 [[maybe_unused]] auto v = i;
880 namespace test_lambda_capture_asterisk_this_by_value
897 namespace test_enum_class_construction
900 enum class byte : unsigned char
907 namespace test_constexpr_if
925 namespace test_selection_statement_with_initializer
935 if (auto i = f(); i > 0)
940 switch (auto i = f(); i + 4)
952 #if !defined(REALLY_CLANG)
953 namespace test_template_argument_deduction_for_class_templates
956 // TODO: test it with clang++ from git
958 template <typename T1, typename T2>
972 [[maybe_unused]] auto p = pair{13, 42u};
976 #endif // !defined(REALLY_CLANG)
978 namespace test_non_type_auto_template_parameters
990 #if !defined(REALLY_CLANG)
991 namespace test_structured_bindings
994 // TODO: test it with clang++ from git
996 int arr[2] = { 1, 2 };
997 std::pair<int, int> pr = { 1, 2 };
999 auto f1() -> int(&)[2]
1004 auto f2() -> std::pair<int, int>&
1020 auto [ x1, y1 ] = f1();
1021 auto& [ xr1, yr1 ] = f1();
1022 auto [ x2, y2 ] = f2();
1023 auto& [ xr2, yr2 ] = f2();
1024 const auto [ x3, y3 ] = f3();
1027 #endif // !defined(REALLY_CLANG)
1029 #if !defined(REALLY_CLANG)
1030 namespace test_exception_spec_type_system
1033 // TODO: test it with clang++ from git
1041 template<typename T>
1045 template<typename T1, typename T2>
1049 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
1052 #endif // !defined(REALLY_CLANG)
1054 namespace test_inline_variables
1057 template<class T> void f(T)
1060 template<class T> inline T g(T)
1065 template<> inline void f<>(int)
1068 template<> int g<>(int)
1075 } // namespace cxx17
1077 #endif // __cplusplus <= 201402L
1081 # gettext.m4 serial 68 (gettext-0.19.8)
1082 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
1083 dnl This file is free software; the Free Software Foundation
1084 dnl gives unlimited permission to copy and/or distribute it,
1085 dnl with or without modifications, as long as this notice is preserved.
1087 dnl This file can be used in projects which are not available under
1088 dnl the GNU General Public License or the GNU Library General Public
1089 dnl License but which still want to provide support for the GNU gettext
1091 dnl Please note that the actual code of the GNU gettext library is covered
1092 dnl by the GNU Library General Public License, and the rest of the GNU
1093 dnl gettext package is covered by the GNU General Public License.
1094 dnl They are *not* in the public domain.
1097 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1098 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
1100 dnl Macro to add for using GNU gettext.
1102 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
1103 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
1104 dnl default (if it is not specified or empty) is 'no-libtool'.
1105 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
1106 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
1107 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
1108 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
1109 dnl depending on --{enable,disable}-{shared,static} and on the presence of
1110 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
1111 dnl $(top_builddir)/intl/libintl.a will be created.
1112 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
1113 dnl implementations (in libc or libintl) without the ngettext() function
1114 dnl will be ignored. If NEEDSYMBOL is specified and is
1115 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
1116 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
1117 dnl INTLDIR is used to find the intl libraries. If empty,
1118 dnl the value '$(top_builddir)/intl/' is used.
1120 dnl The result of the configuration is one of three cases:
1121 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
1123 dnl Catalog format: GNU --> install in $(datadir)
1124 dnl Catalog extension: .mo after installation, .gmo in source tree
1125 dnl 2) GNU gettext has been found in the system's C library.
1126 dnl Catalog format: GNU --> install in $(datadir)
1127 dnl Catalog extension: .mo after installation, .gmo in source tree
1128 dnl 3) No internationalization, always use English msgid.
1129 dnl Catalog format: none
1130 dnl Catalog extension: none
1131 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
1132 dnl The use of .gmo is historical (it was needed to avoid overwriting the
1133 dnl GNU format catalogs when building on a platform with an X/Open gettext),
1134 dnl but we keep it in order not to force irrelevant filename changes on the
1137 AC_DEFUN([AM_GNU_GETTEXT],
1139 dnl Argument checking.
1140 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
1141 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
1143 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
1144 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
1145 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
1146 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
1148 define([gt_included_intl],
1149 ifelse([$1], [external],
1150 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
1152 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
1154 AM_GNU_GETTEXT_NEED([$2])
1156 AC_REQUIRE([AM_PO_SUBDIRS])dnl
1157 ifelse(gt_included_intl, yes, [
1158 AC_REQUIRE([AM_INTL_SUBDIR])dnl
1161 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1162 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1163 AC_REQUIRE([AC_LIB_RPATH])
1165 dnl Sometimes libintl requires libiconv, so first search for libiconv.
1166 dnl Ideally we would do this search only after the
1167 dnl if test "$USE_NLS" = "yes"; then
1168 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
1169 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
1170 dnl the configure script would need to contain the same shell code
1171 dnl again, outside any 'if'. There are two solutions:
1172 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
1173 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
1174 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
1175 dnl documented, we avoid it.
1176 ifelse(gt_included_intl, yes, , [
1177 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1180 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
1184 AC_REQUIRE([AM_NLS])
1186 ifelse(gt_included_intl, yes, [
1187 BUILD_INCLUDED_LIBINTL=no
1188 USE_INCLUDED_LIBINTL=no
1194 dnl Add a version number to the cache macros.
1195 case " $gt_needs " in
1196 *" need-formatstring-macros "*) gt_api_version=3 ;;
1197 *" need-ngettext "*) gt_api_version=2 ;;
1198 *) gt_api_version=1 ;;
1200 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
1201 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
1203 dnl If we use NLS figure out what method
1204 if test "$USE_NLS" = "yes"; then
1205 gt_use_preinstalled_gnugettext=no
1206 ifelse(gt_included_intl, yes, [
1207 AC_MSG_CHECKING([whether included gettext is requested])
1208 AC_ARG_WITH([included-gettext],
1209 [ --with-included-gettext use the GNU gettext library included here],
1210 nls_cv_force_use_gnu_gettext=$withval,
1211 nls_cv_force_use_gnu_gettext=no)
1212 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
1214 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1215 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1217 dnl User does not insist on using GNU NLS library. Figure out what
1218 dnl to use. If GNU gettext is available we use this. Else we have
1219 dnl to fall back to GNU NLS library.
1221 if test $gt_api_version -ge 3; then
1222 gt_revision_test_code='
1223 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1224 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1227 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1231 gt_revision_test_code=
1233 if test $gt_api_version -ge 2; then
1234 gt_expression_test_code=' + * ngettext ("", "", 0)'
1236 gt_expression_test_code=
1239 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
1243 #include <libintl.h>
1244 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1245 extern int _nl_msg_cat_cntr;
1246 extern int *_nl_domain_bindings;
1247 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
1249 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
1251 $gt_revision_test_code
1254 bindtextdomain ("", "");
1255 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
1257 [eval "$gt_func_gnugettext_libc=yes"],
1258 [eval "$gt_func_gnugettext_libc=no"])])
1260 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
1261 dnl Sometimes libintl requires libiconv, so first search for libiconv.
1262 ifelse(gt_included_intl, yes, , [
1265 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1266 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1267 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1268 dnl even if libiconv doesn't exist.
1269 AC_LIB_LINKFLAGS_BODY([intl])
1270 AC_CACHE_CHECK([for GNU gettext in libintl],
1271 [$gt_func_gnugettext_libintl],
1272 [gt_save_CPPFLAGS="$CPPFLAGS"
1273 CPPFLAGS="$CPPFLAGS $INCINTL"
1274 gt_save_LIBS="$LIBS"
1275 LIBS="$LIBS $LIBINTL"
1276 dnl Now see whether libintl exists and does not depend on libiconv.
1280 #include <libintl.h>
1281 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1282 extern int _nl_msg_cat_cntr;
1287 const char *_nl_expand_alias (const char *);
1288 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
1290 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
1292 $gt_revision_test_code
1295 bindtextdomain ("", "");
1296 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
1298 [eval "$gt_func_gnugettext_libintl=yes"],
1299 [eval "$gt_func_gnugettext_libintl=no"])
1300 dnl Now see whether libintl exists and depends on libiconv.
1301 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
1302 LIBS="$LIBS $LIBICONV"
1306 #include <libintl.h>
1307 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1308 extern int _nl_msg_cat_cntr;
1313 const char *_nl_expand_alias (const char *);
1314 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
1316 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
1318 $gt_revision_test_code
1321 bindtextdomain ("", "");
1322 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
1324 [LIBINTL="$LIBINTL $LIBICONV"
1325 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1326 eval "$gt_func_gnugettext_libintl=yes"
1329 CPPFLAGS="$gt_save_CPPFLAGS"
1330 LIBS="$gt_save_LIBS"])
1333 dnl If an already present or preinstalled GNU gettext() is found,
1334 dnl use it. But if this macro is used in GNU gettext, and GNU
1335 dnl gettext is already preinstalled in libintl, we update this
1336 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1337 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
1338 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
1339 && test "$PACKAGE" != gettext-runtime \
1340 && test "$PACKAGE" != gettext-tools; }; then
1341 gt_use_preinstalled_gnugettext=yes
1343 dnl Reset the values set by searching for libintl.
1349 ifelse(gt_included_intl, yes, [
1350 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1351 dnl GNU gettext is not found in the C library.
1352 dnl Fall back on included GNU gettext library.
1353 nls_cv_use_gnu_gettext=yes
1357 if test "$nls_cv_use_gnu_gettext" = "yes"; then
1358 dnl Mark actions used to generate GNU NLS library.
1359 BUILD_INCLUDED_LIBINTL=yes
1360 USE_INCLUDED_LIBINTL=yes
1361 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
1362 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
1363 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1367 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1368 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1369 dnl Mark actions to use GNU gettext tools.
1374 if test -n "$INTL_MACOSX_LIBS"; then
1375 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1376 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1377 dnl Some extra flags are needed during linking.
1378 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
1379 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
1383 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1384 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1385 AC_DEFINE([ENABLE_NLS], [1],
1386 [Define to 1 if translation of program messages to the user's native language
1393 AC_MSG_CHECKING([whether to use NLS])
1394 AC_MSG_RESULT([$USE_NLS])
1395 if test "$USE_NLS" = "yes"; then
1396 AC_MSG_CHECKING([where the gettext function comes from])
1397 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1398 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
1399 gt_source="external libintl"
1404 gt_source="included intl directory"
1406 AC_MSG_RESULT([$gt_source])
1409 if test "$USE_NLS" = "yes"; then
1411 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1412 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
1413 AC_MSG_CHECKING([how to link with libintl])
1414 AC_MSG_RESULT([$LIBINTL])
1415 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1418 dnl For backward compatibility. Some packages may be using this.
1419 AC_DEFINE([HAVE_GETTEXT], [1],
1420 [Define if the GNU gettext() function is already present or preinstalled.])
1421 AC_DEFINE([HAVE_DCGETTEXT], [1],
1422 [Define if the GNU dcgettext() function is already present or preinstalled.])
1425 dnl We need to process the po/ directory.
1429 ifelse(gt_included_intl, yes, [
1430 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1431 dnl to 'yes' because some of the testsuite requires it.
1432 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
1433 BUILD_INCLUDED_LIBINTL=yes
1436 dnl Make all variables we use known to autoconf.
1437 AC_SUBST([BUILD_INCLUDED_LIBINTL])
1438 AC_SUBST([USE_INCLUDED_LIBINTL])
1439 AC_SUBST([CATOBJEXT])
1441 dnl For backward compatibility. Some configure.ins may be using this.
1443 nls_cv_header_libgt=
1445 dnl For backward compatibility. Some Makefiles may be using this.
1447 AC_SUBST([DATADIRNAME])
1449 dnl For backward compatibility. Some Makefiles may be using this.
1451 AC_SUBST([INSTOBJEXT])
1453 dnl For backward compatibility. Some Makefiles may be using this.
1457 dnl For backward compatibility. Some Makefiles may be using this.
1459 if test "$USE_INCLUDED_LIBINTL" = yes; then
1460 INTLOBJS="\$(GETTOBJS)"
1462 AC_SUBST([INTLOBJS])
1464 dnl Enable libtool support if the surrounding package wishes it.
1465 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1466 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
1469 dnl For backward compatibility. Some Makefiles may be using this.
1471 AC_SUBST([INTLLIBS])
1473 dnl Make all documented variables known to autoconf.
1475 AC_SUBST([LTLIBINTL])
1480 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
1481 m4_define([gt_NEEDS_INIT],
1483 m4_divert_text([DEFAULTS], [gt_needs=])
1484 m4_define([gt_NEEDS_INIT], [])
1488 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
1489 AC_DEFUN([AM_GNU_GETTEXT_NEED],
1491 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
1495 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1496 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1499 dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
1500 AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
1502 # iconv.m4 serial 19 (gettext-0.18.2)
1503 dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
1504 dnl This file is free software; the Free Software Foundation
1505 dnl gives unlimited permission to copy and/or distribute it,
1506 dnl with or without modifications, as long as this notice is preserved.
1508 dnl From Bruno Haible.
1510 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
1512 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1513 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1514 AC_REQUIRE([AC_LIB_RPATH])
1516 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1518 AC_LIB_LINKFLAGS_BODY([iconv])
1521 AC_DEFUN([AM_ICONV_LINK],
1523 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1524 dnl those with the standalone portable GNU libiconv installed).
1525 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
1527 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1529 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1531 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
1532 dnl because if the user has installed libiconv and not disabled its use
1533 dnl via --without-libiconv-prefix, he wants to use it. The first
1534 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
1535 am_save_CPPFLAGS="$CPPFLAGS"
1536 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
1538 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
1539 am_cv_func_iconv="no, consider installing GNU libiconv"
1547 [[iconv_t cd = iconv_open("","");
1548 iconv(cd,NULL,NULL,NULL,NULL);
1549 iconv_close(cd);]])],
1550 [am_cv_func_iconv=yes])
1551 if test "$am_cv_func_iconv" != yes; then
1552 am_save_LIBS="$LIBS"
1553 LIBS="$LIBS $LIBICONV"
1560 [[iconv_t cd = iconv_open("","");
1561 iconv(cd,NULL,NULL,NULL,NULL);
1562 iconv_close(cd);]])],
1563 [am_cv_lib_iconv=yes]
1564 [am_cv_func_iconv=yes])
1565 LIBS="$am_save_LIBS"
1568 if test "$am_cv_func_iconv" = yes; then
1569 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
1570 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
1572 am_save_LIBS="$LIBS"
1573 if test $am_cv_lib_iconv = yes; then
1574 LIBS="$LIBS $LIBICONV"
1576 am_cv_func_iconv_works=no
1577 for ac_iconv_const in '' 'const'; do
1585 # define ICONV_CONST $ac_iconv_const
1589 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
1592 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
1593 if (cd_utf8_to_88591 != (iconv_t)(-1))
1595 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
1597 ICONV_CONST char *inptr = input;
1598 size_t inbytesleft = strlen (input);
1600 size_t outbytesleft = sizeof (buf);
1601 size_t res = iconv (cd_utf8_to_88591,
1602 &inptr, &inbytesleft,
1603 &outptr, &outbytesleft);
1606 iconv_close (cd_utf8_to_88591);
1609 /* Test against Solaris 10 bug: Failures are not distinguishable from
1610 successful returns. */
1612 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
1613 if (cd_ascii_to_88591 != (iconv_t)(-1))
1615 static ICONV_CONST char input[] = "\263";
1617 ICONV_CONST char *inptr = input;
1618 size_t inbytesleft = strlen (input);
1620 size_t outbytesleft = sizeof (buf);
1621 size_t res = iconv (cd_ascii_to_88591,
1622 &inptr, &inbytesleft,
1623 &outptr, &outbytesleft);
1626 iconv_close (cd_ascii_to_88591);
1629 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
1631 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
1632 if (cd_88591_to_utf8 != (iconv_t)(-1))
1634 static ICONV_CONST char input[] = "\304";
1635 static char buf[2] = { (char)0xDE, (char)0xAD };
1636 ICONV_CONST char *inptr = input;
1637 size_t inbytesleft = 1;
1639 size_t outbytesleft = 1;
1640 size_t res = iconv (cd_88591_to_utf8,
1641 &inptr, &inbytesleft,
1642 &outptr, &outbytesleft);
1643 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
1645 iconv_close (cd_88591_to_utf8);
1648 #if 0 /* This bug could be worked around by the caller. */
1649 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
1651 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
1652 if (cd_88591_to_utf8 != (iconv_t)(-1))
1654 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
1656 ICONV_CONST char *inptr = input;
1657 size_t inbytesleft = strlen (input);
1659 size_t outbytesleft = sizeof (buf);
1660 size_t res = iconv (cd_88591_to_utf8,
1661 &inptr, &inbytesleft,
1662 &outptr, &outbytesleft);
1665 iconv_close (cd_88591_to_utf8);
1669 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
1671 if (/* Try standardized names. */
1672 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
1673 /* Try IRIX, OSF/1 names. */
1674 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
1675 /* Try AIX names. */
1676 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
1677 /* Try HP-UX names. */
1678 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
1682 [am_cv_func_iconv_works=yes], ,
1684 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
1685 *) am_cv_func_iconv_works="guessing yes" ;;
1687 test "$am_cv_func_iconv_works" = no || break
1689 LIBS="$am_save_LIBS"
1691 case "$am_cv_func_iconv_works" in
1692 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
1693 *) am_func_iconv=yes ;;
1696 am_func_iconv=no am_cv_lib_iconv=no
1698 if test "$am_func_iconv" = yes; then
1699 AC_DEFINE([HAVE_ICONV], [1],
1700 [Define if you have the iconv() function and it works.])
1702 if test "$am_cv_lib_iconv" = yes; then
1703 AC_MSG_CHECKING([how to link with libiconv])
1704 AC_MSG_RESULT([$LIBICONV])
1706 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1708 CPPFLAGS="$am_save_CPPFLAGS"
1712 AC_SUBST([LIBICONV])
1713 AC_SUBST([LTLIBICONV])
1716 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
1717 dnl avoid warnings like
1718 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
1719 dnl This is tricky because of the way 'aclocal' is implemented:
1720 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
1721 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
1722 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
1723 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
1725 m4_define([gl_iconv_AC_DEFUN],
1726 m4_version_prereq([2.64],
1729 [m4_ifdef([gl_00GNULIB],
1734 gl_iconv_AC_DEFUN([AM_ICONV],
1737 if test "$am_cv_func_iconv" = yes; then
1738 AC_MSG_CHECKING([for iconv declaration])
1739 AC_CACHE_VAL([am_cv_proto_iconv], [
1749 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
1750 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1756 [am_cv_proto_iconv_arg1=""],
1757 [am_cv_proto_iconv_arg1="const"])
1758 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);"])
1759 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1761 $am_cv_proto_iconv])
1762 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
1763 [Define as const if the declaration of iconv() needs const.])
1764 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
1765 m4_ifdef([gl_ICONV_H_DEFAULTS],
1766 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
1767 if test -n "$am_cv_proto_iconv_arg1"; then
1774 # intlmacosx.m4 serial 5 (gettext-0.18.2)
1775 dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
1776 dnl This file is free software; the Free Software Foundation
1777 dnl gives unlimited permission to copy and/or distribute it,
1778 dnl with or without modifications, as long as this notice is preserved.
1780 dnl This file can be used in projects which are not available under
1781 dnl the GNU General Public License or the GNU Library General Public
1782 dnl License but which still want to provide support for the GNU gettext
1784 dnl Please note that the actual code of the GNU gettext library is covered
1785 dnl by the GNU Library General Public License, and the rest of the GNU
1786 dnl gettext package is covered by the GNU General Public License.
1787 dnl They are *not* in the public domain.
1789 dnl Checks for special options needed on Mac OS X.
1790 dnl Defines INTL_MACOSX_LIBS.
1791 AC_DEFUN([gt_INTL_MACOSX],
1793 dnl Check for API introduced in Mac OS X 10.2.
1794 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
1795 [gt_cv_func_CFPreferencesCopyAppValue],
1796 [gt_save_LIBS="$LIBS"
1797 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1800 [[#include <CoreFoundation/CFPreferences.h>]],
1801 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
1802 [gt_cv_func_CFPreferencesCopyAppValue=yes],
1803 [gt_cv_func_CFPreferencesCopyAppValue=no])
1804 LIBS="$gt_save_LIBS"])
1805 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
1806 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
1807 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
1809 dnl Check for API introduced in Mac OS X 10.3.
1810 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
1811 [gt_save_LIBS="$LIBS"
1812 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1815 [[#include <CoreFoundation/CFLocale.h>]],
1816 [[CFLocaleCopyCurrent();]])],
1817 [gt_cv_func_CFLocaleCopyCurrent=yes],
1818 [gt_cv_func_CFLocaleCopyCurrent=no])
1819 LIBS="$gt_save_LIBS"])
1820 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1821 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
1822 [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
1825 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1826 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
1828 AC_SUBST([INTL_MACOSX_LIBS])
1831 # lib-ld.m4 serial 6
1832 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
1833 dnl This file is free software; the Free Software Foundation
1834 dnl gives unlimited permission to copy and/or distribute it,
1835 dnl with or without modifications, as long as this notice is preserved.
1837 dnl Subroutines of libtool.m4,
1838 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
1839 dnl collision with libtool.m4.
1841 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
1842 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1843 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
1844 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
1845 case `$LD -v 2>&1 </dev/null` in
1846 *GNU* | *'with BFD'*)
1847 acl_cv_prog_gnu_ld=yes
1850 acl_cv_prog_gnu_ld=no
1853 with_gnu_ld=$acl_cv_prog_gnu_ld
1856 dnl From libtool-2.4. Sets the variable LD.
1857 AC_DEFUN([AC_LIB_PROG_LD],
1858 [AC_REQUIRE([AC_PROG_CC])dnl
1859 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1861 AC_ARG_WITH([gnu-ld],
1862 [AS_HELP_STRING([--with-gnu-ld],
1863 [assume the C compiler uses GNU ld [default=no]])],
1864 [test "$withval" = no || with_gnu_ld=yes],
1865 [with_gnu_ld=no])dnl
1867 # Prepare PATH_SEPARATOR.
1868 # The user is always right.
1869 if test "${PATH_SEPARATOR+set}" != set; then
1870 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
1871 # contains only /bin. Note that ksh looks also at the FPATH variable,
1872 # so we have to set that as well for the test.
1874 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
1875 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
1876 || PATH_SEPARATOR=';'
1881 if test "$GCC" = yes; then
1882 # Check if gcc -print-prog-name=ld gives a path.
1883 AC_MSG_CHECKING([for ld used by $CC])
1886 # gcc leaves a trailing carriage return which upsets mingw
1887 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1889 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1892 # Accept absolute paths.
1893 [[\\/]]* | ?:[[\\/]]*)
1894 re_direlt='/[[^/]][[^/]]*/\.\./'
1895 # Canonicalize the pathname of ld
1896 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
1897 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
1898 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1900 test -z "$LD" && LD="$ac_prog"
1903 # If it fails, then pretend we aren't using GCC.
1907 # If it is relative, then search for the first ld in PATH.
1911 elif test "$with_gnu_ld" = yes; then
1912 AC_MSG_CHECKING([for GNU ld])
1914 AC_MSG_CHECKING([for non-GNU ld])
1916 AC_CACHE_VAL([acl_cv_path_LD],
1917 [if test -z "$LD"; then
1918 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1919 for ac_dir in $PATH; do
1921 test -z "$ac_dir" && ac_dir=.
1922 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1923 acl_cv_path_LD="$ac_dir/$ac_prog"
1924 # Check to see if the program is GNU ld. I'd rather use --version,
1925 # but apparently some variants of GNU ld only accept -v.
1926 # Break only if it was the GNU/non-GNU ld that we prefer.
1927 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
1928 *GNU* | *'with BFD'*)
1929 test "$with_gnu_ld" != no && break
1932 test "$with_gnu_ld" != yes && break
1939 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1941 LD="$acl_cv_path_LD"
1942 if test -n "$LD"; then
1943 AC_MSG_RESULT([$LD])
1947 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1951 # lib-link.m4 serial 26 (gettext-0.18.2)
1952 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
1953 dnl This file is free software; the Free Software Foundation
1954 dnl gives unlimited permission to copy and/or distribute it,
1955 dnl with or without modifications, as long as this notice is preserved.
1957 dnl From Bruno Haible.
1961 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1962 dnl the libraries corresponding to explicit and implicit dependencies.
1963 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1964 dnl augments the CPPFLAGS variable.
1965 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1966 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1967 AC_DEFUN([AC_LIB_LINKFLAGS],
1969 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1970 AC_REQUIRE([AC_LIB_RPATH])
1971 pushdef([Name],[m4_translit([$1],[./+-], [____])])
1972 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1973 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1974 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1975 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1976 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1977 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1978 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1979 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1981 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1982 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1983 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1984 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1985 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1987 AC_SUBST([LTLIB]NAME)
1988 AC_SUBST([LIB]NAME[_PREFIX])
1989 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1990 dnl results of this search when this library appears as a dependency.
1996 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1997 dnl searches for libname and the libraries corresponding to explicit and
1998 dnl implicit dependencies, together with the specified include files and
1999 dnl the ability to compile and link the specified testcode. The missing-message
2000 dnl defaults to 'no' and may contain additional hints for the user.
2001 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
2002 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
2003 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
2004 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
2005 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
2006 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
2007 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
2009 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2010 AC_REQUIRE([AC_LIB_RPATH])
2011 pushdef([Name],[m4_translit([$1],[./+-], [____])])
2012 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
2013 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
2015 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
2017 AC_LIB_LINKFLAGS_BODY([$1], [$2])
2019 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
2020 dnl because if the user has installed lib[]Name and not disabled its use
2021 dnl via --without-lib[]Name-prefix, he wants to use it.
2022 ac_save_CPPFLAGS="$CPPFLAGS"
2023 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
2025 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
2026 ac_save_LIBS="$LIBS"
2027 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
2028 dnl because these -l options might require -L options that are present in
2029 dnl LIBS. -l options benefit only from the -L options listed before it.
2030 dnl Otherwise, add it to the front of LIBS, because it may be a static
2031 dnl library that depends on another static library that is present in LIBS.
2032 dnl Static libraries benefit only from the static libraries listed after
2034 case " $LIB[]NAME" in
2035 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
2036 *) LIBS="$LIB[]NAME $LIBS" ;;
2039 [AC_LANG_PROGRAM([[$3]], [[$4]])],
2040 [ac_cv_lib[]Name=yes],
2041 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
2042 LIBS="$ac_save_LIBS"
2044 if test "$ac_cv_lib[]Name" = yes; then
2046 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
2047 AC_MSG_CHECKING([how to link with lib[]$1])
2048 AC_MSG_RESULT([$LIB[]NAME])
2051 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
2052 dnl $INC[]NAME either.
2053 CPPFLAGS="$ac_save_CPPFLAGS"
2058 AC_SUBST([HAVE_LIB]NAME)
2060 AC_SUBST([LTLIB]NAME)
2061 AC_SUBST([LIB]NAME[_PREFIX])
2066 dnl Determine the platform dependent parameters needed to use rpath:
2069 dnl acl_libname_spec,
2070 dnl acl_library_names_spec,
2071 dnl acl_hardcode_libdir_flag_spec,
2072 dnl acl_hardcode_libdir_separator,
2073 dnl acl_hardcode_direct,
2074 dnl acl_hardcode_minus_L.
2075 AC_DEFUN([AC_LIB_RPATH],
2077 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
2078 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
2079 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
2080 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
2081 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
2082 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
2083 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
2084 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
2085 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
2091 acl_libext="$acl_cv_libext"
2092 acl_shlibext="$acl_cv_shlibext"
2093 acl_libname_spec="$acl_cv_libname_spec"
2094 acl_library_names_spec="$acl_cv_library_names_spec"
2095 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
2096 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
2097 acl_hardcode_direct="$acl_cv_hardcode_direct"
2098 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
2099 dnl Determine whether the user wants rpath handling at all.
2100 AC_ARG_ENABLE([rpath],
2101 [ --disable-rpath do not hardcode runtime library paths],
2102 :, enable_rpath=yes)
2105 dnl AC_LIB_FROMPACKAGE(name, package)
2106 dnl declares that libname comes from the given package. The configure file
2107 dnl will then not have a --with-libname-prefix option but a
2108 dnl --with-package-prefix option. Several libraries can come from the same
2109 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
2110 dnl macro call that searches for libname.
2111 AC_DEFUN([AC_LIB_FROMPACKAGE],
2113 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
2114 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
2115 define([acl_frompackage_]NAME, [$2])
2117 pushdef([PACK],[$2])
2118 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
2119 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
2120 define([acl_libsinpackage_]PACKUP,
2121 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
2126 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
2127 dnl the libraries corresponding to explicit and implicit dependencies.
2128 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
2129 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
2130 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
2131 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
2133 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2134 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
2135 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
2136 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
2137 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
2138 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
2139 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
2140 dnl Autoconf >= 2.61 supports dots in --with options.
2141 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
2142 dnl By default, look in $includedir and $libdir.
2144 AC_LIB_WITH_FINAL_PREFIX([
2145 eval additional_includedir=\"$includedir\"
2146 eval additional_libdir=\"$libdir\"
2148 AC_ARG_WITH(P_A_C_K[-prefix],
2149 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
2150 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
2152 if test "X$withval" = "Xno"; then
2155 if test "X$withval" = "X"; then
2156 AC_LIB_WITH_FINAL_PREFIX([
2157 eval additional_includedir=\"$includedir\"
2158 eval additional_libdir=\"$libdir\"
2161 additional_includedir="$withval/include"
2162 additional_libdir="$withval/$acl_libdirstem"
2163 if test "$acl_libdirstem2" != "$acl_libdirstem" \
2164 && ! test -d "$withval/$acl_libdirstem"; then
2165 additional_libdir="$withval/$acl_libdirstem2"
2170 dnl Search the library and its dependencies in $additional_libdir and
2171 dnl $LDFLAGS. Using breadth-first-seach.
2176 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
2177 dnl computed. So it has to be reset here.
2181 names_already_handled=
2182 names_next_round='$1 $2'
2183 while test -n "$names_next_round"; do
2184 names_this_round="$names_next_round"
2186 for name in $names_this_round; do
2188 for n in $names_already_handled; do
2189 if test "$n" = "$name"; then
2194 if test -z "$already_handled"; then
2195 names_already_handled="$names_already_handled $name"
2196 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
2197 dnl or AC_LIB_HAVE_LINKFLAGS call.
2198 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
2199 eval value=\"\$HAVE_LIB$uppername\"
2200 if test -n "$value"; then
2201 if test "$value" = yes; then
2202 eval value=\"\$LIB$uppername\"
2203 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
2204 eval value=\"\$LTLIB$uppername\"
2205 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
2207 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
2208 dnl that this library doesn't exist. So just drop it.
2212 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
2213 dnl and the already constructed $LIBNAME/$LTLIBNAME.
2218 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
2219 if test -n "$acl_shlibext"; then
2220 shrext=".$acl_shlibext" # typically: shrext=.so
2224 if test $use_additional = yes; then
2225 dir="$additional_libdir"
2226 dnl The same code as in the loop below:
2227 dnl First look for a shared library.
2228 if test -n "$acl_shlibext"; then
2229 if test -f "$dir/$libname$shrext"; then
2231 found_so="$dir/$libname$shrext"
2233 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
2234 ver=`(cd "$dir" && \
2235 for f in "$libname$shrext".*; do echo "$f"; done \
2236 | sed -e "s,^$libname$shrext\\\\.,," \
2237 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
2238 | sed 1q ) 2>/dev/null`
2239 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
2241 found_so="$dir/$libname$shrext.$ver"
2244 eval library_names=\"$acl_library_names_spec\"
2245 for f in $library_names; do
2246 if test -f "$dir/$f"; then
2255 dnl Then look for a static library.
2256 if test "X$found_dir" = "X"; then
2257 if test -f "$dir/$libname.$acl_libext"; then
2259 found_a="$dir/$libname.$acl_libext"
2262 if test "X$found_dir" != "X"; then
2263 if test -f "$dir/$libname.la"; then
2264 found_la="$dir/$libname.la"
2268 if test "X$found_dir" = "X"; then
2269 for x in $LDFLAGS $LTLIB[]NAME; do
2270 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2273 dir=`echo "X$x" | sed -e 's/^X-L//'`
2274 dnl First look for a shared library.
2275 if test -n "$acl_shlibext"; then
2276 if test -f "$dir/$libname$shrext"; then
2278 found_so="$dir/$libname$shrext"
2280 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
2281 ver=`(cd "$dir" && \
2282 for f in "$libname$shrext".*; do echo "$f"; done \
2283 | sed -e "s,^$libname$shrext\\\\.,," \
2284 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
2285 | sed 1q ) 2>/dev/null`
2286 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
2288 found_so="$dir/$libname$shrext.$ver"
2291 eval library_names=\"$acl_library_names_spec\"
2292 for f in $library_names; do
2293 if test -f "$dir/$f"; then
2302 dnl Then look for a static library.
2303 if test "X$found_dir" = "X"; then
2304 if test -f "$dir/$libname.$acl_libext"; then
2306 found_a="$dir/$libname.$acl_libext"
2309 if test "X$found_dir" != "X"; then
2310 if test -f "$dir/$libname.la"; then
2311 found_la="$dir/$libname.la"
2316 if test "X$found_dir" != "X"; then
2321 if test "X$found_dir" != "X"; then
2322 dnl Found the library.
2323 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
2324 if test "X$found_so" != "X"; then
2325 dnl Linking with a shared library. We attempt to hardcode its
2326 dnl directory into the executable's runpath, unless it's the
2327 dnl standard /usr/lib.
2328 if test "$enable_rpath" = no \
2329 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
2330 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
2331 dnl No hardcoding is needed.
2332 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2334 dnl Use an explicit option to hardcode DIR into the resulting
2336 dnl Potentially add DIR to ltrpathdirs.
2337 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2339 for x in $ltrpathdirs; do
2340 if test "X$x" = "X$found_dir"; then
2345 if test -z "$haveit"; then
2346 ltrpathdirs="$ltrpathdirs $found_dir"
2348 dnl The hardcoding into $LIBNAME is system dependent.
2349 if test "$acl_hardcode_direct" = yes; then
2350 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2351 dnl resulting binary.
2352 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2354 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
2355 dnl Use an explicit option to hardcode DIR into the resulting
2357 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2358 dnl Potentially add DIR to rpathdirs.
2359 dnl The rpathdirs will be appended to $LIBNAME at the end.
2361 for x in $rpathdirs; do
2362 if test "X$x" = "X$found_dir"; then
2367 if test -z "$haveit"; then
2368 rpathdirs="$rpathdirs $found_dir"
2371 dnl Rely on "-L$found_dir".
2372 dnl But don't add it if it's already contained in the LDFLAGS
2373 dnl or the already constructed $LIBNAME
2375 for x in $LDFLAGS $LIB[]NAME; do
2376 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2377 if test "X$x" = "X-L$found_dir"; then
2382 if test -z "$haveit"; then
2383 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2385 if test "$acl_hardcode_minus_L" != no; then
2386 dnl FIXME: Not sure whether we should use
2387 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2389 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2391 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
2392 dnl here, because this doesn't fit in flags passed to the
2393 dnl compiler. So give up. No hardcoding. This affects only
2394 dnl very old systems.
2395 dnl FIXME: Not sure whether we should use
2396 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2398 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2404 if test "X$found_a" != "X"; then
2405 dnl Linking with a static library.
2406 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2408 dnl We shouldn't come here, but anyway it's good to have a
2410 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2413 dnl Assume the include files are nearby.
2414 additional_includedir=
2415 case "$found_dir" in
2416 */$acl_libdirstem | */$acl_libdirstem/)
2417 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
2418 if test "$name" = '$1'; then
2419 LIB[]NAME[]_PREFIX="$basedir"
2421 additional_includedir="$basedir/include"
2423 */$acl_libdirstem2 | */$acl_libdirstem2/)
2424 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
2425 if test "$name" = '$1'; then
2426 LIB[]NAME[]_PREFIX="$basedir"
2428 additional_includedir="$basedir/include"
2431 if test "X$additional_includedir" != "X"; then
2432 dnl Potentially add $additional_includedir to $INCNAME.
2433 dnl But don't add it
2434 dnl 1. if it's the standard /usr/include,
2435 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
2436 dnl 3. if it's already present in $CPPFLAGS or the already
2437 dnl constructed $INCNAME,
2438 dnl 4. if it doesn't exist as a directory.
2439 if test "X$additional_includedir" != "X/usr/include"; then
2441 if test "X$additional_includedir" = "X/usr/local/include"; then
2442 if test -n "$GCC"; then
2444 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2448 if test -z "$haveit"; then
2449 for x in $CPPFLAGS $INC[]NAME; do
2450 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2451 if test "X$x" = "X-I$additional_includedir"; then
2456 if test -z "$haveit"; then
2457 if test -d "$additional_includedir"; then
2458 dnl Really add $additional_includedir to $INCNAME.
2459 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2465 dnl Look for dependencies.
2466 if test -n "$found_la"; then
2467 dnl Read the .la file. It defines the variables
2468 dnl dlname, library_names, old_library, dependency_libs, current,
2469 dnl age, revision, installed, dlopen, dlpreopen, libdir.
2470 save_libdir="$libdir"
2472 */* | *\\*) . "$found_la" ;;
2473 *) . "./$found_la" ;;
2475 libdir="$save_libdir"
2476 dnl We use only dependency_libs.
2477 for dep in $dependency_libs; do
2480 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2481 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2482 dnl But don't add it
2483 dnl 1. if it's the standard /usr/lib,
2484 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
2485 dnl 3. if it's already present in $LDFLAGS or the already
2486 dnl constructed $LIBNAME,
2487 dnl 4. if it doesn't exist as a directory.
2488 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
2489 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
2491 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
2492 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
2493 if test -n "$GCC"; then
2495 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2499 if test -z "$haveit"; then
2501 for x in $LDFLAGS $LIB[]NAME; do
2502 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2503 if test "X$x" = "X-L$additional_libdir"; then
2508 if test -z "$haveit"; then
2509 if test -d "$additional_libdir"; then
2510 dnl Really add $additional_libdir to $LIBNAME.
2511 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2515 for x in $LDFLAGS $LTLIB[]NAME; do
2516 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2517 if test "X$x" = "X-L$additional_libdir"; then
2522 if test -z "$haveit"; then
2523 if test -d "$additional_libdir"; then
2524 dnl Really add $additional_libdir to $LTLIBNAME.
2525 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2532 dir=`echo "X$dep" | sed -e 's/^X-R//'`
2533 if test "$enable_rpath" != no; then
2534 dnl Potentially add DIR to rpathdirs.
2535 dnl The rpathdirs will be appended to $LIBNAME at the end.
2537 for x in $rpathdirs; do
2538 if test "X$x" = "X$dir"; then
2543 if test -z "$haveit"; then
2544 rpathdirs="$rpathdirs $dir"
2546 dnl Potentially add DIR to ltrpathdirs.
2547 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2549 for x in $ltrpathdirs; do
2550 if test "X$x" = "X$dir"; then
2555 if test -z "$haveit"; then
2556 ltrpathdirs="$ltrpathdirs $dir"
2561 dnl Handle this in the next round.
2562 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2565 dnl Handle this in the next round. Throw away the .la's
2566 dnl directory; it is already contained in a preceding -L
2568 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2571 dnl Most likely an immediate library name.
2572 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2573 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2579 dnl Didn't find the library; assume it is in the system directories
2580 dnl known to the linker and runtime loader. (All the system
2581 dnl directories known to the linker should also be known to the
2582 dnl runtime loader, otherwise the system is severely misconfigured.)
2583 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2584 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2590 if test "X$rpathdirs" != "X"; then
2591 if test -n "$acl_hardcode_libdir_separator"; then
2592 dnl Weird platform: only the last -rpath option counts, the user must
2593 dnl pass all path elements in one option. We can arrange that for a
2594 dnl single library, but not when more than one $LIBNAMEs are used.
2596 for found_dir in $rpathdirs; do
2597 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
2599 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
2600 acl_save_libdir="$libdir"
2602 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2603 libdir="$acl_save_libdir"
2604 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2606 dnl The -rpath options are cumulative.
2607 for found_dir in $rpathdirs; do
2608 acl_save_libdir="$libdir"
2610 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2611 libdir="$acl_save_libdir"
2612 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2616 if test "X$ltrpathdirs" != "X"; then
2617 dnl When using libtool, the option that works for both libraries and
2618 dnl executables is -R. The -R options are cumulative.
2619 for found_dir in $ltrpathdirs; do
2620 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2630 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2631 dnl unless already present in VAR.
2632 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2633 dnl contains two or three consecutive elements that belong together.
2634 AC_DEFUN([AC_LIB_APPENDTOVAR],
2636 for element in [$2]; do
2639 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2640 if test "X$x" = "X$element"; then
2645 if test -z "$haveit"; then
2646 [$1]="${[$1]}${[$1]:+ }$element"
2651 dnl For those cases where a variable contains several -L and -l options
2652 dnl referring to unknown libraries and directories, this macro determines the
2653 dnl necessary additional linker options for the runtime path.
2654 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
2655 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
2656 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
2657 dnl otherwise linking without libtool is assumed.
2658 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
2660 AC_REQUIRE([AC_LIB_RPATH])
2661 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2663 if test "$enable_rpath" != no; then
2664 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
2665 dnl Use an explicit option to hardcode directories into the resulting
2670 if test -n "$next"; then
2672 dnl No need to hardcode the standard /usr/lib.
2673 if test "X$dir" != "X/usr/$acl_libdirstem" \
2674 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
2675 rpathdirs="$rpathdirs $dir"
2681 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
2682 dnl No need to hardcode the standard /usr/lib.
2683 if test "X$dir" != "X/usr/$acl_libdirstem" \
2684 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
2685 rpathdirs="$rpathdirs $dir"
2692 if test "X$rpathdirs" != "X"; then
2693 if test -n ""$3""; then
2694 dnl libtool is used for linking. Use -R options.
2695 for dir in $rpathdirs; do
2696 $1="${$1}${$1:+ }-R$dir"
2699 dnl The linker is used for linking directly.
2700 if test -n "$acl_hardcode_libdir_separator"; then
2701 dnl Weird platform: only the last -rpath option counts, the user
2702 dnl must pass all path elements in one option.
2704 for dir in $rpathdirs; do
2705 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
2707 acl_save_libdir="$libdir"
2709 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2710 libdir="$acl_save_libdir"
2713 dnl The -rpath options are cumulative.
2714 for dir in $rpathdirs; do
2715 acl_save_libdir="$libdir"
2717 eval flag=\"$acl_hardcode_libdir_flag_spec\"
2718 libdir="$acl_save_libdir"
2719 $1="${$1}${$1:+ }$flag"
2729 # lib-prefix.m4 serial 7 (gettext-0.18)
2730 dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
2731 dnl This file is free software; the Free Software Foundation
2732 dnl gives unlimited permission to copy and/or distribute it,
2733 dnl with or without modifications, as long as this notice is preserved.
2735 dnl From Bruno Haible.
2737 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
2738 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
2739 dnl require excessive bracketing.
2740 ifdef([AC_HELP_STRING],
2741 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
2742 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
2744 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
2745 dnl to access previously installed libraries. The basic assumption is that
2746 dnl a user will want packages to use other packages he previously installed
2747 dnl with the same --prefix option.
2748 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
2749 dnl libraries, but is otherwise very convenient.
2750 AC_DEFUN([AC_LIB_PREFIX],
2752 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
2753 AC_REQUIRE([AC_PROG_CC])
2754 AC_REQUIRE([AC_CANONICAL_HOST])
2755 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2756 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2757 dnl By default, look in $includedir and $libdir.
2759 AC_LIB_WITH_FINAL_PREFIX([
2760 eval additional_includedir=\"$includedir\"
2761 eval additional_libdir=\"$libdir\"
2763 AC_LIB_ARG_WITH([lib-prefix],
2764 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
2765 --without-lib-prefix don't search for libraries in includedir and libdir],
2767 if test "X$withval" = "Xno"; then
2770 if test "X$withval" = "X"; then
2771 AC_LIB_WITH_FINAL_PREFIX([
2772 eval additional_includedir=\"$includedir\"
2773 eval additional_libdir=\"$libdir\"
2776 additional_includedir="$withval/include"
2777 additional_libdir="$withval/$acl_libdirstem"
2781 if test $use_additional = yes; then
2782 dnl Potentially add $additional_includedir to $CPPFLAGS.
2783 dnl But don't add it
2784 dnl 1. if it's the standard /usr/include,
2785 dnl 2. if it's already present in $CPPFLAGS,
2786 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
2787 dnl 4. if it doesn't exist as a directory.
2788 if test "X$additional_includedir" != "X/usr/include"; then
2790 for x in $CPPFLAGS; do
2791 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2792 if test "X$x" = "X-I$additional_includedir"; then
2797 if test -z "$haveit"; then
2798 if test "X$additional_includedir" = "X/usr/local/include"; then
2799 if test -n "$GCC"; then
2801 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2805 if test -z "$haveit"; then
2806 if test -d "$additional_includedir"; then
2807 dnl Really add $additional_includedir to $CPPFLAGS.
2808 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2813 dnl Potentially add $additional_libdir to $LDFLAGS.
2814 dnl But don't add it
2815 dnl 1. if it's the standard /usr/lib,
2816 dnl 2. if it's already present in $LDFLAGS,
2817 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2818 dnl 4. if it doesn't exist as a directory.
2819 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
2821 for x in $LDFLAGS; do
2822 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2823 if test "X$x" = "X-L$additional_libdir"; then
2828 if test -z "$haveit"; then
2829 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
2830 if test -n "$GCC"; then
2832 linux*) haveit=yes;;
2836 if test -z "$haveit"; then
2837 if test -d "$additional_libdir"; then
2838 dnl Really add $additional_libdir to $LDFLAGS.
2839 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2847 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2848 dnl acl_final_exec_prefix, containing the values to which $prefix and
2849 dnl $exec_prefix will expand at the end of the configure script.
2850 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2852 dnl Unfortunately, prefix and exec_prefix get only finally determined
2853 dnl at the end of configure.
2854 if test "X$prefix" = "XNONE"; then
2855 acl_final_prefix="$ac_default_prefix"
2857 acl_final_prefix="$prefix"
2859 if test "X$exec_prefix" = "XNONE"; then
2860 acl_final_exec_prefix='${prefix}'
2862 acl_final_exec_prefix="$exec_prefix"
2864 acl_save_prefix="$prefix"
2865 prefix="$acl_final_prefix"
2866 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2867 prefix="$acl_save_prefix"
2870 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2871 dnl variables prefix and exec_prefix bound to the values they will have
2872 dnl at the end of the configure script.
2873 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2875 acl_save_prefix="$prefix"
2876 prefix="$acl_final_prefix"
2877 acl_save_exec_prefix="$exec_prefix"
2878 exec_prefix="$acl_final_exec_prefix"
2880 exec_prefix="$acl_save_exec_prefix"
2881 prefix="$acl_save_prefix"
2884 dnl AC_LIB_PREPARE_MULTILIB creates
2885 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
2886 dnl "lib" or "lib64" or "lib/64",
2887 dnl - a variable acl_libdirstem2, as a secondary possible value for
2888 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
2890 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
2892 dnl There is no formal standard regarding lib and lib64.
2893 dnl On glibc systems, the current practice is that on a system supporting
2894 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2895 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
2896 dnl the compiler's default mode by looking at the compiler's library search
2897 dnl path. If at least one of its elements ends in /lib64 or points to a
2898 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
2899 dnl Otherwise we use the default, namely "lib".
2900 dnl On Solaris systems, the current practice is that on a system supporting
2901 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2902 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
2903 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
2904 AC_REQUIRE([AC_CANONICAL_HOST])
2909 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
2910 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
2911 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
2912 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
2913 dnl symlink is missing, so we set acl_libdirstem2 too.
2914 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
2915 [AC_EGREP_CPP([sixtyfour bits], [
2919 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
2921 if test $gl_cv_solaris_64bit = yes; then
2922 acl_libdirstem=lib/64
2924 sparc*) acl_libdirstem2=lib/sparcv9 ;;
2925 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
2930 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
2931 if test -n "$searchpath"; then
2932 acl_save_IFS="${IFS= }"; IFS=":"
2933 for searchdir in $searchpath; do
2934 if test -d "$searchdir"; then
2935 case "$searchdir" in
2936 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
2938 # Better ignore directories of this form. They are misleading.
2940 *) searchdir=`cd "$searchdir" && pwd`
2941 case "$searchdir" in
2942 */lib64 ) acl_libdirstem=lib64 ;;
2951 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
2954 # nls.m4 serial 5 (gettext-0.18)
2955 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
2956 dnl 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.
2961 dnl This file can be used in projects which are not available under
2962 dnl the GNU General Public License or the GNU Library General Public
2963 dnl License but which still want to provide support for the GNU gettext
2965 dnl Please note that the actual code of the GNU gettext library is covered
2966 dnl by the GNU Library General Public License, and the rest of the GNU
2967 dnl gettext package is covered by the GNU General Public License.
2968 dnl They are *not* in the public domain.
2971 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2972 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2978 AC_MSG_CHECKING([whether NLS is requested])
2979 dnl Default is enabled NLS
2980 AC_ARG_ENABLE([nls],
2981 [ --disable-nls do not use Native Language Support],
2982 USE_NLS=$enableval, USE_NLS=yes)
2983 AC_MSG_RESULT([$USE_NLS])
2987 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2988 # serial 11 (pkg-config-0.29.1)
2990 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2991 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
2993 dnl This program is free software; you can redistribute it and/or modify
2994 dnl it under the terms of the GNU General Public License as published by
2995 dnl the Free Software Foundation; either version 2 of the License, or
2996 dnl (at your option) any later version.
2998 dnl This program is distributed in the hope that it will be useful, but
2999 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
3000 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3001 dnl General Public License for more details.
3003 dnl You should have received a copy of the GNU General Public License
3004 dnl along with this program; if not, write to the Free Software
3005 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3006 dnl 02111-1307, USA.
3008 dnl As a special exception to the GNU General Public License, if you
3009 dnl distribute this file as part of a program that contains a
3010 dnl configuration script generated by Autoconf, you may include it under
3011 dnl the same distribution terms that you use for the rest of that
3014 dnl PKG_PREREQ(MIN-VERSION)
3015 dnl -----------------------
3018 dnl Verify that the version of the pkg-config macros are at least
3019 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
3020 dnl installed version of pkg-config, this checks the developer's version
3021 dnl of pkg.m4 when generating configure.
3023 dnl To ensure that this macro is defined, also add:
3024 dnl m4_ifndef([PKG_PREREQ],
3025 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
3027 dnl See the "Since" comment for each macro you use to see what version
3028 dnl of the macros you require.
3029 m4_defun([PKG_PREREQ],
3030 [m4_define([PKG_MACROS_VERSION], [0.29.1])
3031 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
3032 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
3035 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
3036 dnl ----------------------------------
3039 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
3040 dnl first found in the path. Checks that the version of pkg-config found
3041 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
3042 dnl used since that's the first version where most current features of
3043 dnl pkg-config existed.
3044 AC_DEFUN([PKG_PROG_PKG_CONFIG],
3045 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
3046 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
3047 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
3048 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
3049 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
3050 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
3052 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
3053 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
3055 if test -n "$PKG_CONFIG"; then
3056 _pkg_min_version=m4_default([$1], [0.9.0])
3057 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
3058 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
3059 AC_MSG_RESULT([yes])
3065 ])dnl PKG_PROG_PKG_CONFIG
3067 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3068 dnl -------------------------------------------------------------------
3071 dnl Check to see whether a particular set of modules exists. Similar to
3072 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
3074 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3075 dnl only at the first occurence in configure.ac, so if the first place
3076 dnl it's called might be skipped (such as if it is within an "if", you
3077 dnl have to call PKG_CHECK_EXISTS manually
3078 AC_DEFUN([PKG_CHECK_EXISTS],
3079 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
3080 if test -n "$PKG_CONFIG" && \
3081 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
3082 m4_default([$2], [:])
3083 m4_ifvaln([$3], [else
3087 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3088 dnl ---------------------------------------------
3089 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
3090 dnl pkg_failed based on the result.
3091 m4_define([_PKG_CONFIG],
3092 [if test -n "$$1"; then
3094 elif test -n "$PKG_CONFIG"; then
3095 PKG_CHECK_EXISTS([$3],
3096 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
3097 test "x$?" != "x0" && pkg_failed=yes ],
3104 dnl _PKG_SHORT_ERRORS_SUPPORTED
3105 dnl ---------------------------
3106 dnl Internal check to see if pkg-config supports short errors.
3107 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
3108 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3109 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
3110 _pkg_short_errors_supported=yes
3112 _pkg_short_errors_supported=no
3114 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
3117 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3118 dnl [ACTION-IF-NOT-FOUND])
3119 dnl --------------------------------------------------------------
3122 dnl Note that if there is a possibility the first call to
3123 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
3124 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3125 AC_DEFUN([PKG_CHECK_MODULES],
3126 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
3127 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
3128 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
3131 AC_MSG_CHECKING([for $1])
3133 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
3134 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
3136 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
3137 and $1[]_LIBS to avoid the need to call pkg-config.
3138 See the pkg-config man page for more details.])
3140 if test $pkg_failed = yes; then
3142 _PKG_SHORT_ERRORS_SUPPORTED
3143 if test $_pkg_short_errors_supported = yes; then
3144 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
3146 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
3148 # Put the nasty error message in config.log where it belongs
3149 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
3151 m4_default([$4], [AC_MSG_ERROR(
3152 [Package requirements ($2) were not met:
3156 Consider adjusting the PKG_CONFIG_PATH environment variable if you
3157 installed software in a non-standard prefix.
3161 elif test $pkg_failed = untried; then
3163 m4_default([$4], [AC_MSG_FAILURE(
3164 [The pkg-config script could not be found or is too old. Make sure it
3165 is in your PATH or set the PKG_CONFIG environment variable to the full
3170 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
3173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
3174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
3175 AC_MSG_RESULT([yes])
3178 ])dnl PKG_CHECK_MODULES
3181 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3182 dnl [ACTION-IF-NOT-FOUND])
3183 dnl ---------------------------------------------------------------------
3186 dnl Checks for existence of MODULES and gathers its build flags with
3187 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
3188 dnl and VARIABLE-PREFIX_LIBS from --libs.
3190 dnl Note that if there is a possibility the first call to
3191 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
3192 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
3194 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
3195 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
3196 _save_PKG_CONFIG=$PKG_CONFIG
3197 PKG_CONFIG="$PKG_CONFIG --static"
3198 PKG_CHECK_MODULES($@)
3199 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
3200 ])dnl PKG_CHECK_MODULES_STATIC
3203 dnl PKG_INSTALLDIR([DIRECTORY])
3204 dnl -------------------------
3207 dnl Substitutes the variable pkgconfigdir as the location where a module
3208 dnl should install pkg-config .pc files. By default the directory is
3209 dnl $libdir/pkgconfig, but the default can be changed by passing
3210 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
3212 AC_DEFUN([PKG_INSTALLDIR],
3213 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
3214 m4_pushdef([pkg_description],
3215 [pkg-config installation directory @<:@]pkg_default[@:>@])
3216 AC_ARG_WITH([pkgconfigdir],
3217 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
3218 [with_pkgconfigdir=]pkg_default)
3219 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
3220 m4_popdef([pkg_default])
3221 m4_popdef([pkg_description])
3222 ])dnl PKG_INSTALLDIR
3225 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
3226 dnl --------------------------------
3229 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
3230 dnl module should install arch-independent pkg-config .pc files. By
3231 dnl default the directory is $datadir/pkgconfig, but the default can be
3232 dnl changed by passing DIRECTORY. The user can override through the
3233 dnl --with-noarch-pkgconfigdir parameter.
3234 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
3235 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
3236 m4_pushdef([pkg_description],
3237 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
3238 AC_ARG_WITH([noarch-pkgconfigdir],
3239 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
3240 [with_noarch_pkgconfigdir=]pkg_default)
3241 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
3242 m4_popdef([pkg_default])
3243 m4_popdef([pkg_description])
3244 ])dnl PKG_NOARCH_INSTALLDIR
3247 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
3248 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3249 dnl -------------------------------------------
3252 dnl Retrieves the value of the pkg-config variable for the given module.
3253 AC_DEFUN([PKG_CHECK_VAR],
3254 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
3255 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
3257 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
3258 AS_VAR_COPY([$1], [pkg_cv_][$1])
3260 AS_VAR_IF([$1], [""], [$5], [$4])dnl
3263 dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
3264 dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
3265 dnl [DESCRIPTION], [DEFAULT])
3266 dnl ------------------------------------------
3268 dnl Prepare a "--with-" configure option using the lowercase
3269 dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
3270 dnl PKG_CHECK_MODULES in a single macro.
3271 AC_DEFUN([PKG_WITH_MODULES],
3273 m4_pushdef([with_arg], m4_tolower([$1]))
3275 m4_pushdef([description],
3276 [m4_default([$5], [build with ]with_arg[ support])])
3278 m4_pushdef([def_arg], [m4_default([$6], [auto])])
3279 m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
3280 m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
3283 [yes],[m4_pushdef([with_without], [--without-]with_arg)],
3284 [m4_pushdef([with_without],[--with-]with_arg)])
3286 AC_ARG_WITH(with_arg,
3287 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
3288 [AS_TR_SH([with_]with_arg)=def_arg])
3290 AS_CASE([$AS_TR_SH([with_]with_arg)],
3291 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
3292 [auto],[PKG_CHECK_MODULES([$1],[$2],
3293 [m4_n([def_action_if_found]) $3],
3294 [m4_n([def_action_if_not_found]) $4])])
3296 m4_popdef([with_arg])
3297 m4_popdef([description])
3298 m4_popdef([def_arg])
3300 ])dnl PKG_WITH_MODULES
3302 dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
3303 dnl [DESCRIPTION], [DEFAULT])
3304 dnl -----------------------------------------------
3306 dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
3307 dnl check._[VARIABLE-PREFIX] is exported as make variable.
3308 AC_DEFUN([PKG_HAVE_WITH_MODULES],
3310 PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
3312 AM_CONDITIONAL([HAVE_][$1],
3313 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
3314 ])dnl PKG_HAVE_WITH_MODULES
3316 dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
3317 dnl [DESCRIPTION], [DEFAULT])
3318 dnl ------------------------------------------------------
3320 dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
3321 dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
3322 dnl and preprocessor variable.
3323 AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
3325 PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
3327 AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
3328 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
3329 ])dnl PKG_HAVE_DEFINE_WITH_MODULES
3331 # po.m4 serial 24 (gettext-0.19)
3332 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
3333 dnl This file is free software; the Free Software Foundation
3334 dnl gives unlimited permission to copy and/or distribute it,
3335 dnl with or without modifications, as long as this notice is preserved.
3337 dnl This file can be used in projects which are not available under
3338 dnl the GNU General Public License or the GNU Library General Public
3339 dnl License but which still want to provide support for the GNU gettext
3341 dnl Please note that the actual code of the GNU gettext library is covered
3342 dnl by the GNU Library General Public License, and the rest of the GNU
3343 dnl gettext package is covered by the GNU General Public License.
3344 dnl They are *not* in the public domain.
3347 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
3348 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
3352 dnl Checks for all prerequisites of the po subdirectory.
3353 AC_DEFUN([AM_PO_SUBDIRS],
3355 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3356 AC_REQUIRE([AC_PROG_INSTALL])dnl
3357 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3358 AC_REQUIRE([AC_PROG_SED])dnl
3359 AC_REQUIRE([AM_NLS])dnl
3361 dnl Release version of the gettext macros. This is used to ensure that
3362 dnl the gettext macros and po/Makefile.in.in are in sync.
3363 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
3365 dnl Perform the following tests also if --disable-nls has been given,
3366 dnl because they are needed for "make dist" to work.
3368 dnl Search for GNU msgfmt in the PATH.
3369 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
3370 dnl The second test excludes FreeBSD msgfmt.
3371 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
3372 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
3373 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
3375 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
3377 dnl Test whether it is GNU msgfmt >= 0.15.
3379 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
3380 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
3381 *) MSGFMT_015=$MSGFMT ;;
3384 AC_SUBST([MSGFMT_015])
3386 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
3387 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
3388 *) GMSGFMT_015=$GMSGFMT ;;
3391 AC_SUBST([GMSGFMT_015])
3393 dnl Search for GNU xgettext 0.12 or newer in the PATH.
3394 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
3395 dnl The second test excludes FreeBSD xgettext.
3396 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
3397 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
3398 (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)],
3400 dnl Remove leftover from FreeBSD xgettext call.
3403 dnl Test whether it is GNU xgettext >= 0.15.
3405 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
3406 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
3407 *) XGETTEXT_015=$XGETTEXT ;;
3410 AC_SUBST([XGETTEXT_015])
3412 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
3413 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
3414 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
3416 dnl Installation directories.
3417 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
3418 dnl have to define it here, so that it can be used in po/Makefile.
3419 test -n "$localedir" || localedir='${datadir}/locale'
3420 AC_SUBST([localedir])
3422 dnl Support for AM_XGETTEXT_OPTION.
3423 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
3424 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
3426 AC_CONFIG_COMMANDS([po-directories], [[
3427 for ac_file in $CONFIG_FILES; do
3428 # Support "outfile[:infile[:infile...]]"
3430 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3432 # PO directories have a Makefile.in generated from Makefile.in.in.
3433 case "$ac_file" in */Makefile.in)
3434 # Adjust a relative srcdir.
3435 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
3436 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
3437 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
3438 # In autoconf-2.13 it is called $ac_given_srcdir.
3439 # In autoconf-2.50 it is called $srcdir.
3440 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
3441 case "$ac_given_srcdir" in
3442 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
3443 /*) top_srcdir="$ac_given_srcdir" ;;
3444 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
3446 # Treat a directory as a PO directory if and only if it has a
3447 # POTFILES.in file. This allows packages to have multiple PO
3448 # directories under different names or in different locations.
3449 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
3450 rm -f "$ac_dir/POTFILES"
3451 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
3452 gt_tab=`printf '\t'`
3453 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"
3454 POMAKEFILEDEPS="POTFILES.in"
3455 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
3456 # on $ac_dir but don't depend on user-specified configuration
3458 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
3459 # The LINGUAS file contains the set of available languages.
3460 if test -n "$OBSOLETE_ALL_LINGUAS"; then
3461 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
3463 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
3464 # Hide the ALL_LINGUAS assignment from automake < 1.5.
3465 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
3466 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
3468 # The set of available languages was given in configure.in.
3469 # Hide the ALL_LINGUAS assignment from automake < 1.5.
3470 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
3473 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
3474 # Compute UPDATEPOFILES
3475 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
3476 # Compute DUMMYPOFILES
3477 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
3479 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
3480 case "$ac_given_srcdir" in
3482 *) srcdirpre='$(srcdir)/' ;;
3488 for lang in $ALL_LINGUAS; do
3489 POFILES="$POFILES $srcdirpre$lang.po"
3490 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
3491 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
3492 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
3494 # CATALOGS depends on both $ac_dir and the user's LINGUAS
3495 # environment variable.
3497 if test -n "$ALL_LINGUAS"; then
3498 for presentlang in $ALL_LINGUAS; do
3500 if test "%UNSET%" != "$LINGUAS"; then
3501 desiredlanguages="$LINGUAS"
3503 desiredlanguages="$ALL_LINGUAS"
3505 for desiredlang in $desiredlanguages; do
3506 # Use the presentlang catalog if desiredlang is
3507 # a. equal to presentlang, or
3508 # b. a variant of presentlang (because in this case,
3509 # presentlang can be used as a fallback for messages
3510 # which are not translated in the desiredlang catalog).
3511 case "$desiredlang" in
3512 "$presentlang"*) useit=yes;;
3515 if test $useit = yes; then
3516 INST_LINGUAS="$INST_LINGUAS $presentlang"
3521 if test -n "$INST_LINGUAS"; then
3522 for lang in $INST_LINGUAS; do
3523 CATALOGS="$CATALOGS $lang.gmo"
3526 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
3527 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"
3528 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
3529 if test -f "$f"; then
3531 *.orig | *.bak | *~) ;;
3532 *) cat "$f" >> "$ac_dir/Makefile" ;;
3540 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
3541 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
3542 # from automake < 1.5.
3543 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
3544 # Capture the value of LINGUAS because we need it to compute CATALOGS.
3545 LINGUAS="${LINGUAS-%UNSET%}"
3549 dnl Postprocesses a Makefile in a directory containing PO files.
3550 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
3552 # When this code is run, in config.status, two variables have already been
3554 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
3555 # - LINGUAS is the value of the environment variable LINGUAS at configure
3559 # Adjust a relative srcdir.
3560 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
3561 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
3562 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
3563 # In autoconf-2.13 it is called $ac_given_srcdir.
3564 # In autoconf-2.50 it is called $srcdir.
3565 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
3566 case "$ac_given_srcdir" in
3567 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
3568 /*) top_srcdir="$ac_given_srcdir" ;;
3569 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
3572 # Find a way to echo strings without interpreting backslash.
3573 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
3576 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
3577 gt_echo='printf %s\n'
3588 # A sed script that extracts the value of VARIABLE from a Makefile.
3591 # Test if the hold space is empty.
3596 # Yes it was empty. Look if we have the expected variable definition.
3597 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
3598 # Seen the first line of the variable definition.
3599 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
3604 # Here we are processing a line from the variable definition.
3605 # Remove comment, more precisely replace it with a space.
3607 # See if the line ends in a backslash.
3611 # Print the line, without the trailing backslash.
3614 # There was no trailing backslash. The end of the variable definition is
3615 # reached. Clear the hold space.
3620 # A trailing backslash means that the variable definition continues in the
3621 # next line. Put a nonempty string into the hold space to indicate this.
3628 # Set POTFILES to the value of the Makefile variable POTFILES.
3629 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
3630 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
3631 # Compute POTFILES_DEPS as
3632 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
3634 for file in $POTFILES; do
3635 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
3639 if test -n "$OBSOLETE_ALL_LINGUAS"; then
3640 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
3642 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
3643 # The LINGUAS file contains the set of available languages.
3644 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
3645 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
3647 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
3648 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
3649 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
3651 # Hide the ALL_LINGUAS assignment from automake < 1.5.
3652 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
3654 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
3655 # Compute UPDATEPOFILES
3656 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
3657 # Compute DUMMYPOFILES
3658 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
3660 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
3661 # Compute PROPERTIESFILES
3662 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
3663 # Compute CLASSFILES
3664 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
3666 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
3668 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
3669 # Compute RESOURCESDLLFILES
3670 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
3671 case "$ac_given_srcdir" in
3673 *) srcdirpre='$(srcdir)/' ;;
3684 for lang in $ALL_LINGUAS; do
3685 POFILES="$POFILES $srcdirpre$lang.po"
3686 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
3687 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
3688 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
3689 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
3690 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
3691 QMFILES="$QMFILES $srcdirpre$lang.qm"
3692 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3693 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
3694 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/'`
3695 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
3697 # CATALOGS depends on both $ac_dir and the user's LINGUAS
3698 # environment variable.
3700 if test -n "$ALL_LINGUAS"; then
3701 for presentlang in $ALL_LINGUAS; do
3703 if test "%UNSET%" != "$LINGUAS"; then
3704 desiredlanguages="$LINGUAS"
3706 desiredlanguages="$ALL_LINGUAS"
3708 for desiredlang in $desiredlanguages; do
3709 # Use the presentlang catalog if desiredlang is
3710 # a. equal to presentlang, or
3711 # b. a variant of presentlang (because in this case,
3712 # presentlang can be used as a fallback for messages
3713 # which are not translated in the desiredlang catalog).
3714 case "$desiredlang" in
3715 "$presentlang"*) useit=yes;;
3718 if test $useit = yes; then
3719 INST_LINGUAS="$INST_LINGUAS $presentlang"
3728 if test -n "$INST_LINGUAS"; then
3729 for lang in $INST_LINGUAS; do
3730 CATALOGS="$CATALOGS $lang.gmo"
3731 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
3732 QTCATALOGS="$QTCATALOGS $lang.qm"
3733 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3734 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
3735 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/'`
3736 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
3740 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"
3742 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
3743 # Add dependencies that cannot be formulated as a simple suffix rule.
3744 for lang in $ALL_LINGUAS; do
3745 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3746 cat >> "$ac_file.tmp" <<EOF
3747 $frobbedlang.msg: $lang.po
3748 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
3749 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
3753 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
3754 # Add dependencies that cannot be formulated as a simple suffix rule.
3755 for lang in $ALL_LINGUAS; do
3756 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/'`
3757 cat >> "$ac_file.tmp" <<EOF
3758 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
3759 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
3760 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
3764 if test -n "$POMAKEFILEDEPS"; then
3765 cat >> "$ac_file.tmp" <<EOF
3766 Makefile: $POMAKEFILEDEPS
3769 mv "$ac_file.tmp" "$ac_file"
3772 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
3773 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
3775 XGETTEXT_EXTRA_OPTIONS=
3778 dnl Registers an option to be passed to xgettext in the po subdirectory.
3779 AC_DEFUN([AM_XGETTEXT_OPTION],
3781 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
3782 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
3785 # progtest.m4 serial 7 (gettext-0.18.2)
3786 dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
3787 dnl This file is free software; the Free Software Foundation
3788 dnl gives unlimited permission to copy and/or distribute it,
3789 dnl with or without modifications, as long as this notice is preserved.
3791 dnl This file can be used in projects which are not available under
3792 dnl the GNU General Public License or the GNU Library General Public
3793 dnl License but which still want to provide support for the GNU gettext
3795 dnl Please note that the actual code of the GNU gettext library is covered
3796 dnl by the GNU Library General Public License, and the rest of the GNU
3797 dnl gettext package is covered by the GNU General Public License.
3798 dnl They are *not* in the public domain.
3801 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
3805 # Search path for a program which passes the given test.
3807 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
3808 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3809 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
3811 # Prepare PATH_SEPARATOR.
3812 # The user is always right.
3813 if test "${PATH_SEPARATOR+set}" != set; then
3814 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
3815 # contains only /bin. Note that ksh looks also at the FPATH variable,
3816 # so we have to set that as well for the test.
3818 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
3819 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
3820 || PATH_SEPARATOR=';'
3824 # Find out how to test for executable files. Don't use a zero-byte file,
3825 # as systems may use methods other than mode bits to determine executability.
3826 cat >conf$$.file <<_ASEOF
3830 chmod +x conf$$.file
3831 if test -x conf$$.file >/dev/null 2>&1; then
3832 ac_executable_p="test -x"
3834 ac_executable_p="test -f"
3838 # Extract the first word of "$2", so it can be a program name with args.
3839 set dummy $2; ac_word=[$]2
3840 AC_MSG_CHECKING([for $ac_word])
3841 AC_CACHE_VAL([ac_cv_path_$1],
3843 [[\\/]]* | ?:[[\\/]]*)
3844 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3847 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
3848 for ac_dir in ifelse([$5], , $PATH, [$5]); do
3850 test -z "$ac_dir" && ac_dir=.
3851 for ac_exec_ext in '' $ac_executable_extensions; do
3852 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
3853 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
3855 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
3862 dnl If no 4th arg is given, leave the cache variable unset,
3863 dnl so AC_PATH_PROGS will keep looking.
3864 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3869 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
3870 AC_MSG_RESULT([$][$1])
3877 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
3879 # This file is free software; the Free Software Foundation
3880 # gives unlimited permission to copy and/or distribute it,
3881 # with or without modifications, as long as this notice is preserved.
3883 # AM_AUTOMAKE_VERSION(VERSION)
3884 # ----------------------------
3885 # Automake X.Y traces this macro to ensure aclocal.m4 has been
3886 # generated from the m4 files accompanying Automake X.Y.
3887 # (This private macro should not be called outside this file.)
3888 AC_DEFUN([AM_AUTOMAKE_VERSION],
3889 [am__api_version='1.16'
3890 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3891 dnl require some minimum version. Point them to the right macro.
3892 m4_if([$1], [1.16.1], [],
3893 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3896 # _AM_AUTOCONF_VERSION(VERSION)
3897 # -----------------------------
3898 # aclocal traces this macro to find the Autoconf version.
3899 # This is a private macro too. Using m4_define simplifies
3900 # the logic in aclocal, which can simply ignore this definition.
3901 m4_define([_AM_AUTOCONF_VERSION], [])
3903 # AM_SET_CURRENT_AUTOMAKE_VERSION
3904 # -------------------------------
3905 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
3906 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
3907 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
3908 [AM_AUTOMAKE_VERSION([1.16.1])dnl
3909 m4_ifndef([AC_AUTOCONF_VERSION],
3910 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
3911 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
3913 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
3915 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
3917 # This file is free software; the Free Software Foundation
3918 # gives unlimited permission to copy and/or distribute it,
3919 # with or without modifications, as long as this notice is preserved.
3921 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3922 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
3923 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
3925 # Of course, Automake must honor this variable whenever it calls a
3926 # tool from the auxiliary directory. The problem is that $srcdir (and
3927 # therefore $ac_aux_dir as well) can be either absolute or relative,
3928 # depending on how configure is run. This is pretty annoying, since
3929 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
3930 # source directory, any form will work fine, but in subdirectories a
3931 # relative path needs to be adjusted first.
3933 # $ac_aux_dir/missing
3934 # fails when called from a subdirectory if $ac_aux_dir is relative
3935 # $top_srcdir/$ac_aux_dir/missing
3936 # fails if $ac_aux_dir is absolute,
3937 # fails when called from a subdirectory in a VPATH build with
3938 # a relative $ac_aux_dir
3940 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3941 # are both prefixed by $srcdir. In an in-source build this is usually
3942 # harmless because $srcdir is '.', but things will broke when you
3943 # start a VPATH build or use an absolute $srcdir.
3945 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3946 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
3947 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3948 # and then we would define $MISSING as
3949 # MISSING="\${SHELL} $am_aux_dir/missing"
3950 # This will work as long as MISSING is not called from configure, because
3951 # unfortunately $(top_srcdir) has no meaning in configure.
3952 # However there are other variables, like CC, which are often used in
3953 # configure, and could therefore not use this "fixed" $ac_aux_dir.
3955 # Another solution, used here, is to always expand $ac_aux_dir to an
3956 # absolute PATH. The drawback is that using absolute paths prevent a
3957 # configured tree to be moved without reconfiguration.
3959 AC_DEFUN([AM_AUX_DIR_EXPAND],
3960 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
3961 # Expand $ac_aux_dir to an absolute path.
3962 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3965 # AM_CONDITIONAL -*- Autoconf -*-
3967 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
3969 # This file is free software; the Free Software Foundation
3970 # gives unlimited permission to copy and/or distribute it,
3971 # with or without modifications, as long as this notice is preserved.
3973 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
3974 # -------------------------------------
3975 # Define a conditional.
3976 AC_DEFUN([AM_CONDITIONAL],
3977 [AC_PREREQ([2.52])dnl
3978 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
3979 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
3980 AC_SUBST([$1_TRUE])dnl
3981 AC_SUBST([$1_FALSE])dnl
3982 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
3983 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
3984 m4_define([_AM_COND_VALUE_$1], [$2])dnl
3992 AC_CONFIG_COMMANDS_PRE(
3993 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
3994 AC_MSG_ERROR([[conditional "$1" was never defined.
3995 Usually this means the macro was only invoked conditionally.]])
3998 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
4000 # This file is free software; the Free Software Foundation
4001 # gives unlimited permission to copy and/or distribute it,
4002 # with or without modifications, as long as this notice is preserved.
4005 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
4006 # written in clear, in which case automake, when reading aclocal.m4,
4007 # will think it sees a *use*, and therefore will trigger all it's
4008 # C support machinery. Also note that it means that autoscan, seeing
4009 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
4012 # _AM_DEPENDENCIES(NAME)
4013 # ----------------------
4014 # See how the compiler implements dependency checking.
4015 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
4016 # We try a few techniques and use that to set a single cache variable.
4018 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
4019 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
4020 # dependency, and given that the user is not expected to run this macro,
4021 # just rely on AC_PROG_CC.
4022 AC_DEFUN([_AM_DEPENDENCIES],
4023 [AC_REQUIRE([AM_SET_DEPDIR])dnl
4024 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
4025 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
4026 AC_REQUIRE([AM_DEP_TRACK])dnl
4028 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
4029 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
4030 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
4031 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
4032 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
4033 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
4034 [depcc="$$1" am_compiler_list=])
4036 AC_CACHE_CHECK([dependency style of $depcc],
4037 [am_cv_$1_dependencies_compiler_type],
4038 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4039 # We make a subdir and do the tests there. Otherwise we can end up
4040 # making bogus files that we don't know about and never remove. For
4041 # instance it was reported that on HP-UX the gcc test will end up
4042 # making a dummy file named 'D' -- because '-MD' means "put the output
4046 # Copy depcomp to subdir because otherwise we won't find it if we're
4047 # using a relative directory.
4048 cp "$am_depcomp" conftest.dir
4050 # We will build objects and dependencies in a subdirectory because
4051 # it helps to detect inapplicable dependency modes. For instance
4052 # both Tru64's cc and ICC support -MD to output dependencies as a
4053 # side effect of compilation, but ICC will put the dependencies in
4054 # the current directory while Tru64 will put them in the object
4058 am_cv_$1_dependencies_compiler_type=none
4059 if test "$am_compiler_list" = ""; then
4060 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
4064 [case " $depcc " in #(
4065 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4068 [case " $depcc " in #(
4069 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4072 for depmode in $am_compiler_list; do
4073 # Setup a source with many dependencies, because some compilers
4074 # like to wrap large dependency lists on column 80 (with \), and
4075 # we should not choose a depcomp mode which is confused by this.
4077 # We need to recreate these files for each test, as the compiler may
4078 # overwrite some of them when testing with obscure command lines.
4079 # This happens at least with the AIX C compiler.
4081 for i in 1 2 3 4 5 6; do
4082 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4083 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4084 # Solaris 10 /bin/sh.
4085 echo '/* dummy */' > sub/conftst$i.h
4087 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4089 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4090 # mode. It turns out that the SunPro C++ compiler does not properly
4091 # handle '-M -o', and we need to detect this. Also, some Intel
4092 # versions had trouble with output in subdirs.
4093 am__obj=sub/conftest.${OBJEXT-o}
4094 am__minus_obj="-o $am__obj"
4097 # This depmode causes a compiler race in universal mode.
4098 test "$am__universal" = false || continue
4101 # After this tag, mechanisms are not by side-effect, so they'll
4102 # only be used when explicitly requested.
4103 if test "x$enable_dependency_tracking" = xyes; then
4109 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4110 # This compiler won't grok '-c -o', but also, the minuso test has
4111 # not run yet. These depmodes are late enough in the game, and
4112 # so weak that their functioning should not be impacted.
4113 am__obj=conftest.${OBJEXT-o}
4118 if depmode=$depmode \
4119 source=sub/conftest.c object=$am__obj \
4120 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4121 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4122 >/dev/null 2>conftest.err &&
4123 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4124 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4125 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4126 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4127 # icc doesn't choke on unknown options, it will just issue warnings
4128 # or remarks (even with -Werror). So we grep stderr for any message
4129 # that says an option was ignored or not supported.
4130 # When given -MP, icc 7.0 and 7.1 complain thusly:
4131 # icc: Command line warning: ignoring option '-M'; no argument required
4132 # The diagnosis changed in icc 8.0:
4133 # icc: Command line remark: option '-MP' not supported
4134 if (grep 'ignoring option' conftest.err ||
4135 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4136 am_cv_$1_dependencies_compiler_type=$depmode
4145 am_cv_$1_dependencies_compiler_type=none
4148 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
4149 AM_CONDITIONAL([am__fastdep$1], [
4150 test "x$enable_dependency_tracking" != xno \
4151 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
4157 # Choose a directory name for dependency files.
4158 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
4159 AC_DEFUN([AM_SET_DEPDIR],
4160 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
4161 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
4167 AC_DEFUN([AM_DEP_TRACK],
4168 [AC_ARG_ENABLE([dependency-tracking], [dnl
4170 [--enable-dependency-tracking],
4171 [do not reject slow dependency extractors])
4173 [--disable-dependency-tracking],
4174 [speeds up one-time build])])
4175 if test "x$enable_dependency_tracking" != xno; then
4176 am_depcomp="$ac_aux_dir/depcomp"
4180 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
4181 AC_SUBST([AMDEPBACKSLASH])dnl
4182 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
4183 AC_SUBST([am__nodep])dnl
4184 _AM_SUBST_NOTMAKE([am__nodep])dnl
4187 # Generate code to set up dependency tracking. -*- Autoconf -*-
4189 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
4191 # This file is free software; the Free Software Foundation
4192 # gives unlimited permission to copy and/or distribute it,
4193 # with or without modifications, as long as this notice is preserved.
4195 # _AM_OUTPUT_DEPENDENCY_COMMANDS
4196 # ------------------------------
4197 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
4199 # Older Autoconf quotes --file arguments for eval, but not when files
4200 # are listed without --file. Let's play safe and only enable the eval
4201 # if we detect the quoting.
4202 # TODO: see whether this extra hack can be removed once we start
4203 # requiring Autoconf 2.70 or later.
4204 AS_CASE([$CONFIG_FILES],
4205 [*\'*], [eval set x "$CONFIG_FILES"],
4206 [*], [set x $CONFIG_FILES])
4208 # Used to flag and report bootstrapping failures.
4212 # Strip MF so we end up with the name of the file.
4213 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
4214 # Check whether this is an Automake generated Makefile which includes
4215 # dependency-tracking related rules and includes.
4216 # Grep'ing the whole file directly is not great: AIX grep has a line
4217 # limit of 2048, but all sed's we know have understand at least 4000.
4218 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
4220 am_dirpart=`AS_DIRNAME(["$am_mf"])`
4221 am_filepart=`AS_BASENAME(["$am_mf"])`
4222 AM_RUN_LOG([cd "$am_dirpart" \
4223 && sed -e '/# am--include-marker/d' "$am_filepart" \
4224 | $MAKE -f - am--depfiles]) || am_rc=$?
4226 if test $am_rc -ne 0; then
4227 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
4228 for automatic dependency tracking. Try re-running configure with the
4229 '--disable-dependency-tracking' option to at least be able to build
4230 the package (albeit without support for automatic dependency tracking).])
4232 AS_UNSET([am_dirpart])
4233 AS_UNSET([am_filepart])
4236 rm -f conftest-deps.mk
4238 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
4241 # AM_OUTPUT_DEPENDENCY_COMMANDS
4242 # -----------------------------
4243 # This macro should only be invoked once -- use via AC_REQUIRE.
4245 # This code is only required when automatic dependency tracking is enabled.
4246 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
4247 # order to bootstrap the dependency handling code.
4248 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4249 [AC_CONFIG_COMMANDS([depfiles],
4250 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4251 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
4253 # Do all the work for Automake. -*- Autoconf -*-
4255 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
4257 # This file is free software; the Free Software Foundation
4258 # gives unlimited permission to copy and/or distribute it,
4259 # with or without modifications, as long as this notice is preserved.
4261 # This macro actually does too much. Some checks are only needed if
4262 # your package does certain things. But this isn't really a big deal.
4264 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
4265 m4_define([AC_PROG_CC],
4266 m4_defn([AC_PROG_CC])
4270 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4271 # AM_INIT_AUTOMAKE([OPTIONS])
4272 # -----------------------------------------------
4273 # The call with PACKAGE and VERSION arguments is the old style
4274 # call (pre autoconf-2.50), which is being phased out. PACKAGE
4275 # and VERSION should now be passed to AC_INIT and removed from
4276 # the call to AM_INIT_AUTOMAKE.
4277 # We support both call styles for the transition. After
4278 # the next Automake release, Autoconf can make the AC_INIT
4279 # arguments mandatory, and then we can depend on a new Autoconf
4280 # release and drop the old call support.
4281 AC_DEFUN([AM_INIT_AUTOMAKE],
4282 [AC_PREREQ([2.65])dnl
4283 dnl Autoconf wants to disallow AM_ names. We explicitly allow
4284 dnl the ones we care about.
4285 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4286 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4287 AC_REQUIRE([AC_PROG_INSTALL])dnl
4288 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4289 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4290 # is not polluted with repeated "-I."
4291 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4292 # test to see if srcdir already configured
4293 if test -f $srcdir/config.status; then
4294 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4298 # test whether we have cygpath
4299 if test -z "$CYGPATH_W"; then
4300 if (cygpath --version) >/dev/null 2>/dev/null; then
4301 CYGPATH_W='cygpath -w'
4306 AC_SUBST([CYGPATH_W])
4308 # Define the identity of the package.
4309 dnl Distinguish between old-style and new-style calls.
4311 [AC_DIAGNOSE([obsolete],
4312 [$0: two- and three-arguments forms are deprecated.])
4313 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4314 AC_SUBST([PACKAGE], [$1])dnl
4315 AC_SUBST([VERSION], [$2])],
4316 [_AM_SET_OPTIONS([$1])dnl
4317 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4319 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
4321 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4322 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4323 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4325 _AM_IF_OPTION([no-define],,
4326 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
4327 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
4329 # Some tools Automake needs.
4330 AC_REQUIRE([AM_SANITY_CHECK])dnl
4331 AC_REQUIRE([AC_ARG_PROGRAM])dnl
4332 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
4333 AM_MISSING_PROG([AUTOCONF], [autoconf])
4334 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
4335 AM_MISSING_PROG([AUTOHEADER], [autoheader])
4336 AM_MISSING_PROG([MAKEINFO], [makeinfo])
4337 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4338 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
4339 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
4340 # For better backward compatibility. To be removed once Automake 1.9.x
4341 # dies out for good. For more background, see:
4342 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4343 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4344 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
4345 # We need awk for the "check" target (and possibly the TAP driver). The
4346 # system "awk" is bad on some platforms.
4347 AC_REQUIRE([AC_PROG_AWK])dnl
4348 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4349 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
4350 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
4351 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
4352 [_AM_PROG_TAR([v7])])])
4353 _AM_IF_OPTION([no-dependencies],,
4354 [AC_PROVIDE_IFELSE([AC_PROG_CC],
4355 [_AM_DEPENDENCIES([CC])],
4356 [m4_define([AC_PROG_CC],
4357 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
4358 AC_PROVIDE_IFELSE([AC_PROG_CXX],
4359 [_AM_DEPENDENCIES([CXX])],
4360 [m4_define([AC_PROG_CXX],
4361 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
4362 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
4363 [_AM_DEPENDENCIES([OBJC])],
4364 [m4_define([AC_PROG_OBJC],
4365 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
4366 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
4367 [_AM_DEPENDENCIES([OBJCXX])],
4368 [m4_define([AC_PROG_OBJCXX],
4369 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
4371 AC_REQUIRE([AM_SILENT_RULES])dnl
4372 dnl The testsuite driver may need to know about EXEEXT, so add the
4373 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
4374 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
4375 AC_CONFIG_COMMANDS_PRE(dnl
4376 [m4_provide_if([_AM_COMPILER_EXEEXT],
4377 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
4379 # POSIX will say in a future version that running "rm -f" with no argument
4380 # is OK; and we want to be able to make that assumption in our Makefile
4381 # recipes. So use an aggressive probe to check that the usage we want is
4382 # actually supported "in the wild" to an acceptable degree.
4383 # See automake bug#10828.
4384 # To make any issue more visible, cause the running configure to be aborted
4385 # by default if the 'rm' program in use doesn't match our expectations; the
4386 # user can still override this though.
4387 if rm -f && rm -fr && rm -rf; then : OK; else
4391 Your 'rm' program seems unable to run without file operands specified
4392 on the command line, even when the '-f' option is present. This is contrary
4393 to the behaviour of most rm programs out there, and not conforming with
4394 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4396 Please tell bug-automake@gnu.org about your system, including the value
4397 of your $PATH and any error possibly output before this message. This
4398 can help us improve future automake versions.
4401 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4402 echo 'Configuration will proceed anyway, since you have set the' >&2
4403 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4407 Aborting the configuration process, to ensure you take notice of the issue.
4409 You can download and install GNU coreutils to get an 'rm' implementation
4410 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4412 If you want to complete the configuration process using your problematic
4413 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4414 to "yes", and re-run configure.
4417 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
4420 dnl The trailing newline in this macro's definition is deliberate, for
4421 dnl backward compatibility and to allow trailing 'dnl'-style comments
4422 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
4425 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
4426 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
4427 dnl mangled by Autoconf and run in a shell conditional statement.
4428 m4_define([_AC_COMPILER_EXEEXT],
4429 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
4431 # When config.status generates a header, we must update the stamp-h file.
4432 # This file resides in the same directory as the config header
4433 # that is generated. The stamp files are numbered to have different names.
4435 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
4436 # loop where config.status creates the headers, so we can generate
4437 # our stamp files there.
4438 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
4439 [# Compute $1's index in $config_headers.
4442 for _am_header in $config_headers :; do
4444 $_am_arg | $_am_arg:* )
4447 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
4450 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
4452 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
4454 # This file is free software; the Free Software Foundation
4455 # gives unlimited permission to copy and/or distribute it,
4456 # with or without modifications, as long as this notice is preserved.
4458 # AM_PROG_INSTALL_SH
4459 # ------------------
4460 # Define $install_sh.
4461 AC_DEFUN([AM_PROG_INSTALL_SH],
4462 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4463 if test x"${install_sh+set}" != xset; then
4466 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4468 install_sh="\${SHELL} $am_aux_dir/install-sh"
4471 AC_SUBST([install_sh])])
4473 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
4475 # This file is free software; the Free Software Foundation
4476 # gives unlimited permission to copy and/or distribute it,
4477 # with or without modifications, as long as this notice is preserved.
4479 # Check whether the underlying file-system supports filenames
4480 # with a leading dot. For instance MS-DOS doesn't.
4481 AC_DEFUN([AM_SET_LEADING_DOT],
4482 [rm -rf .tst 2>/dev/null
4483 mkdir .tst 2>/dev/null
4484 if test -d .tst; then
4489 rmdir .tst 2>/dev/null
4490 AC_SUBST([am__leading_dot])])
4492 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
4495 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
4497 # This file is free software; the Free Software Foundation
4498 # gives unlimited permission to copy and/or distribute it,
4499 # with or without modifications, as long as this notice is preserved.
4501 # AM_MAINTAINER_MODE([DEFAULT-MODE])
4502 # ----------------------------------
4503 # Control maintainer-specific portions of Makefiles.
4504 # Default is to disable them, unless 'enable' is passed literally.
4505 # For symmetry, 'disable' may be passed as well. Anyway, the user
4506 # can override the default with the --enable/--disable switch.
4507 AC_DEFUN([AM_MAINTAINER_MODE],
4508 [m4_case(m4_default([$1], [disable]),
4509 [enable], [m4_define([am_maintainer_other], [disable])],
4510 [disable], [m4_define([am_maintainer_other], [enable])],
4511 [m4_define([am_maintainer_other], [enable])
4512 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
4513 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
4514 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
4515 AC_ARG_ENABLE([maintainer-mode],
4516 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
4517 am_maintainer_other[ make rules and dependencies not useful
4518 (and sometimes confusing) to the casual installer])],
4519 [USE_MAINTAINER_MODE=$enableval],
4520 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
4521 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
4522 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
4523 MAINT=$MAINTAINER_MODE_TRUE
4524 AC_SUBST([MAINT])dnl
4528 # Check to see how 'make' treats includes. -*- Autoconf -*-
4530 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
4532 # This file is free software; the Free Software Foundation
4533 # gives unlimited permission to copy and/or distribute it,
4534 # with or without modifications, as long as this notice is preserved.
4538 # Check whether make has an 'include' directive that can support all
4539 # the idioms we need for our automatic dependency tracking code.
4540 AC_DEFUN([AM_MAKE_INCLUDE],
4541 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
4542 cat > confinc.mk << 'END'
4544 @echo this is the am__doit target >confinc.out
4549 # BSD make does it like this.
4550 echo '.include "confinc.mk" # ignored' > confmf.BSD
4551 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4552 echo 'include confinc.mk # ignored' > confmf.GNU
4554 for s in GNU BSD; do
4555 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
4556 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
4557 ['0:this is the am__doit target'],
4559 [BSD], [am__include='.include' am__quote='"'],
4560 [am__include='include' am__quote=''])])
4561 if test "$am__include" != "#"; then
4562 _am_result="yes ($s style)"
4566 rm -f confinc.* confmf.*
4567 AC_MSG_RESULT([${_am_result}])
4568 AC_SUBST([am__include])])
4569 AC_SUBST([am__quote])])
4571 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
4573 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
4575 # This file is free software; the Free Software Foundation
4576 # gives unlimited permission to copy and/or distribute it,
4577 # with or without modifications, as long as this notice is preserved.
4579 # AM_MISSING_PROG(NAME, PROGRAM)
4580 # ------------------------------
4581 AC_DEFUN([AM_MISSING_PROG],
4582 [AC_REQUIRE([AM_MISSING_HAS_RUN])
4583 $1=${$1-"${am_missing_run}$2"}
4586 # AM_MISSING_HAS_RUN
4587 # ------------------
4588 # Define MISSING if not defined so far and test if it is modern enough.
4589 # If it is, set am_missing_run to use it, otherwise, to nothing.
4590 AC_DEFUN([AM_MISSING_HAS_RUN],
4591 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4592 AC_REQUIRE_AUX_FILE([missing])dnl
4593 if test x"${MISSING+set}" != xset; then
4596 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
4598 MISSING="\${SHELL} $am_aux_dir/missing" ;;
4601 # Use eval to expand $SHELL
4602 if eval "$MISSING --is-lightweight"; then
4603 am_missing_run="$MISSING "
4606 AC_MSG_WARN(['missing' script is too old or missing])
4610 # Helper functions for option handling. -*- Autoconf -*-
4612 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
4614 # This file is free software; the Free Software Foundation
4615 # gives unlimited permission to copy and/or distribute it,
4616 # with or without modifications, as long as this notice is preserved.
4618 # _AM_MANGLE_OPTION(NAME)
4619 # -----------------------
4620 AC_DEFUN([_AM_MANGLE_OPTION],
4621 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
4623 # _AM_SET_OPTION(NAME)
4624 # --------------------
4625 # Set option NAME. Presently that only means defining a flag for this option.
4626 AC_DEFUN([_AM_SET_OPTION],
4627 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
4629 # _AM_SET_OPTIONS(OPTIONS)
4630 # ------------------------
4631 # OPTIONS is a space-separated list of Automake options.
4632 AC_DEFUN([_AM_SET_OPTIONS],
4633 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
4635 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
4636 # -------------------------------------------
4637 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
4638 AC_DEFUN([_AM_IF_OPTION],
4639 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
4641 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
4643 # This file is free software; the Free Software Foundation
4644 # gives unlimited permission to copy and/or distribute it,
4645 # with or without modifications, as long as this notice is preserved.
4649 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
4650 # to automatically call this.
4651 AC_DEFUN([_AM_PROG_CC_C_O],
4652 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4653 AC_REQUIRE_AUX_FILE([compile])dnl
4654 AC_LANG_PUSH([C])dnl
4656 [whether $CC understands -c and -o together],
4657 [am_cv_prog_cc_c_o],
4658 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
4659 # Make sure it works both with $CC and with simple cc.
4660 # Following AC_PROG_CC_C_O, we do the test twice because some
4661 # compilers refuse to overwrite an existing .o file with -o,
4662 # though they will create one.
4663 am_cv_prog_cc_c_o=yes
4665 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
4666 && test -f conftest2.$ac_objext; then
4669 am_cv_prog_cc_c_o=no
4673 rm -f core conftest*
4675 if test "$am_cv_prog_cc_c_o" != yes; then
4676 # Losing compiler, so override with the script.
4677 # FIXME: It is wrong to rewrite CC.
4678 # But if we don't then we get into trouble of one sort or another.
4679 # A longer-term fix would be to have automake use am__CC in this case,
4680 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4681 CC="$am_aux_dir/compile $CC"
4685 # For backward compatibility.
4686 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
4688 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
4690 # This file is free software; the Free Software Foundation
4691 # gives unlimited permission to copy and/or distribute it,
4692 # with or without modifications, as long as this notice is preserved.
4695 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
4696 # ---------------------------------------------------------------------------
4697 # Adds support for distributing Python modules and packages. To
4698 # install modules, copy them to $(pythondir), using the python_PYTHON
4699 # automake variable. To install a package with the same name as the
4700 # automake package, install to $(pkgpythondir), or use the
4701 # pkgpython_PYTHON automake variable.
4703 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
4704 # locations to install python extension modules (shared libraries).
4705 # Another macro is required to find the appropriate flags to compile
4706 # extension modules.
4708 # If your package is configured with a different prefix to python,
4709 # users will have to add the install directory to the PYTHONPATH
4710 # environment variable, or create a .pth file (see the python
4711 # documentation for details).
4713 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
4714 # cause an error if the version of python installed on the system
4715 # doesn't meet the requirement. MINIMUM-VERSION should consist of
4716 # numbers and dots only.
4717 AC_DEFUN([AM_PATH_PYTHON],
4719 dnl Find a Python interpreter. Python versions prior to 2.0 are not
4720 dnl supported. (2.0 was released on October 16, 2000).
4721 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
4722 [python python2 python3 dnl
4723 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
4724 python3.2 python3.1 python3.0 dnl
4725 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
4728 AC_ARG_VAR([PYTHON], [the Python interpreter])
4731 dnl No version check is needed.
4732 # Find any Python interpreter.
4733 if test -z "$PYTHON"; then
4734 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
4736 am_display_PYTHON=python
4738 dnl A version check is needed.
4739 if test -n "$PYTHON"; then
4740 # If the user set $PYTHON, use it and don't search something else.
4741 AC_MSG_CHECKING([whether $PYTHON version is >= $1])
4742 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
4743 [AC_MSG_RESULT([yes])],
4744 [AC_MSG_RESULT([no])
4745 AC_MSG_ERROR([Python interpreter is too old])])
4746 am_display_PYTHON=$PYTHON
4748 # Otherwise, try each interpreter until we find one that satisfies
4750 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
4751 [am_cv_pathless_PYTHON],[
4752 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
4753 test "$am_cv_pathless_PYTHON" = none && break
4754 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
4756 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
4757 if test "$am_cv_pathless_PYTHON" = none; then
4760 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
4762 am_display_PYTHON=$am_cv_pathless_PYTHON
4766 if test "$PYTHON" = :; then
4767 dnl Run any user-specified action, or abort.
4768 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
4771 dnl Query Python for its version number. Getting [:3] seems to be
4772 dnl the best way to do this; it's what "site.py" does in the standard
4775 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
4776 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
4777 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
4779 dnl Use the values of $prefix and $exec_prefix for the corresponding
4780 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
4781 dnl distinct variables so they can be overridden if need be. However,
4782 dnl general consensus is that you shouldn't need this ability.
4784 AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
4785 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
4787 dnl At times (like when building shared libraries) you may want
4788 dnl to know which OS platform Python thinks this is.
4790 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
4791 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
4792 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
4794 # Just factor out some code duplication.
4795 am_python_setup_sysconfig="\
4797 # Prefer sysconfig over distutils.sysconfig, for better compatibility
4798 # with python 3.x. See automake bug#10227.
4802 can_use_sysconfig = 0
4804 can_use_sysconfig = 1
4805 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
4806 # <https://github.com/pypa/virtualenv/issues/118>
4808 from platform import python_implementation
4809 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
4810 can_use_sysconfig = 0
4814 dnl Set up 4 directories:
4816 dnl pythondir -- where to install python scripts. This is the
4817 dnl site-packages directory, not the python standard library
4818 dnl directory like in previous automake betas. This behavior
4819 dnl is more consistent with lispdir.m4 for example.
4820 dnl Query distutils for this directory.
4821 AC_CACHE_CHECK([for $am_display_PYTHON script directory],
4822 [am_cv_python_pythondir],
4823 [if test "x$prefix" = xNONE
4825 am_py_prefix=$ac_default_prefix
4827 am_py_prefix=$prefix
4829 am_cv_python_pythondir=`$PYTHON -c "
4830 $am_python_setup_sysconfig
4831 if can_use_sysconfig:
4832 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
4834 from distutils import sysconfig
4835 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
4836 sys.stdout.write(sitedir)"`
4837 case $am_cv_python_pythondir in
4839 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
4840 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
4843 case $am_py_prefix in
4846 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
4852 AC_SUBST([pythondir], [$am_cv_python_pythondir])
4854 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
4855 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
4856 dnl more consistent with the rest of automake.
4858 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
4860 dnl pyexecdir -- directory for installing python extension modules
4861 dnl (shared libraries)
4862 dnl Query distutils for this directory.
4863 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
4864 [am_cv_python_pyexecdir],
4865 [if test "x$exec_prefix" = xNONE
4867 am_py_exec_prefix=$am_py_prefix
4869 am_py_exec_prefix=$exec_prefix
4871 am_cv_python_pyexecdir=`$PYTHON -c "
4872 $am_python_setup_sysconfig
4873 if can_use_sysconfig:
4874 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
4876 from distutils import sysconfig
4877 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
4878 sys.stdout.write(sitedir)"`
4879 case $am_cv_python_pyexecdir in
4880 $am_py_exec_prefix*)
4881 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
4882 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
4885 case $am_py_exec_prefix in
4888 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
4894 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
4896 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
4898 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
4900 dnl Run any user-specified action.
4907 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
4908 # ---------------------------------------------------------------------------
4909 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
4910 # Run ACTION-IF-FALSE otherwise.
4911 # This test uses sys.hexversion instead of the string equivalent (first
4912 # word of sys.version), in order to cope with versions such as 2.2c1.
4913 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
4914 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
4916 # split strings by '.' and convert to numeric. Append some zeros
4917 # because we need at least 4 digits for the hex conversion.
4918 # map returns an iterator in Python 3.0 and a list in 2.x
4919 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
4921 # xrange is not present in Python 3.0 and range returns an iterator
4922 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
4923 sys.exit(sys.hexversion < minverhex)"
4924 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
4926 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
4928 # This file is free software; the Free Software Foundation
4929 # gives unlimited permission to copy and/or distribute it,
4930 # with or without modifications, as long as this notice is preserved.
4932 # AM_RUN_LOG(COMMAND)
4933 # -------------------
4934 # Run COMMAND, save the exit status in ac_status, and log it.
4935 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
4936 AC_DEFUN([AM_RUN_LOG],
4937 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
4938 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4941 (exit $ac_status); }])
4943 # Check to make sure that the build environment is sane. -*- Autoconf -*-
4945 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
4947 # This file is free software; the Free Software Foundation
4948 # gives unlimited permission to copy and/or distribute it,
4949 # with or without modifications, as long as this notice is preserved.
4953 AC_DEFUN([AM_SANITY_CHECK],
4954 [AC_MSG_CHECKING([whether build environment is sane])
4955 # Reject unsafe characters in $srcdir or the absolute working directory
4956 # name. Accept space and tab only in the latter.
4960 *[[\\\"\#\$\&\'\`$am_lf]]*)
4961 AC_MSG_ERROR([unsafe absolute working directory name]);;
4964 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
4965 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
4968 # Do 'set' in a subshell so we don't clobber the current shell's
4969 # arguments. Must try -L first in case configure is actually a
4970 # symlink; some systems play weird games with the mod time of symlinks
4971 # (eg FreeBSD returns the mod time of the symlink's containing
4975 for am_try in 1 2; do
4976 echo "timestamp, slept: $am_has_slept" > conftest.file
4977 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4978 if test "$[*]" = "X"; then
4980 set X `ls -t "$srcdir/configure" conftest.file`
4982 if test "$[*]" != "X $srcdir/configure conftest.file" \
4983 && test "$[*]" != "X conftest.file $srcdir/configure"; then
4985 # If neither matched, then we have a broken ls. This can happen
4986 # if, for instance, CONFIG_SHELL is bash and it inherits a
4987 # broken ls alias from the environment. This has actually
4988 # happened. Such a system could not be considered "sane".
4989 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
4990 alias in your environment])
4992 if test "$[2]" = conftest.file || test $am_try -eq 2; then
4999 test "$[2]" = conftest.file
5005 AC_MSG_ERROR([newly created file is older than distributed files!
5006 Check your system clock])
5008 AC_MSG_RESULT([yes])
5009 # If we didn't sleep, we still need to ensure time stamps of config.status and
5010 # generated files are strictly newer.
5012 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
5016 AC_CONFIG_COMMANDS_PRE(
5017 [AC_MSG_CHECKING([that generated files are newer than configure])
5018 if test -n "$am_sleep_pid"; then
5019 # Hide warnings about reused PIDs.
5020 wait $am_sleep_pid 2>/dev/null
5022 AC_MSG_RESULT([done])])
5026 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
5028 # This file is free software; the Free Software Foundation
5029 # gives unlimited permission to copy and/or distribute it,
5030 # with or without modifications, as long as this notice is preserved.
5032 # AM_SILENT_RULES([DEFAULT])
5033 # --------------------------
5034 # Enable less verbose build rules; with the default set to DEFAULT
5035 # ("yes" being less verbose, "no" or empty being verbose).
5036 AC_DEFUN([AM_SILENT_RULES],
5037 [AC_ARG_ENABLE([silent-rules], [dnl
5039 [--enable-silent-rules],
5040 [less verbose build output (undo: "make V=1")])
5042 [--disable-silent-rules],
5043 [verbose build output (undo: "make V=0")])dnl
5045 case $enable_silent_rules in @%:@ (((
5046 yes) AM_DEFAULT_VERBOSITY=0;;
5047 no) AM_DEFAULT_VERBOSITY=1;;
5048 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
5051 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
5052 dnl do not support nested variable expansions.
5053 dnl See automake bug#9928 and bug#10237.
5054 am_make=${MAKE-make}
5055 AC_CACHE_CHECK([whether $am_make supports nested variables],
5056 [am_cv_make_support_nested_variables],
5057 [if AS_ECHO([['TRUE=$(BAR$(V))
5063 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
5064 am_cv_make_support_nested_variables=yes
5066 am_cv_make_support_nested_variables=no
5068 if test $am_cv_make_support_nested_variables = yes; then
5069 dnl Using '$V' instead of '$(V)' breaks IRIX make.
5071 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
5073 AM_V=$AM_DEFAULT_VERBOSITY
5074 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
5077 AM_SUBST_NOTMAKE([AM_V])dnl
5078 AC_SUBST([AM_DEFAULT_V])dnl
5079 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
5080 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
5082 AC_SUBST([AM_BACKSLASH])dnl
5083 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
5086 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
5088 # This file is free software; the Free Software Foundation
5089 # gives unlimited permission to copy and/or distribute it,
5090 # with or without modifications, as long as this notice is preserved.
5092 # AM_PROG_INSTALL_STRIP
5093 # ---------------------
5094 # One issue with vendor 'install' (even GNU) is that you can't
5095 # specify the program used to strip binaries. This is especially
5096 # annoying in cross-compiling environments, where the build's strip
5097 # is unlikely to handle the host's binaries.
5098 # Fortunately install-sh will honor a STRIPPROG variable, so we
5099 # always use install-sh in "make install-strip", and initialize
5100 # STRIPPROG with the value of the STRIP variable (set by the user).
5101 AC_DEFUN([AM_PROG_INSTALL_STRIP],
5102 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
5103 # Installed binaries are usually stripped using 'strip' when the user
5104 # run "make install-strip". However 'strip' might not be the right
5105 # tool to use in cross-compilation environments, therefore Automake
5106 # will honor the 'STRIP' environment variable to overrule this program.
5107 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
5108 if test "$cross_compiling" != no; then
5109 AC_CHECK_TOOL([STRIP], [strip], :)
5111 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5112 AC_SUBST([INSTALL_STRIP_PROGRAM])])
5114 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
5116 # This file is free software; the Free Software Foundation
5117 # gives unlimited permission to copy and/or distribute it,
5118 # with or without modifications, as long as this notice is preserved.
5120 # _AM_SUBST_NOTMAKE(VARIABLE)
5121 # ---------------------------
5122 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
5123 # This macro is traced by Automake.
5124 AC_DEFUN([_AM_SUBST_NOTMAKE])
5126 # AM_SUBST_NOTMAKE(VARIABLE)
5127 # --------------------------
5128 # Public sister of _AM_SUBST_NOTMAKE.
5129 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
5131 # Check how to create a tarball. -*- Autoconf -*-
5133 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
5135 # This file is free software; the Free Software Foundation
5136 # gives unlimited permission to copy and/or distribute it,
5137 # with or without modifications, as long as this notice is preserved.
5139 # _AM_PROG_TAR(FORMAT)
5140 # --------------------
5141 # Check how to create a tarball in format FORMAT.
5142 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
5144 # Substitute a variable $(am__tar) that is a command
5145 # writing to stdout a FORMAT-tarball containing the directory
5147 # tardir=directory && $(am__tar) > result.tar
5149 # Substitute a variable $(am__untar) that extract such
5150 # a tarball read from stdin.
5151 # $(am__untar) < result.tar
5153 AC_DEFUN([_AM_PROG_TAR],
5154 [# Always define AMTAR for backward compatibility. Yes, it's still used
5155 # in the wild :-( We should find a proper way to deprecate it ...
5156 AC_SUBST([AMTAR], ['$${TAR-tar}'])
5158 # We'll loop over all known methods to create a tar archive until one works.
5159 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
5162 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
5166 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
5167 # There is notably a 21 bits limit for the UID and the GID. In fact,
5168 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
5170 am_max_uid=2097151 # 2^21 - 1
5171 am_max_gid=$am_max_uid
5172 # The $UID and $GID variables are not portable, so we need to resort
5173 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
5174 # below are definitely unexpected, so allow the users to see them
5175 # (that is, avoid stderr redirection).
5176 am_uid=`id -u || echo unknown`
5177 am_gid=`id -g || echo unknown`
5178 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
5179 if test $am_uid -le $am_max_uid; then
5180 AC_MSG_RESULT([yes])
5185 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
5186 if test $am_gid -le $am_max_gid; then
5187 AC_MSG_RESULT([yes])
5196 [m4_fatal([Unknown tar format])])
5198 AC_MSG_CHECKING([how to create a $1 tar archive])
5200 # Go ahead even if we have the value already cached. We do so because we
5201 # need to set the values for the 'am__tar' and 'am__untar' variables.
5202 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
5204 for _am_tool in $_am_tools; do
5207 for _am_tar in tar gnutar gtar; do
5208 AM_RUN_LOG([$_am_tar --version]) && break
5210 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
5211 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
5212 am__untar="$_am_tar -xf -"
5215 # Must skip GNU tar: if it does not support --format= it doesn't create
5216 # ustar tarball either.
5217 (tar --version) >/dev/null 2>&1 && continue
5218 am__tar='tar chf - "$$tardir"'
5219 am__tar_='tar chf - "$tardir"'
5220 am__untar='tar xf -'
5223 am__tar='pax -L -x $1 -w "$$tardir"'
5224 am__tar_='pax -L -x $1 -w "$tardir"'
5228 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
5229 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
5230 am__untar='cpio -i -H $1 -d'
5239 # If the value was cached, stop now. We just wanted to have am__tar
5240 # and am__untar set.
5241 test -n "${am_cv_prog_tar_$1}" && break
5243 # tar/untar a dummy directory, and stop if the command works.
5246 echo GrepMe > conftest.dir/file
5247 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
5249 if test -s conftest.tar; then
5250 AM_RUN_LOG([$am__untar <conftest.tar])
5251 AM_RUN_LOG([cat conftest.dir/file])
5252 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
5257 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
5258 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
5261 AC_SUBST([am__untar])