Imported Upstream version 1.1.5
[psensor-pkg-ubuntu.git] / aclocal.m4
1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23 # gettext.m4 serial 67 (gettext-0.19.6)
24 dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
25 dnl This file is free software; the Free Software Foundation
26 dnl gives unlimited permission to copy and/or distribute it,
27 dnl with or without modifications, as long as this notice is preserved.
28 dnl
29 dnl This file can be used in projects which are not available under
30 dnl the GNU General Public License or the GNU Library General Public
31 dnl License but which still want to provide support for the GNU gettext
32 dnl functionality.
33 dnl Please note that the actual code of the GNU gettext library is covered
34 dnl by the GNU Library General Public License, and the rest of the GNU
35 dnl gettext package is covered by the GNU General Public License.
36 dnl They are *not* in the public domain.
37
38 dnl Authors:
39 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
40 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
41
42 dnl Macro to add for using GNU gettext.
43
44 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
45 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
46 dnl    default (if it is not specified or empty) is 'no-libtool'.
47 dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
48 dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
49 dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
50 dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
51 dnl    depending on --{enable,disable}-{shared,static} and on the presence of
52 dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
53 dnl    $(top_builddir)/intl/libintl.a will be created.
54 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
55 dnl    implementations (in libc or libintl) without the ngettext() function
56 dnl    will be ignored.  If NEEDSYMBOL is specified and is
57 dnl    'need-formatstring-macros', then GNU gettext implementations that don't
58 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
59 dnl INTLDIR is used to find the intl libraries.  If empty,
60 dnl    the value '$(top_builddir)/intl/' is used.
61 dnl
62 dnl The result of the configuration is one of three cases:
63 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
64 dnl    and used.
65 dnl    Catalog format: GNU --> install in $(datadir)
66 dnl    Catalog extension: .mo after installation, .gmo in source tree
67 dnl 2) GNU gettext has been found in the system's C library.
68 dnl    Catalog format: GNU --> install in $(datadir)
69 dnl    Catalog extension: .mo after installation, .gmo in source tree
70 dnl 3) No internationalization, always use English msgid.
71 dnl    Catalog format: none
72 dnl    Catalog extension: none
73 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
74 dnl The use of .gmo is historical (it was needed to avoid overwriting the
75 dnl GNU format catalogs when building on a platform with an X/Open gettext),
76 dnl but we keep it in order not to force irrelevant filename changes on the
77 dnl maintainers.
78 dnl
79 AC_DEFUN([AM_GNU_GETTEXT],
80 [
81   dnl Argument checking.
82   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
83     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
84 ])])])])])
85   ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
86     [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
87   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
88     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
89 ])])])])
90   define([gt_included_intl],
91     ifelse([$1], [external],
92       ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
93       [yes]))
94   define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
95   gt_NEEDS_INIT
96   AM_GNU_GETTEXT_NEED([$2])
97
98   AC_REQUIRE([AM_PO_SUBDIRS])dnl
99   ifelse(gt_included_intl, yes, [
100     AC_REQUIRE([AM_INTL_SUBDIR])dnl
101   ])
102
103   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
104   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
105   AC_REQUIRE([AC_LIB_RPATH])
106
107   dnl Sometimes libintl requires libiconv, so first search for libiconv.
108   dnl Ideally we would do this search only after the
109   dnl      if test "$USE_NLS" = "yes"; then
110   dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
111   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
112   dnl the configure script would need to contain the same shell code
113   dnl again, outside any 'if'. There are two solutions:
114   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
115   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
116   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
117   dnl documented, we avoid it.
118   ifelse(gt_included_intl, yes, , [
119     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
120   ])
121
122   dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
123   gt_INTL_MACOSX
124
125   dnl Set USE_NLS.
126   AC_REQUIRE([AM_NLS])
127
128   ifelse(gt_included_intl, yes, [
129     BUILD_INCLUDED_LIBINTL=no
130     USE_INCLUDED_LIBINTL=no
131   ])
132   LIBINTL=
133   LTLIBINTL=
134   POSUB=
135
136   dnl Add a version number to the cache macros.
137   case " $gt_needs " in
138     *" need-formatstring-macros "*) gt_api_version=3 ;;
139     *" need-ngettext "*) gt_api_version=2 ;;
140     *) gt_api_version=1 ;;
141   esac
142   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
143   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
144
145   dnl If we use NLS figure out what method
146   if test "$USE_NLS" = "yes"; then
147     gt_use_preinstalled_gnugettext=no
148     ifelse(gt_included_intl, yes, [
149       AC_MSG_CHECKING([whether included gettext is requested])
150       AC_ARG_WITH([included-gettext],
151         [  --with-included-gettext use the GNU gettext library included here],
152         nls_cv_force_use_gnu_gettext=$withval,
153         nls_cv_force_use_gnu_gettext=no)
154       AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
155
156       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
157       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
158     ])
159         dnl User does not insist on using GNU NLS library.  Figure out what
160         dnl to use.  If GNU gettext is available we use this.  Else we have
161         dnl to fall back to GNU NLS library.
162
163         if test $gt_api_version -ge 3; then
164           gt_revision_test_code='
165 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
166 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
167 #endif
168 changequote(,)dnl
169 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
170 changequote([,])dnl
171 '
172         else
173           gt_revision_test_code=
174         fi
175         if test $gt_api_version -ge 2; then
176           gt_expression_test_code=' + * ngettext ("", "", 0)'
177         else
178           gt_expression_test_code=
179         fi
180
181         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
182          [AC_LINK_IFELSE(
183             [AC_LANG_PROGRAM(
184                [[
185 #include <libintl.h>
186 $gt_revision_test_code
187 extern int _nl_msg_cat_cntr;
188 extern int *_nl_domain_bindings;
189                ]],
190                [[
191 bindtextdomain ("", "");
192 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
193                ]])],
194             [eval "$gt_func_gnugettext_libc=yes"],
195             [eval "$gt_func_gnugettext_libc=no"])])
196
197         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
198           dnl Sometimes libintl requires libiconv, so first search for libiconv.
199           ifelse(gt_included_intl, yes, , [
200             AM_ICONV_LINK
201           ])
202           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
203           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
204           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
205           dnl even if libiconv doesn't exist.
206           AC_LIB_LINKFLAGS_BODY([intl])
207           AC_CACHE_CHECK([for GNU gettext in libintl],
208             [$gt_func_gnugettext_libintl],
209            [gt_save_CPPFLAGS="$CPPFLAGS"
210             CPPFLAGS="$CPPFLAGS $INCINTL"
211             gt_save_LIBS="$LIBS"
212             LIBS="$LIBS $LIBINTL"
213             dnl Now see whether libintl exists and does not depend on libiconv.
214             AC_LINK_IFELSE(
215               [AC_LANG_PROGRAM(
216                  [[
217 #include <libintl.h>
218 $gt_revision_test_code
219 extern int _nl_msg_cat_cntr;
220 extern
221 #ifdef __cplusplus
222 "C"
223 #endif
224 const char *_nl_expand_alias (const char *);
225                  ]],
226                  [[
227 bindtextdomain ("", "");
228 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
229                  ]])],
230               [eval "$gt_func_gnugettext_libintl=yes"],
231               [eval "$gt_func_gnugettext_libintl=no"])
232             dnl Now see whether libintl exists and depends on libiconv.
233             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
234               LIBS="$LIBS $LIBICONV"
235               AC_LINK_IFELSE(
236                 [AC_LANG_PROGRAM(
237                    [[
238 #include <libintl.h>
239 $gt_revision_test_code
240 extern int _nl_msg_cat_cntr;
241 extern
242 #ifdef __cplusplus
243 "C"
244 #endif
245 const char *_nl_expand_alias (const char *);
246                    ]],
247                    [[
248 bindtextdomain ("", "");
249 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
250                    ]])],
251                 [LIBINTL="$LIBINTL $LIBICONV"
252                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
253                  eval "$gt_func_gnugettext_libintl=yes"
254                 ])
255             fi
256             CPPFLAGS="$gt_save_CPPFLAGS"
257             LIBS="$gt_save_LIBS"])
258         fi
259
260         dnl If an already present or preinstalled GNU gettext() is found,
261         dnl use it.  But if this macro is used in GNU gettext, and GNU
262         dnl gettext is already preinstalled in libintl, we update this
263         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
264         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
265            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
266                 && test "$PACKAGE" != gettext-runtime \
267                 && test "$PACKAGE" != gettext-tools; }; then
268           gt_use_preinstalled_gnugettext=yes
269         else
270           dnl Reset the values set by searching for libintl.
271           LIBINTL=
272           LTLIBINTL=
273           INCINTL=
274         fi
275
276     ifelse(gt_included_intl, yes, [
277         if test "$gt_use_preinstalled_gnugettext" != "yes"; then
278           dnl GNU gettext is not found in the C library.
279           dnl Fall back on included GNU gettext library.
280           nls_cv_use_gnu_gettext=yes
281         fi
282       fi
283
284       if test "$nls_cv_use_gnu_gettext" = "yes"; then
285         dnl Mark actions used to generate GNU NLS library.
286         BUILD_INCLUDED_LIBINTL=yes
287         USE_INCLUDED_LIBINTL=yes
288         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
289         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
290         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
291       fi
292
293       CATOBJEXT=
294       if test "$gt_use_preinstalled_gnugettext" = "yes" \
295          || test "$nls_cv_use_gnu_gettext" = "yes"; then
296         dnl Mark actions to use GNU gettext tools.
297         CATOBJEXT=.gmo
298       fi
299     ])
300
301     if test -n "$INTL_MACOSX_LIBS"; then
302       if test "$gt_use_preinstalled_gnugettext" = "yes" \
303          || test "$nls_cv_use_gnu_gettext" = "yes"; then
304         dnl Some extra flags are needed during linking.
305         LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
306         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
307       fi
308     fi
309
310     if test "$gt_use_preinstalled_gnugettext" = "yes" \
311        || test "$nls_cv_use_gnu_gettext" = "yes"; then
312       AC_DEFINE([ENABLE_NLS], [1],
313         [Define to 1 if translation of program messages to the user's native language
314    is requested.])
315     else
316       USE_NLS=no
317     fi
318   fi
319
320   AC_MSG_CHECKING([whether to use NLS])
321   AC_MSG_RESULT([$USE_NLS])
322   if test "$USE_NLS" = "yes"; then
323     AC_MSG_CHECKING([where the gettext function comes from])
324     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
325       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
326         gt_source="external libintl"
327       else
328         gt_source="libc"
329       fi
330     else
331       gt_source="included intl directory"
332     fi
333     AC_MSG_RESULT([$gt_source])
334   fi
335
336   if test "$USE_NLS" = "yes"; then
337
338     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
339       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
340         AC_MSG_CHECKING([how to link with libintl])
341         AC_MSG_RESULT([$LIBINTL])
342         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
343       fi
344
345       dnl For backward compatibility. Some packages may be using this.
346       AC_DEFINE([HAVE_GETTEXT], [1],
347        [Define if the GNU gettext() function is already present or preinstalled.])
348       AC_DEFINE([HAVE_DCGETTEXT], [1],
349        [Define if the GNU dcgettext() function is already present or preinstalled.])
350     fi
351
352     dnl We need to process the po/ directory.
353     POSUB=po
354   fi
355
356   ifelse(gt_included_intl, yes, [
357     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
358     dnl to 'yes' because some of the testsuite requires it.
359     if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
360       BUILD_INCLUDED_LIBINTL=yes
361     fi
362
363     dnl Make all variables we use known to autoconf.
364     AC_SUBST([BUILD_INCLUDED_LIBINTL])
365     AC_SUBST([USE_INCLUDED_LIBINTL])
366     AC_SUBST([CATOBJEXT])
367
368     dnl For backward compatibility. Some configure.ins may be using this.
369     nls_cv_header_intl=
370     nls_cv_header_libgt=
371
372     dnl For backward compatibility. Some Makefiles may be using this.
373     DATADIRNAME=share
374     AC_SUBST([DATADIRNAME])
375
376     dnl For backward compatibility. Some Makefiles may be using this.
377     INSTOBJEXT=.mo
378     AC_SUBST([INSTOBJEXT])
379
380     dnl For backward compatibility. Some Makefiles may be using this.
381     GENCAT=gencat
382     AC_SUBST([GENCAT])
383
384     dnl For backward compatibility. Some Makefiles may be using this.
385     INTLOBJS=
386     if test "$USE_INCLUDED_LIBINTL" = yes; then
387       INTLOBJS="\$(GETTOBJS)"
388     fi
389     AC_SUBST([INTLOBJS])
390
391     dnl Enable libtool support if the surrounding package wishes it.
392     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
393     AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
394   ])
395
396   dnl For backward compatibility. Some Makefiles may be using this.
397   INTLLIBS="$LIBINTL"
398   AC_SUBST([INTLLIBS])
399
400   dnl Make all documented variables known to autoconf.
401   AC_SUBST([LIBINTL])
402   AC_SUBST([LTLIBINTL])
403   AC_SUBST([POSUB])
404 ])
405
406
407 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
408 m4_define([gt_NEEDS_INIT],
409 [
410   m4_divert_text([DEFAULTS], [gt_needs=])
411   m4_define([gt_NEEDS_INIT], [])
412 ])
413
414
415 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
416 AC_DEFUN([AM_GNU_GETTEXT_NEED],
417 [
418   m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
419 ])
420
421
422 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
423 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
424
425
426 dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
427 AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
428
429 dnl GLIB_GSETTINGS
430 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
431 dnl the schema should be compiled
432 dnl
433
434 AC_DEFUN([GLIB_GSETTINGS],
435 [
436   m4_pattern_allow([AM_V_GEN])
437   AC_ARG_ENABLE(schemas-compile,
438                 AS_HELP_STRING([--disable-schemas-compile],
439                                [Disable regeneration of gschemas.compiled on install]),
440                 [case ${enableval} in
441                   yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
442                   no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
443                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
444                  esac])
445   AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
446   PKG_PROG_PKG_CONFIG([0.16])
447   AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
448   if test x$cross_compiling != xyes; then
449     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
450   else
451     AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
452   fi
453   AC_SUBST(GLIB_COMPILE_SCHEMAS)
454   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
455     ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
456   else
457     ifelse([$1],,[:],[$1])
458   fi
459
460   GSETTINGS_RULES='
461 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
462
463 mostlyclean-am: clean-gsettings-schemas
464
465 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
466
467 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
468         $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
469
470 all-am: $(gsettings_SCHEMAS:.xml=.valid)
471 uninstall-am: uninstall-gsettings-schemas
472 install-data-am: install-gsettings-schemas
473
474 .SECONDARY: $(gsettings_SCHEMAS)
475
476 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
477         @$(NORMAL_INSTALL)
478         if test -n "$^"; then \
479                 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
480                 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
481                 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
482         fi
483
484 uninstall-gsettings-schemas:
485         @$(NORMAL_UNINSTALL)
486         @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
487         files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
488         test -n "$$files" || exit 0; \
489         echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
490         cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
491         test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
492
493 clean-gsettings-schemas:
494         rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
495
496 ifdef gsettings_ENUM_NAMESPACE
497 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
498         $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
499 endif
500 '
501   _GSETTINGS_SUBST(GSETTINGS_RULES)
502 ])
503
504 dnl _GSETTINGS_SUBST(VARIABLE)
505 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
506 AC_DEFUN([_GSETTINGS_SUBST],
507 [
508 AC_SUBST([$1])
509 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
510 ]
511 )
512
513 # iconv.m4 serial 19 (gettext-0.18.2)
514 dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
515 dnl This file is free software; the Free Software Foundation
516 dnl gives unlimited permission to copy and/or distribute it,
517 dnl with or without modifications, as long as this notice is preserved.
518
519 dnl From Bruno Haible.
520
521 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
522 [
523   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
524   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
525   AC_REQUIRE([AC_LIB_RPATH])
526
527   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
528   dnl accordingly.
529   AC_LIB_LINKFLAGS_BODY([iconv])
530 ])
531
532 AC_DEFUN([AM_ICONV_LINK],
533 [
534   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
535   dnl those with the standalone portable GNU libiconv installed).
536   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
537
538   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
539   dnl accordingly.
540   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
541
542   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
543   dnl because if the user has installed libiconv and not disabled its use
544   dnl via --without-libiconv-prefix, he wants to use it. The first
545   dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
546   am_save_CPPFLAGS="$CPPFLAGS"
547   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
548
549   AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
550     am_cv_func_iconv="no, consider installing GNU libiconv"
551     am_cv_lib_iconv=no
552     AC_LINK_IFELSE(
553       [AC_LANG_PROGRAM(
554          [[
555 #include <stdlib.h>
556 #include <iconv.h>
557          ]],
558          [[iconv_t cd = iconv_open("","");
559            iconv(cd,NULL,NULL,NULL,NULL);
560            iconv_close(cd);]])],
561       [am_cv_func_iconv=yes])
562     if test "$am_cv_func_iconv" != yes; then
563       am_save_LIBS="$LIBS"
564       LIBS="$LIBS $LIBICONV"
565       AC_LINK_IFELSE(
566         [AC_LANG_PROGRAM(
567            [[
568 #include <stdlib.h>
569 #include <iconv.h>
570            ]],
571            [[iconv_t cd = iconv_open("","");
572              iconv(cd,NULL,NULL,NULL,NULL);
573              iconv_close(cd);]])],
574         [am_cv_lib_iconv=yes]
575         [am_cv_func_iconv=yes])
576       LIBS="$am_save_LIBS"
577     fi
578   ])
579   if test "$am_cv_func_iconv" = yes; then
580     AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
581       dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
582       dnl Solaris 10.
583       am_save_LIBS="$LIBS"
584       if test $am_cv_lib_iconv = yes; then
585         LIBS="$LIBS $LIBICONV"
586       fi
587       am_cv_func_iconv_works=no
588       for ac_iconv_const in '' 'const'; do
589         AC_RUN_IFELSE(
590           [AC_LANG_PROGRAM(
591              [[
592 #include <iconv.h>
593 #include <string.h>
594
595 #ifndef ICONV_CONST
596 # define ICONV_CONST $ac_iconv_const
597 #endif
598              ]],
599              [[int result = 0;
600   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
601      returns.  */
602   {
603     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
604     if (cd_utf8_to_88591 != (iconv_t)(-1))
605       {
606         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
607         char buf[10];
608         ICONV_CONST char *inptr = input;
609         size_t inbytesleft = strlen (input);
610         char *outptr = buf;
611         size_t outbytesleft = sizeof (buf);
612         size_t res = iconv (cd_utf8_to_88591,
613                             &inptr, &inbytesleft,
614                             &outptr, &outbytesleft);
615         if (res == 0)
616           result |= 1;
617         iconv_close (cd_utf8_to_88591);
618       }
619   }
620   /* Test against Solaris 10 bug: Failures are not distinguishable from
621      successful returns.  */
622   {
623     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
624     if (cd_ascii_to_88591 != (iconv_t)(-1))
625       {
626         static ICONV_CONST char input[] = "\263";
627         char buf[10];
628         ICONV_CONST char *inptr = input;
629         size_t inbytesleft = strlen (input);
630         char *outptr = buf;
631         size_t outbytesleft = sizeof (buf);
632         size_t res = iconv (cd_ascii_to_88591,
633                             &inptr, &inbytesleft,
634                             &outptr, &outbytesleft);
635         if (res == 0)
636           result |= 2;
637         iconv_close (cd_ascii_to_88591);
638       }
639   }
640   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
641   {
642     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
643     if (cd_88591_to_utf8 != (iconv_t)(-1))
644       {
645         static ICONV_CONST char input[] = "\304";
646         static char buf[2] = { (char)0xDE, (char)0xAD };
647         ICONV_CONST char *inptr = input;
648         size_t inbytesleft = 1;
649         char *outptr = buf;
650         size_t outbytesleft = 1;
651         size_t res = iconv (cd_88591_to_utf8,
652                             &inptr, &inbytesleft,
653                             &outptr, &outbytesleft);
654         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
655           result |= 4;
656         iconv_close (cd_88591_to_utf8);
657       }
658   }
659 #if 0 /* This bug could be worked around by the caller.  */
660   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
661   {
662     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
663     if (cd_88591_to_utf8 != (iconv_t)(-1))
664       {
665         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
666         char buf[50];
667         ICONV_CONST char *inptr = input;
668         size_t inbytesleft = strlen (input);
669         char *outptr = buf;
670         size_t outbytesleft = sizeof (buf);
671         size_t res = iconv (cd_88591_to_utf8,
672                             &inptr, &inbytesleft,
673                             &outptr, &outbytesleft);
674         if ((int)res > 0)
675           result |= 8;
676         iconv_close (cd_88591_to_utf8);
677       }
678   }
679 #endif
680   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
681      provided.  */
682   if (/* Try standardized names.  */
683       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
684       /* Try IRIX, OSF/1 names.  */
685       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
686       /* Try AIX names.  */
687       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
688       /* Try HP-UX names.  */
689       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
690     result |= 16;
691   return result;
692 ]])],
693           [am_cv_func_iconv_works=yes], ,
694           [case "$host_os" in
695              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
696              *)            am_cv_func_iconv_works="guessing yes" ;;
697            esac])
698         test "$am_cv_func_iconv_works" = no || break
699       done
700       LIBS="$am_save_LIBS"
701     ])
702     case "$am_cv_func_iconv_works" in
703       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
704       *)   am_func_iconv=yes ;;
705     esac
706   else
707     am_func_iconv=no am_cv_lib_iconv=no
708   fi
709   if test "$am_func_iconv" = yes; then
710     AC_DEFINE([HAVE_ICONV], [1],
711       [Define if you have the iconv() function and it works.])
712   fi
713   if test "$am_cv_lib_iconv" = yes; then
714     AC_MSG_CHECKING([how to link with libiconv])
715     AC_MSG_RESULT([$LIBICONV])
716   else
717     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
718     dnl either.
719     CPPFLAGS="$am_save_CPPFLAGS"
720     LIBICONV=
721     LTLIBICONV=
722   fi
723   AC_SUBST([LIBICONV])
724   AC_SUBST([LTLIBICONV])
725 ])
726
727 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
728 dnl avoid warnings like
729 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
730 dnl This is tricky because of the way 'aclocal' is implemented:
731 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
732 dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
733 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
734 dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
735 dnl   warnings.
736 m4_define([gl_iconv_AC_DEFUN],
737   m4_version_prereq([2.64],
738     [[AC_DEFUN_ONCE(
739         [$1], [$2])]],
740     [m4_ifdef([gl_00GNULIB],
741        [[AC_DEFUN_ONCE(
742            [$1], [$2])]],
743        [[AC_DEFUN(
744            [$1], [$2])]])]))
745 gl_iconv_AC_DEFUN([AM_ICONV],
746 [
747   AM_ICONV_LINK
748   if test "$am_cv_func_iconv" = yes; then
749     AC_MSG_CHECKING([for iconv declaration])
750     AC_CACHE_VAL([am_cv_proto_iconv], [
751       AC_COMPILE_IFELSE(
752         [AC_LANG_PROGRAM(
753            [[
754 #include <stdlib.h>
755 #include <iconv.h>
756 extern
757 #ifdef __cplusplus
758 "C"
759 #endif
760 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
761 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
762 #else
763 size_t iconv();
764 #endif
765            ]],
766            [[]])],
767         [am_cv_proto_iconv_arg1=""],
768         [am_cv_proto_iconv_arg1="const"])
769       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);"])
770     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
771     AC_MSG_RESULT([
772          $am_cv_proto_iconv])
773     AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
774       [Define as const if the declaration of iconv() needs const.])
775     dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
776     m4_ifdef([gl_ICONV_H_DEFAULTS],
777       [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
778        if test -n "$am_cv_proto_iconv_arg1"; then
779          ICONV_CONST="const"
780        fi
781       ])
782   fi
783 ])
784
785 # intlmacosx.m4 serial 5 (gettext-0.18.2)
786 dnl Copyright (C) 2004-2014 Free Software Foundation, Inc.
787 dnl This file is free software; the Free Software Foundation
788 dnl gives unlimited permission to copy and/or distribute it,
789 dnl with or without modifications, as long as this notice is preserved.
790 dnl
791 dnl This file can be used in projects which are not available under
792 dnl the GNU General Public License or the GNU Library General Public
793 dnl License but which still want to provide support for the GNU gettext
794 dnl functionality.
795 dnl Please note that the actual code of the GNU gettext library is covered
796 dnl by the GNU Library General Public License, and the rest of the GNU
797 dnl gettext package is covered by the GNU General Public License.
798 dnl They are *not* in the public domain.
799
800 dnl Checks for special options needed on Mac OS X.
801 dnl Defines INTL_MACOSX_LIBS.
802 AC_DEFUN([gt_INTL_MACOSX],
803 [
804   dnl Check for API introduced in Mac OS X 10.2.
805   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
806     [gt_cv_func_CFPreferencesCopyAppValue],
807     [gt_save_LIBS="$LIBS"
808      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
809      AC_LINK_IFELSE(
810        [AC_LANG_PROGRAM(
811           [[#include <CoreFoundation/CFPreferences.h>]],
812           [[CFPreferencesCopyAppValue(NULL, NULL)]])],
813        [gt_cv_func_CFPreferencesCopyAppValue=yes],
814        [gt_cv_func_CFPreferencesCopyAppValue=no])
815      LIBS="$gt_save_LIBS"])
816   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
817     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
818       [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
819   fi
820   dnl Check for API introduced in Mac OS X 10.3.
821   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
822     [gt_save_LIBS="$LIBS"
823      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
824      AC_LINK_IFELSE(
825        [AC_LANG_PROGRAM(
826           [[#include <CoreFoundation/CFLocale.h>]],
827           [[CFLocaleCopyCurrent();]])],
828        [gt_cv_func_CFLocaleCopyCurrent=yes],
829        [gt_cv_func_CFLocaleCopyCurrent=no])
830      LIBS="$gt_save_LIBS"])
831   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
832     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
833       [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
834   fi
835   INTL_MACOSX_LIBS=
836   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
837     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
838   fi
839   AC_SUBST([INTL_MACOSX_LIBS])
840 ])
841
842 # lib-ld.m4 serial 6
843 dnl Copyright (C) 1996-2003, 2009-2015 Free Software Foundation, Inc.
844 dnl This file is free software; the Free Software Foundation
845 dnl gives unlimited permission to copy and/or distribute it,
846 dnl with or without modifications, as long as this notice is preserved.
847
848 dnl Subroutines of libtool.m4,
849 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
850 dnl collision with libtool.m4.
851
852 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
853 AC_DEFUN([AC_LIB_PROG_LD_GNU],
854 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
855 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
856 case `$LD -v 2>&1 </dev/null` in
857 *GNU* | *'with BFD'*)
858   acl_cv_prog_gnu_ld=yes
859   ;;
860 *)
861   acl_cv_prog_gnu_ld=no
862   ;;
863 esac])
864 with_gnu_ld=$acl_cv_prog_gnu_ld
865 ])
866
867 dnl From libtool-2.4. Sets the variable LD.
868 AC_DEFUN([AC_LIB_PROG_LD],
869 [AC_REQUIRE([AC_PROG_CC])dnl
870 AC_REQUIRE([AC_CANONICAL_HOST])dnl
871
872 AC_ARG_WITH([gnu-ld],
873     [AS_HELP_STRING([--with-gnu-ld],
874         [assume the C compiler uses GNU ld [default=no]])],
875     [test "$withval" = no || with_gnu_ld=yes],
876     [with_gnu_ld=no])dnl
877
878 # Prepare PATH_SEPARATOR.
879 # The user is always right.
880 if test "${PATH_SEPARATOR+set}" != set; then
881   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
882   # contains only /bin. Note that ksh looks also at the FPATH variable,
883   # so we have to set that as well for the test.
884   PATH_SEPARATOR=:
885   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
886     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
887            || PATH_SEPARATOR=';'
888        }
889 fi
890
891 ac_prog=ld
892 if test "$GCC" = yes; then
893   # Check if gcc -print-prog-name=ld gives a path.
894   AC_MSG_CHECKING([for ld used by $CC])
895   case $host in
896   *-*-mingw*)
897     # gcc leaves a trailing carriage return which upsets mingw
898     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
899   *)
900     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
901   esac
902   case $ac_prog in
903     # Accept absolute paths.
904     [[\\/]]* | ?:[[\\/]]*)
905       re_direlt='/[[^/]][[^/]]*/\.\./'
906       # Canonicalize the pathname of ld
907       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
908       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
909         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
910       done
911       test -z "$LD" && LD="$ac_prog"
912       ;;
913   "")
914     # If it fails, then pretend we aren't using GCC.
915     ac_prog=ld
916     ;;
917   *)
918     # If it is relative, then search for the first ld in PATH.
919     with_gnu_ld=unknown
920     ;;
921   esac
922 elif test "$with_gnu_ld" = yes; then
923   AC_MSG_CHECKING([for GNU ld])
924 else
925   AC_MSG_CHECKING([for non-GNU ld])
926 fi
927 AC_CACHE_VAL([acl_cv_path_LD],
928 [if test -z "$LD"; then
929   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
930   for ac_dir in $PATH; do
931     IFS="$acl_save_ifs"
932     test -z "$ac_dir" && ac_dir=.
933     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
934       acl_cv_path_LD="$ac_dir/$ac_prog"
935       # Check to see if the program is GNU ld.  I'd rather use --version,
936       # but apparently some variants of GNU ld only accept -v.
937       # Break only if it was the GNU/non-GNU ld that we prefer.
938       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
939       *GNU* | *'with BFD'*)
940         test "$with_gnu_ld" != no && break
941         ;;
942       *)
943         test "$with_gnu_ld" != yes && break
944         ;;
945       esac
946     fi
947   done
948   IFS="$acl_save_ifs"
949 else
950   acl_cv_path_LD="$LD" # Let the user override the test with a path.
951 fi])
952 LD="$acl_cv_path_LD"
953 if test -n "$LD"; then
954   AC_MSG_RESULT([$LD])
955 else
956   AC_MSG_RESULT([no])
957 fi
958 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
959 AC_LIB_PROG_LD_GNU
960 ])
961
962 # lib-link.m4 serial 26 (gettext-0.18.2)
963 dnl Copyright (C) 2001-2015 Free Software Foundation, Inc.
964 dnl This file is free software; the Free Software Foundation
965 dnl gives unlimited permission to copy and/or distribute it,
966 dnl with or without modifications, as long as this notice is preserved.
967
968 dnl From Bruno Haible.
969
970 AC_PREREQ([2.54])
971
972 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
973 dnl the libraries corresponding to explicit and implicit dependencies.
974 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
975 dnl augments the CPPFLAGS variable.
976 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
977 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
978 AC_DEFUN([AC_LIB_LINKFLAGS],
979 [
980   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
981   AC_REQUIRE([AC_LIB_RPATH])
982   pushdef([Name],[m4_translit([$1],[./+-], [____])])
983   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
984                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
985   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
986     AC_LIB_LINKFLAGS_BODY([$1], [$2])
987     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
988     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
989     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
990     ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
991   ])
992   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
993   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
994   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
995   LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
996   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
997   AC_SUBST([LIB]NAME)
998   AC_SUBST([LTLIB]NAME)
999   AC_SUBST([LIB]NAME[_PREFIX])
1000   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1001   dnl results of this search when this library appears as a dependency.
1002   HAVE_LIB[]NAME=yes
1003   popdef([NAME])
1004   popdef([Name])
1005 ])
1006
1007 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1008 dnl searches for libname and the libraries corresponding to explicit and
1009 dnl implicit dependencies, together with the specified include files and
1010 dnl the ability to compile and link the specified testcode. The missing-message
1011 dnl defaults to 'no' and may contain additional hints for the user.
1012 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1013 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1014 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1015 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1016 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1017 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1018 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1019 [
1020   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1021   AC_REQUIRE([AC_LIB_RPATH])
1022   pushdef([Name],[m4_translit([$1],[./+-], [____])])
1023   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1024                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1025
1026   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1027   dnl accordingly.
1028   AC_LIB_LINKFLAGS_BODY([$1], [$2])
1029
1030   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1031   dnl because if the user has installed lib[]Name and not disabled its use
1032   dnl via --without-lib[]Name-prefix, he wants to use it.
1033   ac_save_CPPFLAGS="$CPPFLAGS"
1034   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1035
1036   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1037     ac_save_LIBS="$LIBS"
1038     dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1039     dnl because these -l options might require -L options that are present in
1040     dnl LIBS. -l options benefit only from the -L options listed before it.
1041     dnl Otherwise, add it to the front of LIBS, because it may be a static
1042     dnl library that depends on another static library that is present in LIBS.
1043     dnl Static libraries benefit only from the static libraries listed after
1044     dnl it.
1045     case " $LIB[]NAME" in
1046       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1047       *)       LIBS="$LIB[]NAME $LIBS" ;;
1048     esac
1049     AC_LINK_IFELSE(
1050       [AC_LANG_PROGRAM([[$3]], [[$4]])],
1051       [ac_cv_lib[]Name=yes],
1052       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1053     LIBS="$ac_save_LIBS"
1054   ])
1055   if test "$ac_cv_lib[]Name" = yes; then
1056     HAVE_LIB[]NAME=yes
1057     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1058     AC_MSG_CHECKING([how to link with lib[]$1])
1059     AC_MSG_RESULT([$LIB[]NAME])
1060   else
1061     HAVE_LIB[]NAME=no
1062     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1063     dnl $INC[]NAME either.
1064     CPPFLAGS="$ac_save_CPPFLAGS"
1065     LIB[]NAME=
1066     LTLIB[]NAME=
1067     LIB[]NAME[]_PREFIX=
1068   fi
1069   AC_SUBST([HAVE_LIB]NAME)
1070   AC_SUBST([LIB]NAME)
1071   AC_SUBST([LTLIB]NAME)
1072   AC_SUBST([LIB]NAME[_PREFIX])
1073   popdef([NAME])
1074   popdef([Name])
1075 ])
1076
1077 dnl Determine the platform dependent parameters needed to use rpath:
1078 dnl   acl_libext,
1079 dnl   acl_shlibext,
1080 dnl   acl_libname_spec,
1081 dnl   acl_library_names_spec,
1082 dnl   acl_hardcode_libdir_flag_spec,
1083 dnl   acl_hardcode_libdir_separator,
1084 dnl   acl_hardcode_direct,
1085 dnl   acl_hardcode_minus_L.
1086 AC_DEFUN([AC_LIB_RPATH],
1087 [
1088   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1089   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1090   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1091   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
1092   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
1093   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1094   AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1095     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1096     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1097     . ./conftest.sh
1098     rm -f ./conftest.sh
1099     acl_cv_rpath=done
1100   ])
1101   wl="$acl_cv_wl"
1102   acl_libext="$acl_cv_libext"
1103   acl_shlibext="$acl_cv_shlibext"
1104   acl_libname_spec="$acl_cv_libname_spec"
1105   acl_library_names_spec="$acl_cv_library_names_spec"
1106   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1107   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1108   acl_hardcode_direct="$acl_cv_hardcode_direct"
1109   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1110   dnl Determine whether the user wants rpath handling at all.
1111   AC_ARG_ENABLE([rpath],
1112     [  --disable-rpath         do not hardcode runtime library paths],
1113     :, enable_rpath=yes)
1114 ])
1115
1116 dnl AC_LIB_FROMPACKAGE(name, package)
1117 dnl declares that libname comes from the given package. The configure file
1118 dnl will then not have a --with-libname-prefix option but a
1119 dnl --with-package-prefix option. Several libraries can come from the same
1120 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1121 dnl macro call that searches for libname.
1122 AC_DEFUN([AC_LIB_FROMPACKAGE],
1123 [
1124   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1125                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1126   define([acl_frompackage_]NAME, [$2])
1127   popdef([NAME])
1128   pushdef([PACK],[$2])
1129   pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1130                                      [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1131   define([acl_libsinpackage_]PACKUP,
1132     m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
1133   popdef([PACKUP])
1134   popdef([PACK])
1135 ])
1136
1137 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1138 dnl the libraries corresponding to explicit and implicit dependencies.
1139 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1140 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1141 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1142 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1143 [
1144   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1145   pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1146                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1147   pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1148   pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1149                                      [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1150   pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1151   dnl Autoconf >= 2.61 supports dots in --with options.
1152   pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
1153   dnl By default, look in $includedir and $libdir.
1154   use_additional=yes
1155   AC_LIB_WITH_FINAL_PREFIX([
1156     eval additional_includedir=\"$includedir\"
1157     eval additional_libdir=\"$libdir\"
1158   ])
1159   AC_ARG_WITH(P_A_C_K[-prefix],
1160 [[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
1161   --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
1162 [
1163     if test "X$withval" = "Xno"; then
1164       use_additional=no
1165     else
1166       if test "X$withval" = "X"; then
1167         AC_LIB_WITH_FINAL_PREFIX([
1168           eval additional_includedir=\"$includedir\"
1169           eval additional_libdir=\"$libdir\"
1170         ])
1171       else
1172         additional_includedir="$withval/include"
1173         additional_libdir="$withval/$acl_libdirstem"
1174         if test "$acl_libdirstem2" != "$acl_libdirstem" \
1175            && ! test -d "$withval/$acl_libdirstem"; then
1176           additional_libdir="$withval/$acl_libdirstem2"
1177         fi
1178       fi
1179     fi
1180 ])
1181   dnl Search the library and its dependencies in $additional_libdir and
1182   dnl $LDFLAGS. Using breadth-first-seach.
1183   LIB[]NAME=
1184   LTLIB[]NAME=
1185   INC[]NAME=
1186   LIB[]NAME[]_PREFIX=
1187   dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1188   dnl computed. So it has to be reset here.
1189   HAVE_LIB[]NAME=
1190   rpathdirs=
1191   ltrpathdirs=
1192   names_already_handled=
1193   names_next_round='$1 $2'
1194   while test -n "$names_next_round"; do
1195     names_this_round="$names_next_round"
1196     names_next_round=
1197     for name in $names_this_round; do
1198       already_handled=
1199       for n in $names_already_handled; do
1200         if test "$n" = "$name"; then
1201           already_handled=yes
1202           break
1203         fi
1204       done
1205       if test -z "$already_handled"; then
1206         names_already_handled="$names_already_handled $name"
1207         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1208         dnl or AC_LIB_HAVE_LINKFLAGS call.
1209         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
1210         eval value=\"\$HAVE_LIB$uppername\"
1211         if test -n "$value"; then
1212           if test "$value" = yes; then
1213             eval value=\"\$LIB$uppername\"
1214             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1215             eval value=\"\$LTLIB$uppername\"
1216             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1217           else
1218             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1219             dnl that this library doesn't exist. So just drop it.
1220             :
1221           fi
1222         else
1223           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1224           dnl and the already constructed $LIBNAME/$LTLIBNAME.
1225           found_dir=
1226           found_la=
1227           found_so=
1228           found_a=
1229           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
1230           if test -n "$acl_shlibext"; then
1231             shrext=".$acl_shlibext"             # typically: shrext=.so
1232           else
1233             shrext=
1234           fi
1235           if test $use_additional = yes; then
1236             dir="$additional_libdir"
1237             dnl The same code as in the loop below:
1238             dnl First look for a shared library.
1239             if test -n "$acl_shlibext"; then
1240               if test -f "$dir/$libname$shrext"; then
1241                 found_dir="$dir"
1242                 found_so="$dir/$libname$shrext"
1243               else
1244                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1245                   ver=`(cd "$dir" && \
1246                         for f in "$libname$shrext".*; do echo "$f"; done \
1247                         | sed -e "s,^$libname$shrext\\\\.,," \
1248                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1249                         | sed 1q ) 2>/dev/null`
1250                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1251                     found_dir="$dir"
1252                     found_so="$dir/$libname$shrext.$ver"
1253                   fi
1254                 else
1255                   eval library_names=\"$acl_library_names_spec\"
1256                   for f in $library_names; do
1257                     if test -f "$dir/$f"; then
1258                       found_dir="$dir"
1259                       found_so="$dir/$f"
1260                       break
1261                     fi
1262                   done
1263                 fi
1264               fi
1265             fi
1266             dnl Then look for a static library.
1267             if test "X$found_dir" = "X"; then
1268               if test -f "$dir/$libname.$acl_libext"; then
1269                 found_dir="$dir"
1270                 found_a="$dir/$libname.$acl_libext"
1271               fi
1272             fi
1273             if test "X$found_dir" != "X"; then
1274               if test -f "$dir/$libname.la"; then
1275                 found_la="$dir/$libname.la"
1276               fi
1277             fi
1278           fi
1279           if test "X$found_dir" = "X"; then
1280             for x in $LDFLAGS $LTLIB[]NAME; do
1281               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1282               case "$x" in
1283                 -L*)
1284                   dir=`echo "X$x" | sed -e 's/^X-L//'`
1285                   dnl First look for a shared library.
1286                   if test -n "$acl_shlibext"; then
1287                     if test -f "$dir/$libname$shrext"; then
1288                       found_dir="$dir"
1289                       found_so="$dir/$libname$shrext"
1290                     else
1291                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1292                         ver=`(cd "$dir" && \
1293                               for f in "$libname$shrext".*; do echo "$f"; done \
1294                               | sed -e "s,^$libname$shrext\\\\.,," \
1295                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1296                               | sed 1q ) 2>/dev/null`
1297                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1298                           found_dir="$dir"
1299                           found_so="$dir/$libname$shrext.$ver"
1300                         fi
1301                       else
1302                         eval library_names=\"$acl_library_names_spec\"
1303                         for f in $library_names; do
1304                           if test -f "$dir/$f"; then
1305                             found_dir="$dir"
1306                             found_so="$dir/$f"
1307                             break
1308                           fi
1309                         done
1310                       fi
1311                     fi
1312                   fi
1313                   dnl Then look for a static library.
1314                   if test "X$found_dir" = "X"; then
1315                     if test -f "$dir/$libname.$acl_libext"; then
1316                       found_dir="$dir"
1317                       found_a="$dir/$libname.$acl_libext"
1318                     fi
1319                   fi
1320                   if test "X$found_dir" != "X"; then
1321                     if test -f "$dir/$libname.la"; then
1322                       found_la="$dir/$libname.la"
1323                     fi
1324                   fi
1325                   ;;
1326               esac
1327               if test "X$found_dir" != "X"; then
1328                 break
1329               fi
1330             done
1331           fi
1332           if test "X$found_dir" != "X"; then
1333             dnl Found the library.
1334             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1335             if test "X$found_so" != "X"; then
1336               dnl Linking with a shared library. We attempt to hardcode its
1337               dnl directory into the executable's runpath, unless it's the
1338               dnl standard /usr/lib.
1339               if test "$enable_rpath" = no \
1340                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1341                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1342                 dnl No hardcoding is needed.
1343                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1344               else
1345                 dnl Use an explicit option to hardcode DIR into the resulting
1346                 dnl binary.
1347                 dnl Potentially add DIR to ltrpathdirs.
1348                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1349                 haveit=
1350                 for x in $ltrpathdirs; do
1351                   if test "X$x" = "X$found_dir"; then
1352                     haveit=yes
1353                     break
1354                   fi
1355                 done
1356                 if test -z "$haveit"; then
1357                   ltrpathdirs="$ltrpathdirs $found_dir"
1358                 fi
1359                 dnl The hardcoding into $LIBNAME is system dependent.
1360                 if test "$acl_hardcode_direct" = yes; then
1361                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1362                   dnl resulting binary.
1363                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1364                 else
1365                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1366                     dnl Use an explicit option to hardcode DIR into the resulting
1367                     dnl binary.
1368                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1369                     dnl Potentially add DIR to rpathdirs.
1370                     dnl The rpathdirs will be appended to $LIBNAME at the end.
1371                     haveit=
1372                     for x in $rpathdirs; do
1373                       if test "X$x" = "X$found_dir"; then
1374                         haveit=yes
1375                         break
1376                       fi
1377                     done
1378                     if test -z "$haveit"; then
1379                       rpathdirs="$rpathdirs $found_dir"
1380                     fi
1381                   else
1382                     dnl Rely on "-L$found_dir".
1383                     dnl But don't add it if it's already contained in the LDFLAGS
1384                     dnl or the already constructed $LIBNAME
1385                     haveit=
1386                     for x in $LDFLAGS $LIB[]NAME; do
1387                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1388                       if test "X$x" = "X-L$found_dir"; then
1389                         haveit=yes
1390                         break
1391                       fi
1392                     done
1393                     if test -z "$haveit"; then
1394                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1395                     fi
1396                     if test "$acl_hardcode_minus_L" != no; then
1397                       dnl FIXME: Not sure whether we should use
1398                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1399                       dnl here.
1400                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1401                     else
1402                       dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1403                       dnl here, because this doesn't fit in flags passed to the
1404                       dnl compiler. So give up. No hardcoding. This affects only
1405                       dnl very old systems.
1406                       dnl FIXME: Not sure whether we should use
1407                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1408                       dnl here.
1409                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1410                     fi
1411                   fi
1412                 fi
1413               fi
1414             else
1415               if test "X$found_a" != "X"; then
1416                 dnl Linking with a static library.
1417                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1418               else
1419                 dnl We shouldn't come here, but anyway it's good to have a
1420                 dnl fallback.
1421                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1422               fi
1423             fi
1424             dnl Assume the include files are nearby.
1425             additional_includedir=
1426             case "$found_dir" in
1427               */$acl_libdirstem | */$acl_libdirstem/)
1428                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1429                 if test "$name" = '$1'; then
1430                   LIB[]NAME[]_PREFIX="$basedir"
1431                 fi
1432                 additional_includedir="$basedir/include"
1433                 ;;
1434               */$acl_libdirstem2 | */$acl_libdirstem2/)
1435                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1436                 if test "$name" = '$1'; then
1437                   LIB[]NAME[]_PREFIX="$basedir"
1438                 fi
1439                 additional_includedir="$basedir/include"
1440                 ;;
1441             esac
1442             if test "X$additional_includedir" != "X"; then
1443               dnl Potentially add $additional_includedir to $INCNAME.
1444               dnl But don't add it
1445               dnl   1. if it's the standard /usr/include,
1446               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1447               dnl   3. if it's already present in $CPPFLAGS or the already
1448               dnl      constructed $INCNAME,
1449               dnl   4. if it doesn't exist as a directory.
1450               if test "X$additional_includedir" != "X/usr/include"; then
1451                 haveit=
1452                 if test "X$additional_includedir" = "X/usr/local/include"; then
1453                   if test -n "$GCC"; then
1454                     case $host_os in
1455                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1456                     esac
1457                   fi
1458                 fi
1459                 if test -z "$haveit"; then
1460                   for x in $CPPFLAGS $INC[]NAME; do
1461                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1462                     if test "X$x" = "X-I$additional_includedir"; then
1463                       haveit=yes
1464                       break
1465                     fi
1466                   done
1467                   if test -z "$haveit"; then
1468                     if test -d "$additional_includedir"; then
1469                       dnl Really add $additional_includedir to $INCNAME.
1470                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1471                     fi
1472                   fi
1473                 fi
1474               fi
1475             fi
1476             dnl Look for dependencies.
1477             if test -n "$found_la"; then
1478               dnl Read the .la file. It defines the variables
1479               dnl dlname, library_names, old_library, dependency_libs, current,
1480               dnl age, revision, installed, dlopen, dlpreopen, libdir.
1481               save_libdir="$libdir"
1482               case "$found_la" in
1483                 */* | *\\*) . "$found_la" ;;
1484                 *) . "./$found_la" ;;
1485               esac
1486               libdir="$save_libdir"
1487               dnl We use only dependency_libs.
1488               for dep in $dependency_libs; do
1489                 case "$dep" in
1490                   -L*)
1491                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1492                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1493                     dnl But don't add it
1494                     dnl   1. if it's the standard /usr/lib,
1495                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1496                     dnl   3. if it's already present in $LDFLAGS or the already
1497                     dnl      constructed $LIBNAME,
1498                     dnl   4. if it doesn't exist as a directory.
1499                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1500                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1501                       haveit=
1502                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1503                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1504                         if test -n "$GCC"; then
1505                           case $host_os in
1506                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1507                           esac
1508                         fi
1509                       fi
1510                       if test -z "$haveit"; then
1511                         haveit=
1512                         for x in $LDFLAGS $LIB[]NAME; do
1513                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1514                           if test "X$x" = "X-L$additional_libdir"; then
1515                             haveit=yes
1516                             break
1517                           fi
1518                         done
1519                         if test -z "$haveit"; then
1520                           if test -d "$additional_libdir"; then
1521                             dnl Really add $additional_libdir to $LIBNAME.
1522                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1523                           fi
1524                         fi
1525                         haveit=
1526                         for x in $LDFLAGS $LTLIB[]NAME; do
1527                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1528                           if test "X$x" = "X-L$additional_libdir"; then
1529                             haveit=yes
1530                             break
1531                           fi
1532                         done
1533                         if test -z "$haveit"; then
1534                           if test -d "$additional_libdir"; then
1535                             dnl Really add $additional_libdir to $LTLIBNAME.
1536                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1537                           fi
1538                         fi
1539                       fi
1540                     fi
1541                     ;;
1542                   -R*)
1543                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
1544                     if test "$enable_rpath" != no; then
1545                       dnl Potentially add DIR to rpathdirs.
1546                       dnl The rpathdirs will be appended to $LIBNAME at the end.
1547                       haveit=
1548                       for x in $rpathdirs; do
1549                         if test "X$x" = "X$dir"; then
1550                           haveit=yes
1551                           break
1552                         fi
1553                       done
1554                       if test -z "$haveit"; then
1555                         rpathdirs="$rpathdirs $dir"
1556                       fi
1557                       dnl Potentially add DIR to ltrpathdirs.
1558                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1559                       haveit=
1560                       for x in $ltrpathdirs; do
1561                         if test "X$x" = "X$dir"; then
1562                           haveit=yes
1563                           break
1564                         fi
1565                       done
1566                       if test -z "$haveit"; then
1567                         ltrpathdirs="$ltrpathdirs $dir"
1568                       fi
1569                     fi
1570                     ;;
1571                   -l*)
1572                     dnl Handle this in the next round.
1573                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1574                     ;;
1575                   *.la)
1576                     dnl Handle this in the next round. Throw away the .la's
1577                     dnl directory; it is already contained in a preceding -L
1578                     dnl option.
1579                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1580                     ;;
1581                   *)
1582                     dnl Most likely an immediate library name.
1583                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1584                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1585                     ;;
1586                 esac
1587               done
1588             fi
1589           else
1590             dnl Didn't find the library; assume it is in the system directories
1591             dnl known to the linker and runtime loader. (All the system
1592             dnl directories known to the linker should also be known to the
1593             dnl runtime loader, otherwise the system is severely misconfigured.)
1594             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1595             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1596           fi
1597         fi
1598       fi
1599     done
1600   done
1601   if test "X$rpathdirs" != "X"; then
1602     if test -n "$acl_hardcode_libdir_separator"; then
1603       dnl Weird platform: only the last -rpath option counts, the user must
1604       dnl pass all path elements in one option. We can arrange that for a
1605       dnl single library, but not when more than one $LIBNAMEs are used.
1606       alldirs=
1607       for found_dir in $rpathdirs; do
1608         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1609       done
1610       dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1611       acl_save_libdir="$libdir"
1612       libdir="$alldirs"
1613       eval flag=\"$acl_hardcode_libdir_flag_spec\"
1614       libdir="$acl_save_libdir"
1615       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1616     else
1617       dnl The -rpath options are cumulative.
1618       for found_dir in $rpathdirs; do
1619         acl_save_libdir="$libdir"
1620         libdir="$found_dir"
1621         eval flag=\"$acl_hardcode_libdir_flag_spec\"
1622         libdir="$acl_save_libdir"
1623         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1624       done
1625     fi
1626   fi
1627   if test "X$ltrpathdirs" != "X"; then
1628     dnl When using libtool, the option that works for both libraries and
1629     dnl executables is -R. The -R options are cumulative.
1630     for found_dir in $ltrpathdirs; do
1631       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1632     done
1633   fi
1634   popdef([P_A_C_K])
1635   popdef([PACKLIBS])
1636   popdef([PACKUP])
1637   popdef([PACK])
1638   popdef([NAME])
1639 ])
1640
1641 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1642 dnl unless already present in VAR.
1643 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1644 dnl contains two or three consecutive elements that belong together.
1645 AC_DEFUN([AC_LIB_APPENDTOVAR],
1646 [
1647   for element in [$2]; do
1648     haveit=
1649     for x in $[$1]; do
1650       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1651       if test "X$x" = "X$element"; then
1652         haveit=yes
1653         break
1654       fi
1655     done
1656     if test -z "$haveit"; then
1657       [$1]="${[$1]}${[$1]:+ }$element"
1658     fi
1659   done
1660 ])
1661
1662 dnl For those cases where a variable contains several -L and -l options
1663 dnl referring to unknown libraries and directories, this macro determines the
1664 dnl necessary additional linker options for the runtime path.
1665 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1666 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1667 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1668 dnl otherwise linking without libtool is assumed.
1669 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1670 [
1671   AC_REQUIRE([AC_LIB_RPATH])
1672   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1673   $1=
1674   if test "$enable_rpath" != no; then
1675     if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1676       dnl Use an explicit option to hardcode directories into the resulting
1677       dnl binary.
1678       rpathdirs=
1679       next=
1680       for opt in $2; do
1681         if test -n "$next"; then
1682           dir="$next"
1683           dnl No need to hardcode the standard /usr/lib.
1684           if test "X$dir" != "X/usr/$acl_libdirstem" \
1685              && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1686             rpathdirs="$rpathdirs $dir"
1687           fi
1688           next=
1689         else
1690           case $opt in
1691             -L) next=yes ;;
1692             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1693                  dnl No need to hardcode the standard /usr/lib.
1694                  if test "X$dir" != "X/usr/$acl_libdirstem" \
1695                     && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1696                    rpathdirs="$rpathdirs $dir"
1697                  fi
1698                  next= ;;
1699             *) next= ;;
1700           esac
1701         fi
1702       done
1703       if test "X$rpathdirs" != "X"; then
1704         if test -n ""$3""; then
1705           dnl libtool is used for linking. Use -R options.
1706           for dir in $rpathdirs; do
1707             $1="${$1}${$1:+ }-R$dir"
1708           done
1709         else
1710           dnl The linker is used for linking directly.
1711           if test -n "$acl_hardcode_libdir_separator"; then
1712             dnl Weird platform: only the last -rpath option counts, the user
1713             dnl must pass all path elements in one option.
1714             alldirs=
1715             for dir in $rpathdirs; do
1716               alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1717             done
1718             acl_save_libdir="$libdir"
1719             libdir="$alldirs"
1720             eval flag=\"$acl_hardcode_libdir_flag_spec\"
1721             libdir="$acl_save_libdir"
1722             $1="$flag"
1723           else
1724             dnl The -rpath options are cumulative.
1725             for dir in $rpathdirs; do
1726               acl_save_libdir="$libdir"
1727               libdir="$dir"
1728               eval flag=\"$acl_hardcode_libdir_flag_spec\"
1729               libdir="$acl_save_libdir"
1730               $1="${$1}${$1:+ }$flag"
1731             done
1732           fi
1733         fi
1734       fi
1735     fi
1736   fi
1737   AC_SUBST([$1])
1738 ])
1739
1740 # lib-prefix.m4 serial 7 (gettext-0.18)
1741 dnl Copyright (C) 2001-2005, 2008-2015 Free Software Foundation, Inc.
1742 dnl This file is free software; the Free Software Foundation
1743 dnl gives unlimited permission to copy and/or distribute it,
1744 dnl with or without modifications, as long as this notice is preserved.
1745
1746 dnl From Bruno Haible.
1747
1748 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1749 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1750 dnl require excessive bracketing.
1751 ifdef([AC_HELP_STRING],
1752 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1753 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1754
1755 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1756 dnl to access previously installed libraries. The basic assumption is that
1757 dnl a user will want packages to use other packages he previously installed
1758 dnl with the same --prefix option.
1759 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1760 dnl libraries, but is otherwise very convenient.
1761 AC_DEFUN([AC_LIB_PREFIX],
1762 [
1763   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1764   AC_REQUIRE([AC_PROG_CC])
1765   AC_REQUIRE([AC_CANONICAL_HOST])
1766   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1767   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1768   dnl By default, look in $includedir and $libdir.
1769   use_additional=yes
1770   AC_LIB_WITH_FINAL_PREFIX([
1771     eval additional_includedir=\"$includedir\"
1772     eval additional_libdir=\"$libdir\"
1773   ])
1774   AC_LIB_ARG_WITH([lib-prefix],
1775 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1776   --without-lib-prefix    don't search for libraries in includedir and libdir],
1777 [
1778     if test "X$withval" = "Xno"; then
1779       use_additional=no
1780     else
1781       if test "X$withval" = "X"; then
1782         AC_LIB_WITH_FINAL_PREFIX([
1783           eval additional_includedir=\"$includedir\"
1784           eval additional_libdir=\"$libdir\"
1785         ])
1786       else
1787         additional_includedir="$withval/include"
1788         additional_libdir="$withval/$acl_libdirstem"
1789       fi
1790     fi
1791 ])
1792   if test $use_additional = yes; then
1793     dnl Potentially add $additional_includedir to $CPPFLAGS.
1794     dnl But don't add it
1795     dnl   1. if it's the standard /usr/include,
1796     dnl   2. if it's already present in $CPPFLAGS,
1797     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1798     dnl   4. if it doesn't exist as a directory.
1799     if test "X$additional_includedir" != "X/usr/include"; then
1800       haveit=
1801       for x in $CPPFLAGS; do
1802         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1803         if test "X$x" = "X-I$additional_includedir"; then
1804           haveit=yes
1805           break
1806         fi
1807       done
1808       if test -z "$haveit"; then
1809         if test "X$additional_includedir" = "X/usr/local/include"; then
1810           if test -n "$GCC"; then
1811             case $host_os in
1812               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1813             esac
1814           fi
1815         fi
1816         if test -z "$haveit"; then
1817           if test -d "$additional_includedir"; then
1818             dnl Really add $additional_includedir to $CPPFLAGS.
1819             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1820           fi
1821         fi
1822       fi
1823     fi
1824     dnl Potentially add $additional_libdir to $LDFLAGS.
1825     dnl But don't add it
1826     dnl   1. if it's the standard /usr/lib,
1827     dnl   2. if it's already present in $LDFLAGS,
1828     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1829     dnl   4. if it doesn't exist as a directory.
1830     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1831       haveit=
1832       for x in $LDFLAGS; do
1833         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1834         if test "X$x" = "X-L$additional_libdir"; then
1835           haveit=yes
1836           break
1837         fi
1838       done
1839       if test -z "$haveit"; then
1840         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1841           if test -n "$GCC"; then
1842             case $host_os in
1843               linux*) haveit=yes;;
1844             esac
1845           fi
1846         fi
1847         if test -z "$haveit"; then
1848           if test -d "$additional_libdir"; then
1849             dnl Really add $additional_libdir to $LDFLAGS.
1850             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1851           fi
1852         fi
1853       fi
1854     fi
1855   fi
1856 ])
1857
1858 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1859 dnl acl_final_exec_prefix, containing the values to which $prefix and
1860 dnl $exec_prefix will expand at the end of the configure script.
1861 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1862 [
1863   dnl Unfortunately, prefix and exec_prefix get only finally determined
1864   dnl at the end of configure.
1865   if test "X$prefix" = "XNONE"; then
1866     acl_final_prefix="$ac_default_prefix"
1867   else
1868     acl_final_prefix="$prefix"
1869   fi
1870   if test "X$exec_prefix" = "XNONE"; then
1871     acl_final_exec_prefix='${prefix}'
1872   else
1873     acl_final_exec_prefix="$exec_prefix"
1874   fi
1875   acl_save_prefix="$prefix"
1876   prefix="$acl_final_prefix"
1877   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1878   prefix="$acl_save_prefix"
1879 ])
1880
1881 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1882 dnl variables prefix and exec_prefix bound to the values they will have
1883 dnl at the end of the configure script.
1884 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1885 [
1886   acl_save_prefix="$prefix"
1887   prefix="$acl_final_prefix"
1888   acl_save_exec_prefix="$exec_prefix"
1889   exec_prefix="$acl_final_exec_prefix"
1890   $1
1891   exec_prefix="$acl_save_exec_prefix"
1892   prefix="$acl_save_prefix"
1893 ])
1894
1895 dnl AC_LIB_PREPARE_MULTILIB creates
1896 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1897 dnl   "lib" or "lib64" or "lib/64",
1898 dnl - a variable acl_libdirstem2, as a secondary possible value for
1899 dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1900 dnl   "lib/amd64".
1901 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1902 [
1903   dnl There is no formal standard regarding lib and lib64.
1904   dnl On glibc systems, the current practice is that on a system supporting
1905   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1906   dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1907   dnl the compiler's default mode by looking at the compiler's library search
1908   dnl path. If at least one of its elements ends in /lib64 or points to a
1909   dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1910   dnl Otherwise we use the default, namely "lib".
1911   dnl On Solaris systems, the current practice is that on a system supporting
1912   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1913   dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1914   dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1915   AC_REQUIRE([AC_CANONICAL_HOST])
1916   acl_libdirstem=lib
1917   acl_libdirstem2=
1918   case "$host_os" in
1919     solaris*)
1920       dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1921       dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1922       dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1923       dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1924       dnl symlink is missing, so we set acl_libdirstem2 too.
1925       AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1926         [AC_EGREP_CPP([sixtyfour bits], [
1927 #ifdef _LP64
1928 sixtyfour bits
1929 #endif
1930            ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1931         ])
1932       if test $gl_cv_solaris_64bit = yes; then
1933         acl_libdirstem=lib/64
1934         case "$host_cpu" in
1935           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
1936           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1937         esac
1938       fi
1939       ;;
1940     *)
1941       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1942       if test -n "$searchpath"; then
1943         acl_save_IFS="${IFS=    }"; IFS=":"
1944         for searchdir in $searchpath; do
1945           if test -d "$searchdir"; then
1946             case "$searchdir" in
1947               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1948               */../ | */.. )
1949                 # Better ignore directories of this form. They are misleading.
1950                 ;;
1951               *) searchdir=`cd "$searchdir" && pwd`
1952                  case "$searchdir" in
1953                    */lib64 ) acl_libdirstem=lib64 ;;
1954                  esac ;;
1955             esac
1956           fi
1957         done
1958         IFS="$acl_save_IFS"
1959       fi
1960       ;;
1961   esac
1962   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1963 ])
1964
1965 # nls.m4 serial 5 (gettext-0.18)
1966 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
1967 dnl Inc.
1968 dnl This file is free software; the Free Software Foundation
1969 dnl gives unlimited permission to copy and/or distribute it,
1970 dnl with or without modifications, as long as this notice is preserved.
1971 dnl
1972 dnl This file can be used in projects which are not available under
1973 dnl the GNU General Public License or the GNU Library General Public
1974 dnl License but which still want to provide support for the GNU gettext
1975 dnl functionality.
1976 dnl Please note that the actual code of the GNU gettext library is covered
1977 dnl by the GNU Library General Public License, and the rest of the GNU
1978 dnl gettext package is covered by the GNU General Public License.
1979 dnl They are *not* in the public domain.
1980
1981 dnl Authors:
1982 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1983 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1984
1985 AC_PREREQ([2.50])
1986
1987 AC_DEFUN([AM_NLS],
1988 [
1989   AC_MSG_CHECKING([whether NLS is requested])
1990   dnl Default is enabled NLS
1991   AC_ARG_ENABLE([nls],
1992     [  --disable-nls           do not use Native Language Support],
1993     USE_NLS=$enableval, USE_NLS=yes)
1994   AC_MSG_RESULT([$USE_NLS])
1995   AC_SUBST([USE_NLS])
1996 ])
1997
1998 dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
1999 dnl serial 11 (pkg-config-0.29.1)
2000 dnl
2001 dnl Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
2002 dnl Copyright Â© 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
2003 dnl
2004 dnl This program is free software; you can redistribute it and/or modify
2005 dnl it under the terms of the GNU General Public License as published by
2006 dnl the Free Software Foundation; either version 2 of the License, or
2007 dnl (at your option) any later version.
2008 dnl
2009 dnl This program is distributed in the hope that it will be useful, but
2010 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
2011 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2012 dnl General Public License for more details.
2013 dnl
2014 dnl You should have received a copy of the GNU General Public License
2015 dnl along with this program; if not, write to the Free Software
2016 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2017 dnl 02111-1307, USA.
2018 dnl
2019 dnl As a special exception to the GNU General Public License, if you
2020 dnl distribute this file as part of a program that contains a
2021 dnl configuration script generated by Autoconf, you may include it under
2022 dnl the same distribution terms that you use for the rest of that
2023 dnl program.
2024
2025 dnl PKG_PREREQ(MIN-VERSION)
2026 dnl -----------------------
2027 dnl Since: 0.29
2028 dnl
2029 dnl Verify that the version of the pkg-config macros are at least
2030 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
2031 dnl installed version of pkg-config, this checks the developer's version
2032 dnl of pkg.m4 when generating configure.
2033 dnl
2034 dnl To ensure that this macro is defined, also add:
2035 dnl m4_ifndef([PKG_PREREQ],
2036 dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
2037 dnl
2038 dnl See the "Since" comment for each macro you use to see what version
2039 dnl of the macros you require.
2040 m4_defun([PKG_PREREQ],
2041 [m4_define([PKG_MACROS_VERSION], [0.29.1])
2042 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
2043     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
2044 ])dnl PKG_PREREQ
2045
2046 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
2047 dnl ----------------------------------
2048 dnl Since: 0.16
2049 dnl
2050 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
2051 dnl first found in the path. Checks that the version of pkg-config found
2052 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
2053 dnl used since that's the first version where most current features of
2054 dnl pkg-config existed.
2055 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2056 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2057 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
2058 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
2059 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
2060 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
2061 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
2062
2063 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2064         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2065 fi
2066 if test -n "$PKG_CONFIG"; then
2067         _pkg_min_version=m4_default([$1], [0.9.0])
2068         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2069         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2070                 AC_MSG_RESULT([yes])
2071         else
2072                 AC_MSG_RESULT([no])
2073                 PKG_CONFIG=""
2074         fi
2075 fi[]dnl
2076 ])dnl PKG_PROG_PKG_CONFIG
2077
2078 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2079 dnl -------------------------------------------------------------------
2080 dnl Since: 0.18
2081 dnl
2082 dnl Check to see whether a particular set of modules exists. Similar to
2083 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
2084 dnl
2085 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2086 dnl only at the first occurence in configure.ac, so if the first place
2087 dnl it's called might be skipped (such as if it is within an "if", you
2088 dnl have to call PKG_CHECK_EXISTS manually
2089 AC_DEFUN([PKG_CHECK_EXISTS],
2090 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2091 if test -n "$PKG_CONFIG" && \
2092     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2093   m4_default([$2], [:])
2094 m4_ifvaln([$3], [else
2095   $3])dnl
2096 fi])
2097
2098 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2099 dnl ---------------------------------------------
2100 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
2101 dnl pkg_failed based on the result.
2102 m4_define([_PKG_CONFIG],
2103 [if test -n "$$1"; then
2104     pkg_cv_[]$1="$$1"
2105  elif test -n "$PKG_CONFIG"; then
2106     PKG_CHECK_EXISTS([$3],
2107                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
2108                       test "x$?" != "x0" && pkg_failed=yes ],
2109                      [pkg_failed=yes])
2110  else
2111     pkg_failed=untried
2112 fi[]dnl
2113 ])dnl _PKG_CONFIG
2114
2115 dnl _PKG_SHORT_ERRORS_SUPPORTED
2116 dnl ---------------------------
2117 dnl Internal check to see if pkg-config supports short errors.
2118 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2119 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2120 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2121         _pkg_short_errors_supported=yes
2122 else
2123         _pkg_short_errors_supported=no
2124 fi[]dnl
2125 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
2126
2127
2128 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2129 dnl   [ACTION-IF-NOT-FOUND])
2130 dnl --------------------------------------------------------------
2131 dnl Since: 0.4.0
2132 dnl
2133 dnl Note that if there is a possibility the first call to
2134 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
2135 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2136 AC_DEFUN([PKG_CHECK_MODULES],
2137 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2138 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2139 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2140
2141 pkg_failed=no
2142 AC_MSG_CHECKING([for $1])
2143
2144 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2145 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2146
2147 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2148 and $1[]_LIBS to avoid the need to call pkg-config.
2149 See the pkg-config man page for more details.])
2150
2151 if test $pkg_failed = yes; then
2152         AC_MSG_RESULT([no])
2153         _PKG_SHORT_ERRORS_SUPPORTED
2154         if test $_pkg_short_errors_supported = yes; then
2155                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
2156         else 
2157                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
2158         fi
2159         # Put the nasty error message in config.log where it belongs
2160         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2161
2162         m4_default([$4], [AC_MSG_ERROR(
2163 [Package requirements ($2) were not met:
2164
2165 $$1_PKG_ERRORS
2166
2167 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2168 installed software in a non-standard prefix.
2169
2170 _PKG_TEXT])[]dnl
2171         ])
2172 elif test $pkg_failed = untried; then
2173         AC_MSG_RESULT([no])
2174         m4_default([$4], [AC_MSG_FAILURE(
2175 [The pkg-config script could not be found or is too old.  Make sure it
2176 is in your PATH or set the PKG_CONFIG environment variable to the full
2177 path to pkg-config.
2178
2179 _PKG_TEXT
2180
2181 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
2182         ])
2183 else
2184         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2185         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2186         AC_MSG_RESULT([yes])
2187         $3
2188 fi[]dnl
2189 ])dnl PKG_CHECK_MODULES
2190
2191
2192 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2193 dnl   [ACTION-IF-NOT-FOUND])
2194 dnl ---------------------------------------------------------------------
2195 dnl Since: 0.29
2196 dnl
2197 dnl Checks for existence of MODULES and gathers its build flags with
2198 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
2199 dnl and VARIABLE-PREFIX_LIBS from --libs.
2200 dnl
2201 dnl Note that if there is a possibility the first call to
2202 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
2203 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
2204 dnl configure.ac.
2205 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
2206 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2207 _save_PKG_CONFIG=$PKG_CONFIG
2208 PKG_CONFIG="$PKG_CONFIG --static"
2209 PKG_CHECK_MODULES($@)
2210 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
2211 ])dnl PKG_CHECK_MODULES_STATIC
2212
2213
2214 dnl PKG_INSTALLDIR([DIRECTORY])
2215 dnl -------------------------
2216 dnl Since: 0.27
2217 dnl
2218 dnl Substitutes the variable pkgconfigdir as the location where a module
2219 dnl should install pkg-config .pc files. By default the directory is
2220 dnl $libdir/pkgconfig, but the default can be changed by passing
2221 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
2222 dnl parameter.
2223 AC_DEFUN([PKG_INSTALLDIR],
2224 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
2225 m4_pushdef([pkg_description],
2226     [pkg-config installation directory @<:@]pkg_default[@:>@])
2227 AC_ARG_WITH([pkgconfigdir],
2228     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
2229     [with_pkgconfigdir=]pkg_default)
2230 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
2231 m4_popdef([pkg_default])
2232 m4_popdef([pkg_description])
2233 ])dnl PKG_INSTALLDIR
2234
2235
2236 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
2237 dnl --------------------------------
2238 dnl Since: 0.27
2239 dnl
2240 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
2241 dnl module should install arch-independent pkg-config .pc files. By
2242 dnl default the directory is $datadir/pkgconfig, but the default can be
2243 dnl changed by passing DIRECTORY. The user can override through the
2244 dnl --with-noarch-pkgconfigdir parameter.
2245 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
2246 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
2247 m4_pushdef([pkg_description],
2248     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
2249 AC_ARG_WITH([noarch-pkgconfigdir],
2250     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
2251     [with_noarch_pkgconfigdir=]pkg_default)
2252 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
2253 m4_popdef([pkg_default])
2254 m4_popdef([pkg_description])
2255 ])dnl PKG_NOARCH_INSTALLDIR
2256
2257
2258 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
2259 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2260 dnl -------------------------------------------
2261 dnl Since: 0.28
2262 dnl
2263 dnl Retrieves the value of the pkg-config variable for the given module.
2264 AC_DEFUN([PKG_CHECK_VAR],
2265 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2266 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
2267
2268 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
2269 AS_VAR_COPY([$1], [pkg_cv_][$1])
2270
2271 AS_VAR_IF([$1], [""], [$5], [$4])dnl
2272 ])dnl PKG_CHECK_VAR
2273
2274 # po.m4 serial 24 (gettext-0.19)
2275 dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
2276 dnl This file is free software; the Free Software Foundation
2277 dnl gives unlimited permission to copy and/or distribute it,
2278 dnl with or without modifications, as long as this notice is preserved.
2279 dnl
2280 dnl This file can be used in projects which are not available under
2281 dnl the GNU General Public License or the GNU Library General Public
2282 dnl License but which still want to provide support for the GNU gettext
2283 dnl functionality.
2284 dnl Please note that the actual code of the GNU gettext library is covered
2285 dnl by the GNU Library General Public License, and the rest of the GNU
2286 dnl gettext package is covered by the GNU General Public License.
2287 dnl They are *not* in the public domain.
2288
2289 dnl Authors:
2290 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2291 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2292
2293 AC_PREREQ([2.60])
2294
2295 dnl Checks for all prerequisites of the po subdirectory.
2296 AC_DEFUN([AM_PO_SUBDIRS],
2297 [
2298   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2299   AC_REQUIRE([AC_PROG_INSTALL])dnl
2300   AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2301   AC_REQUIRE([AC_PROG_SED])dnl
2302   AC_REQUIRE([AM_NLS])dnl
2303
2304   dnl Release version of the gettext macros. This is used to ensure that
2305   dnl the gettext macros and po/Makefile.in.in are in sync.
2306   AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
2307
2308   dnl Perform the following tests also if --disable-nls has been given,
2309   dnl because they are needed for "make dist" to work.
2310
2311   dnl Search for GNU msgfmt in the PATH.
2312   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2313   dnl The second test excludes FreeBSD msgfmt.
2314   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2315     [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2316      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2317     :)
2318   AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2319
2320   dnl Test whether it is GNU msgfmt >= 0.15.
2321 changequote(,)dnl
2322   case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2323     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2324     *) MSGFMT_015=$MSGFMT ;;
2325   esac
2326 changequote([,])dnl
2327   AC_SUBST([MSGFMT_015])
2328 changequote(,)dnl
2329   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2330     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2331     *) GMSGFMT_015=$GMSGFMT ;;
2332   esac
2333 changequote([,])dnl
2334   AC_SUBST([GMSGFMT_015])
2335
2336   dnl Search for GNU xgettext 0.12 or newer in the PATH.
2337   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2338   dnl The second test excludes FreeBSD xgettext.
2339   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2340     [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2341      (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)],
2342     :)
2343   dnl Remove leftover from FreeBSD xgettext call.
2344   rm -f messages.po
2345
2346   dnl Test whether it is GNU xgettext >= 0.15.
2347 changequote(,)dnl
2348   case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2349     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2350     *) XGETTEXT_015=$XGETTEXT ;;
2351   esac
2352 changequote([,])dnl
2353   AC_SUBST([XGETTEXT_015])
2354
2355   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2356   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2357     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2358
2359   dnl Installation directories.
2360   dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2361   dnl have to define it here, so that it can be used in po/Makefile.
2362   test -n "$localedir" || localedir='${datadir}/locale'
2363   AC_SUBST([localedir])
2364
2365   dnl Support for AM_XGETTEXT_OPTION.
2366   test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2367   AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2368
2369   AC_CONFIG_COMMANDS([po-directories], [[
2370     for ac_file in $CONFIG_FILES; do
2371       # Support "outfile[:infile[:infile...]]"
2372       case "$ac_file" in
2373         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2374       esac
2375       # PO directories have a Makefile.in generated from Makefile.in.in.
2376       case "$ac_file" in */Makefile.in)
2377         # Adjust a relative srcdir.
2378         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2379         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2380         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2381         # In autoconf-2.13 it is called $ac_given_srcdir.
2382         # In autoconf-2.50 it is called $srcdir.
2383         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2384         case "$ac_given_srcdir" in
2385           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2386           /*) top_srcdir="$ac_given_srcdir" ;;
2387           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2388         esac
2389         # Treat a directory as a PO directory if and only if it has a
2390         # POTFILES.in file. This allows packages to have multiple PO
2391         # directories under different names or in different locations.
2392         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2393           rm -f "$ac_dir/POTFILES"
2394           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2395           gt_tab=`printf '\t'`
2396           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"
2397           POMAKEFILEDEPS="POTFILES.in"
2398           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2399           # on $ac_dir but don't depend on user-specified configuration
2400           # parameters.
2401           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2402             # The LINGUAS file contains the set of available languages.
2403             if test -n "$OBSOLETE_ALL_LINGUAS"; then
2404               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2405             fi
2406             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2407             # Hide the ALL_LINGUAS assignment from automake < 1.5.
2408             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2409             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2410           else
2411             # The set of available languages was given in configure.in.
2412             # Hide the ALL_LINGUAS assignment from automake < 1.5.
2413             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2414           fi
2415           # Compute POFILES
2416           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2417           # Compute UPDATEPOFILES
2418           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2419           # Compute DUMMYPOFILES
2420           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2421           # Compute GMOFILES
2422           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2423           case "$ac_given_srcdir" in
2424             .) srcdirpre= ;;
2425             *) srcdirpre='$(srcdir)/' ;;
2426           esac
2427           POFILES=
2428           UPDATEPOFILES=
2429           DUMMYPOFILES=
2430           GMOFILES=
2431           for lang in $ALL_LINGUAS; do
2432             POFILES="$POFILES $srcdirpre$lang.po"
2433             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2434             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2435             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2436           done
2437           # CATALOGS depends on both $ac_dir and the user's LINGUAS
2438           # environment variable.
2439           INST_LINGUAS=
2440           if test -n "$ALL_LINGUAS"; then
2441             for presentlang in $ALL_LINGUAS; do
2442               useit=no
2443               if test "%UNSET%" != "$LINGUAS"; then
2444                 desiredlanguages="$LINGUAS"
2445               else
2446                 desiredlanguages="$ALL_LINGUAS"
2447               fi
2448               for desiredlang in $desiredlanguages; do
2449                 # Use the presentlang catalog if desiredlang is
2450                 #   a. equal to presentlang, or
2451                 #   b. a variant of presentlang (because in this case,
2452                 #      presentlang can be used as a fallback for messages
2453                 #      which are not translated in the desiredlang catalog).
2454                 case "$desiredlang" in
2455                   "$presentlang"*) useit=yes;;
2456                 esac
2457               done
2458               if test $useit = yes; then
2459                 INST_LINGUAS="$INST_LINGUAS $presentlang"
2460               fi
2461             done
2462           fi
2463           CATALOGS=
2464           if test -n "$INST_LINGUAS"; then
2465             for lang in $INST_LINGUAS; do
2466               CATALOGS="$CATALOGS $lang.gmo"
2467             done
2468           fi
2469           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2470           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"
2471           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2472             if test -f "$f"; then
2473               case "$f" in
2474                 *.orig | *.bak | *~) ;;
2475                 *) cat "$f" >> "$ac_dir/Makefile" ;;
2476               esac
2477             fi
2478           done
2479         fi
2480         ;;
2481       esac
2482     done]],
2483    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2484     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2485     # from automake < 1.5.
2486     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2487     # Capture the value of LINGUAS because we need it to compute CATALOGS.
2488     LINGUAS="${LINGUAS-%UNSET%}"
2489    ])
2490 ])
2491
2492 dnl Postprocesses a Makefile in a directory containing PO files.
2493 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2494 [
2495   # When this code is run, in config.status, two variables have already been
2496   # set:
2497   # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2498   # - LINGUAS is the value of the environment variable LINGUAS at configure
2499   #   time.
2500
2501 changequote(,)dnl
2502   # Adjust a relative srcdir.
2503   ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2504   ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2505   ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2506   # In autoconf-2.13 it is called $ac_given_srcdir.
2507   # In autoconf-2.50 it is called $srcdir.
2508   test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2509   case "$ac_given_srcdir" in
2510     .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2511     /*) top_srcdir="$ac_given_srcdir" ;;
2512     *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2513   esac
2514
2515   # Find a way to echo strings without interpreting backslash.
2516   if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2517     gt_echo='echo'
2518   else
2519     if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2520       gt_echo='printf %s\n'
2521     else
2522       echo_func () {
2523         cat <<EOT
2524 $*
2525 EOT
2526       }
2527       gt_echo='echo_func'
2528     fi
2529   fi
2530
2531   # A sed script that extracts the value of VARIABLE from a Makefile.
2532   tab=`printf '\t'`
2533   sed_x_variable='
2534 # Test if the hold space is empty.
2535 x
2536 s/P/P/
2537 x
2538 ta
2539 # Yes it was empty. Look if we have the expected variable definition.
2540 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
2541   # Seen the first line of the variable definition.
2542   s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
2543   ba
2544 }
2545 bd
2546 :a
2547 # Here we are processing a line from the variable definition.
2548 # Remove comment, more precisely replace it with a space.
2549 s/#.*$/ /
2550 # See if the line ends in a backslash.
2551 tb
2552 :b
2553 s/\\$//
2554 # Print the line, without the trailing backslash.
2555 p
2556 tc
2557 # There was no trailing backslash. The end of the variable definition is
2558 # reached. Clear the hold space.
2559 s/^.*$//
2560 x
2561 bd
2562 :c
2563 # A trailing backslash means that the variable definition continues in the
2564 # next line. Put a nonempty string into the hold space to indicate this.
2565 s/^.*$/P/
2566 x
2567 :d
2568 '
2569 changequote([,])dnl
2570
2571   # Set POTFILES to the value of the Makefile variable POTFILES.
2572   sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2573   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2574   # Compute POTFILES_DEPS as
2575   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2576   POTFILES_DEPS=
2577   for file in $POTFILES; do
2578     POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2579   done
2580   POMAKEFILEDEPS=""
2581
2582   if test -n "$OBSOLETE_ALL_LINGUAS"; then
2583     test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2584   fi
2585   if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2586     # The LINGUAS file contains the set of available languages.
2587     ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2588     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2589   else
2590     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2591     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2592     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2593   fi
2594   # Hide the ALL_LINGUAS assignment from automake < 1.5.
2595   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2596   # Compute POFILES
2597   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2598   # Compute UPDATEPOFILES
2599   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2600   # Compute DUMMYPOFILES
2601   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2602   # Compute GMOFILES
2603   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2604   # Compute PROPERTIESFILES
2605   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2606   # Compute CLASSFILES
2607   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2608   # Compute QMFILES
2609   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2610   # Compute MSGFILES
2611   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2612   # Compute RESOURCESDLLFILES
2613   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2614   case "$ac_given_srcdir" in
2615     .) srcdirpre= ;;
2616     *) srcdirpre='$(srcdir)/' ;;
2617   esac
2618   POFILES=
2619   UPDATEPOFILES=
2620   DUMMYPOFILES=
2621   GMOFILES=
2622   PROPERTIESFILES=
2623   CLASSFILES=
2624   QMFILES=
2625   MSGFILES=
2626   RESOURCESDLLFILES=
2627   for lang in $ALL_LINGUAS; do
2628     POFILES="$POFILES $srcdirpre$lang.po"
2629     UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2630     DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2631     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2632     PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2633     CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2634     QMFILES="$QMFILES $srcdirpre$lang.qm"
2635     frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2636     MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2637     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/'`
2638     RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2639   done
2640   # CATALOGS depends on both $ac_dir and the user's LINGUAS
2641   # environment variable.
2642   INST_LINGUAS=
2643   if test -n "$ALL_LINGUAS"; then
2644     for presentlang in $ALL_LINGUAS; do
2645       useit=no
2646       if test "%UNSET%" != "$LINGUAS"; then
2647         desiredlanguages="$LINGUAS"
2648       else
2649         desiredlanguages="$ALL_LINGUAS"
2650       fi
2651       for desiredlang in $desiredlanguages; do
2652         # Use the presentlang catalog if desiredlang is
2653         #   a. equal to presentlang, or
2654         #   b. a variant of presentlang (because in this case,
2655         #      presentlang can be used as a fallback for messages
2656         #      which are not translated in the desiredlang catalog).
2657         case "$desiredlang" in
2658           "$presentlang"*) useit=yes;;
2659         esac
2660       done
2661       if test $useit = yes; then
2662         INST_LINGUAS="$INST_LINGUAS $presentlang"
2663       fi
2664     done
2665   fi
2666   CATALOGS=
2667   JAVACATALOGS=
2668   QTCATALOGS=
2669   TCLCATALOGS=
2670   CSHARPCATALOGS=
2671   if test -n "$INST_LINGUAS"; then
2672     for lang in $INST_LINGUAS; do
2673       CATALOGS="$CATALOGS $lang.gmo"
2674       JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2675       QTCATALOGS="$QTCATALOGS $lang.qm"
2676       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2677       TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2678       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/'`
2679       CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2680     done
2681   fi
2682
2683   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"
2684   tab=`printf '\t'`
2685   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2686     # Add dependencies that cannot be formulated as a simple suffix rule.
2687     for lang in $ALL_LINGUAS; do
2688       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2689       cat >> "$ac_file.tmp" <<EOF
2690 $frobbedlang.msg: $lang.po
2691 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2692 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2693 EOF
2694     done
2695   fi
2696   if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2697     # Add dependencies that cannot be formulated as a simple suffix rule.
2698     for lang in $ALL_LINGUAS; do
2699       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/'`
2700       cat >> "$ac_file.tmp" <<EOF
2701 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2702 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2703 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2704 EOF
2705     done
2706   fi
2707   if test -n "$POMAKEFILEDEPS"; then
2708     cat >> "$ac_file.tmp" <<EOF
2709 Makefile: $POMAKEFILEDEPS
2710 EOF
2711   fi
2712   mv "$ac_file.tmp" "$ac_file"
2713 ])
2714
2715 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2716 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2717 [
2718   XGETTEXT_EXTRA_OPTIONS=
2719 ])
2720
2721 dnl Registers an option to be passed to xgettext in the po subdirectory.
2722 AC_DEFUN([AM_XGETTEXT_OPTION],
2723 [
2724   AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2725   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2726 ])
2727
2728 # progtest.m4 serial 7 (gettext-0.18.2)
2729 dnl Copyright (C) 1996-2003, 2005, 2008-2015 Free Software Foundation, Inc.
2730 dnl This file is free software; the Free Software Foundation
2731 dnl gives unlimited permission to copy and/or distribute it,
2732 dnl with or without modifications, as long as this notice is preserved.
2733 dnl
2734 dnl This file can be used in projects which are not available under
2735 dnl the GNU General Public License or the GNU Library General Public
2736 dnl License but which still want to provide support for the GNU gettext
2737 dnl functionality.
2738 dnl Please note that the actual code of the GNU gettext library is covered
2739 dnl by the GNU Library General Public License, and the rest of the GNU
2740 dnl gettext package is covered by the GNU General Public License.
2741 dnl They are *not* in the public domain.
2742
2743 dnl Authors:
2744 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
2745
2746 AC_PREREQ([2.50])
2747
2748 # Search path for a program which passes the given test.
2749
2750 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2751 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2752 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2753 [
2754 # Prepare PATH_SEPARATOR.
2755 # The user is always right.
2756 if test "${PATH_SEPARATOR+set}" != set; then
2757   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
2758   # contains only /bin. Note that ksh looks also at the FPATH variable,
2759   # so we have to set that as well for the test.
2760   PATH_SEPARATOR=:
2761   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2762     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2763            || PATH_SEPARATOR=';'
2764        }
2765 fi
2766
2767 # Find out how to test for executable files. Don't use a zero-byte file,
2768 # as systems may use methods other than mode bits to determine executability.
2769 cat >conf$$.file <<_ASEOF
2770 #! /bin/sh
2771 exit 0
2772 _ASEOF
2773 chmod +x conf$$.file
2774 if test -x conf$$.file >/dev/null 2>&1; then
2775   ac_executable_p="test -x"
2776 else
2777   ac_executable_p="test -f"
2778 fi
2779 rm -f conf$$.file
2780
2781 # Extract the first word of "$2", so it can be a program name with args.
2782 set dummy $2; ac_word=[$]2
2783 AC_MSG_CHECKING([for $ac_word])
2784 AC_CACHE_VAL([ac_cv_path_$1],
2785 [case "[$]$1" in
2786   [[\\/]]* | ?:[[\\/]]*)
2787     ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2788     ;;
2789   *)
2790     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2791     for ac_dir in ifelse([$5], , $PATH, [$5]); do
2792       IFS="$ac_save_IFS"
2793       test -z "$ac_dir" && ac_dir=.
2794       for ac_exec_ext in '' $ac_executable_extensions; do
2795         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2796           echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2797           if [$3]; then
2798             ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2799             break 2
2800           fi
2801         fi
2802       done
2803     done
2804     IFS="$ac_save_IFS"
2805 dnl If no 4th arg is given, leave the cache variable unset,
2806 dnl so AC_PATH_PROGS will keep looking.
2807 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2808 ])dnl
2809     ;;
2810 esac])dnl
2811 $1="$ac_cv_path_$1"
2812 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2813   AC_MSG_RESULT([$][$1])
2814 else
2815   AC_MSG_RESULT([no])
2816 fi
2817 AC_SUBST([$1])dnl
2818 ])
2819
2820 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
2821 #
2822 # This file is free software; the Free Software Foundation
2823 # gives unlimited permission to copy and/or distribute it,
2824 # with or without modifications, as long as this notice is preserved.
2825
2826 # AM_AUTOMAKE_VERSION(VERSION)
2827 # ----------------------------
2828 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2829 # generated from the m4 files accompanying Automake X.Y.
2830 # (This private macro should not be called outside this file.)
2831 AC_DEFUN([AM_AUTOMAKE_VERSION],
2832 [am__api_version='1.15'
2833 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2834 dnl require some minimum version.  Point them to the right macro.
2835 m4_if([$1], [1.15], [],
2836       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2837 ])
2838
2839 # _AM_AUTOCONF_VERSION(VERSION)
2840 # -----------------------------
2841 # aclocal traces this macro to find the Autoconf version.
2842 # This is a private macro too.  Using m4_define simplifies
2843 # the logic in aclocal, which can simply ignore this definition.
2844 m4_define([_AM_AUTOCONF_VERSION], [])
2845
2846 # AM_SET_CURRENT_AUTOMAKE_VERSION
2847 # -------------------------------
2848 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2849 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2850 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2851 [AM_AUTOMAKE_VERSION([1.15])dnl
2852 m4_ifndef([AC_AUTOCONF_VERSION],
2853   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2854 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2855
2856 # Copyright (C) 2011-2014 Free Software Foundation, Inc.
2857 #
2858 # This file is free software; the Free Software Foundation
2859 # gives unlimited permission to copy and/or distribute it,
2860 # with or without modifications, as long as this notice is preserved.
2861
2862 # AM_PROG_AR([ACT-IF-FAIL])
2863 # -------------------------
2864 # Try to determine the archiver interface, and trigger the ar-lib wrapper
2865 # if it is needed.  If the detection of archiver interface fails, run
2866 # ACT-IF-FAIL (default is to abort configure with a proper error message).
2867 AC_DEFUN([AM_PROG_AR],
2868 [AC_BEFORE([$0], [LT_INIT])dnl
2869 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
2870 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2871 AC_REQUIRE_AUX_FILE([ar-lib])dnl
2872 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
2873 : ${AR=ar}
2874
2875 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
2876   [AC_LANG_PUSH([C])
2877    am_cv_ar_interface=ar
2878    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
2879      [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
2880       AC_TRY_EVAL([am_ar_try])
2881       if test "$ac_status" -eq 0; then
2882         am_cv_ar_interface=ar
2883       else
2884         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
2885         AC_TRY_EVAL([am_ar_try])
2886         if test "$ac_status" -eq 0; then
2887           am_cv_ar_interface=lib
2888         else
2889           am_cv_ar_interface=unknown
2890         fi
2891       fi
2892       rm -f conftest.lib libconftest.a
2893      ])
2894    AC_LANG_POP([C])])
2895
2896 case $am_cv_ar_interface in
2897 ar)
2898   ;;
2899 lib)
2900   # Microsoft lib, so override with the ar-lib wrapper script.
2901   # FIXME: It is wrong to rewrite AR.
2902   # But if we don't then we get into trouble of one sort or another.
2903   # A longer-term fix would be to have automake use am__AR in this case,
2904   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
2905   # similar.
2906   AR="$am_aux_dir/ar-lib $AR"
2907   ;;
2908 unknown)
2909   m4_default([$1],
2910              [AC_MSG_ERROR([could not determine $AR interface])])
2911   ;;
2912 esac
2913 AC_SUBST([AR])dnl
2914 ])
2915
2916 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
2917
2918 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
2919 #
2920 # This file is free software; the Free Software Foundation
2921 # gives unlimited permission to copy and/or distribute it,
2922 # with or without modifications, as long as this notice is preserved.
2923
2924 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2925 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
2926 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
2927 #
2928 # Of course, Automake must honor this variable whenever it calls a
2929 # tool from the auxiliary directory.  The problem is that $srcdir (and
2930 # therefore $ac_aux_dir as well) can be either absolute or relative,
2931 # depending on how configure is run.  This is pretty annoying, since
2932 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2933 # source directory, any form will work fine, but in subdirectories a
2934 # relative path needs to be adjusted first.
2935 #
2936 # $ac_aux_dir/missing
2937 #    fails when called from a subdirectory if $ac_aux_dir is relative
2938 # $top_srcdir/$ac_aux_dir/missing
2939 #    fails if $ac_aux_dir is absolute,
2940 #    fails when called from a subdirectory in a VPATH build with
2941 #          a relative $ac_aux_dir
2942 #
2943 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2944 # are both prefixed by $srcdir.  In an in-source build this is usually
2945 # harmless because $srcdir is '.', but things will broke when you
2946 # start a VPATH build or use an absolute $srcdir.
2947 #
2948 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2949 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
2950 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2951 # and then we would define $MISSING as
2952 #   MISSING="\${SHELL} $am_aux_dir/missing"
2953 # This will work as long as MISSING is not called from configure, because
2954 # unfortunately $(top_srcdir) has no meaning in configure.
2955 # However there are other variables, like CC, which are often used in
2956 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2957 #
2958 # Another solution, used here, is to always expand $ac_aux_dir to an
2959 # absolute PATH.  The drawback is that using absolute paths prevent a
2960 # configured tree to be moved without reconfiguration.
2961
2962 AC_DEFUN([AM_AUX_DIR_EXPAND],
2963 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2964 # Expand $ac_aux_dir to an absolute path.
2965 am_aux_dir=`cd "$ac_aux_dir" && pwd`
2966 ])
2967
2968 # AM_CONDITIONAL                                            -*- Autoconf -*-
2969
2970 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
2971 #
2972 # This file is free software; the Free Software Foundation
2973 # gives unlimited permission to copy and/or distribute it,
2974 # with or without modifications, as long as this notice is preserved.
2975
2976 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2977 # -------------------------------------
2978 # Define a conditional.
2979 AC_DEFUN([AM_CONDITIONAL],
2980 [AC_PREREQ([2.52])dnl
2981  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
2982        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2983 AC_SUBST([$1_TRUE])dnl
2984 AC_SUBST([$1_FALSE])dnl
2985 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
2986 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
2987 m4_define([_AM_COND_VALUE_$1], [$2])dnl
2988 if $2; then
2989   $1_TRUE=
2990   $1_FALSE='#'
2991 else
2992   $1_TRUE='#'
2993   $1_FALSE=
2994 fi
2995 AC_CONFIG_COMMANDS_PRE(
2996 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2997   AC_MSG_ERROR([[conditional "$1" was never defined.
2998 Usually this means the macro was only invoked conditionally.]])
2999 fi])])
3000
3001 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
3002 #
3003 # This file is free software; the Free Software Foundation
3004 # gives unlimited permission to copy and/or distribute it,
3005 # with or without modifications, as long as this notice is preserved.
3006
3007
3008 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
3009 # written in clear, in which case automake, when reading aclocal.m4,
3010 # will think it sees a *use*, and therefore will trigger all it's
3011 # C support machinery.  Also note that it means that autoscan, seeing
3012 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
3013
3014
3015 # _AM_DEPENDENCIES(NAME)
3016 # ----------------------
3017 # See how the compiler implements dependency checking.
3018 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
3019 # We try a few techniques and use that to set a single cache variable.
3020 #
3021 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
3022 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
3023 # dependency, and given that the user is not expected to run this macro,
3024 # just rely on AC_PROG_CC.
3025 AC_DEFUN([_AM_DEPENDENCIES],
3026 [AC_REQUIRE([AM_SET_DEPDIR])dnl
3027 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
3028 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
3029 AC_REQUIRE([AM_DEP_TRACK])dnl
3030
3031 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
3032       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
3033       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
3034       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
3035       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
3036       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
3037                     [depcc="$$1"   am_compiler_list=])
3038
3039 AC_CACHE_CHECK([dependency style of $depcc],
3040                [am_cv_$1_dependencies_compiler_type],
3041 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3042   # We make a subdir and do the tests there.  Otherwise we can end up
3043   # making bogus files that we don't know about and never remove.  For
3044   # instance it was reported that on HP-UX the gcc test will end up
3045   # making a dummy file named 'D' -- because '-MD' means "put the output
3046   # in D".
3047   rm -rf conftest.dir
3048   mkdir conftest.dir
3049   # Copy depcomp to subdir because otherwise we won't find it if we're
3050   # using a relative directory.
3051   cp "$am_depcomp" conftest.dir
3052   cd conftest.dir
3053   # We will build objects and dependencies in a subdirectory because
3054   # it helps to detect inapplicable dependency modes.  For instance
3055   # both Tru64's cc and ICC support -MD to output dependencies as a
3056   # side effect of compilation, but ICC will put the dependencies in
3057   # the current directory while Tru64 will put them in the object
3058   # directory.
3059   mkdir sub
3060
3061   am_cv_$1_dependencies_compiler_type=none
3062   if test "$am_compiler_list" = ""; then
3063      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3064   fi
3065   am__universal=false
3066   m4_case([$1], [CC],
3067     [case " $depcc " in #(
3068      *\ -arch\ *\ -arch\ *) am__universal=true ;;
3069      esac],
3070     [CXX],
3071     [case " $depcc " in #(
3072      *\ -arch\ *\ -arch\ *) am__universal=true ;;
3073      esac])
3074
3075   for depmode in $am_compiler_list; do
3076     # Setup a source with many dependencies, because some compilers
3077     # like to wrap large dependency lists on column 80 (with \), and
3078     # we should not choose a depcomp mode which is confused by this.
3079     #
3080     # We need to recreate these files for each test, as the compiler may
3081     # overwrite some of them when testing with obscure command lines.
3082     # This happens at least with the AIX C compiler.
3083     : > sub/conftest.c
3084     for i in 1 2 3 4 5 6; do
3085       echo '#include "conftst'$i'.h"' >> sub/conftest.c
3086       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3087       # Solaris 10 /bin/sh.
3088       echo '/* dummy */' > sub/conftst$i.h
3089     done
3090     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3091
3092     # We check with '-c' and '-o' for the sake of the "dashmstdout"
3093     # mode.  It turns out that the SunPro C++ compiler does not properly
3094     # handle '-M -o', and we need to detect this.  Also, some Intel
3095     # versions had trouble with output in subdirs.
3096     am__obj=sub/conftest.${OBJEXT-o}
3097     am__minus_obj="-o $am__obj"
3098     case $depmode in
3099     gcc)
3100       # This depmode causes a compiler race in universal mode.
3101       test "$am__universal" = false || continue
3102       ;;
3103     nosideeffect)
3104       # After this tag, mechanisms are not by side-effect, so they'll
3105       # only be used when explicitly requested.
3106       if test "x$enable_dependency_tracking" = xyes; then
3107         continue
3108       else
3109         break
3110       fi
3111       ;;
3112     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3113       # This compiler won't grok '-c -o', but also, the minuso test has
3114       # not run yet.  These depmodes are late enough in the game, and
3115       # so weak that their functioning should not be impacted.
3116       am__obj=conftest.${OBJEXT-o}
3117       am__minus_obj=
3118       ;;
3119     none) break ;;
3120     esac
3121     if depmode=$depmode \
3122        source=sub/conftest.c object=$am__obj \
3123        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3124        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3125          >/dev/null 2>conftest.err &&
3126        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3127        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3128        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3129        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3130       # icc doesn't choke on unknown options, it will just issue warnings
3131       # or remarks (even with -Werror).  So we grep stderr for any message
3132       # that says an option was ignored or not supported.
3133       # When given -MP, icc 7.0 and 7.1 complain thusly:
3134       #   icc: Command line warning: ignoring option '-M'; no argument required
3135       # The diagnosis changed in icc 8.0:
3136       #   icc: Command line remark: option '-MP' not supported
3137       if (grep 'ignoring option' conftest.err ||
3138           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3139         am_cv_$1_dependencies_compiler_type=$depmode
3140         break
3141       fi
3142     fi
3143   done
3144
3145   cd ..
3146   rm -rf conftest.dir
3147 else
3148   am_cv_$1_dependencies_compiler_type=none
3149 fi
3150 ])
3151 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3152 AM_CONDITIONAL([am__fastdep$1], [
3153   test "x$enable_dependency_tracking" != xno \
3154   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3155 ])
3156
3157
3158 # AM_SET_DEPDIR
3159 # -------------
3160 # Choose a directory name for dependency files.
3161 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3162 AC_DEFUN([AM_SET_DEPDIR],
3163 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3164 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3165 ])
3166
3167
3168 # AM_DEP_TRACK
3169 # ------------
3170 AC_DEFUN([AM_DEP_TRACK],
3171 [AC_ARG_ENABLE([dependency-tracking], [dnl
3172 AS_HELP_STRING(
3173   [--enable-dependency-tracking],
3174   [do not reject slow dependency extractors])
3175 AS_HELP_STRING(
3176   [--disable-dependency-tracking],
3177   [speeds up one-time build])])
3178 if test "x$enable_dependency_tracking" != xno; then
3179   am_depcomp="$ac_aux_dir/depcomp"
3180   AMDEPBACKSLASH='\'
3181   am__nodep='_no'
3182 fi
3183 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3184 AC_SUBST([AMDEPBACKSLASH])dnl
3185 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3186 AC_SUBST([am__nodep])dnl
3187 _AM_SUBST_NOTMAKE([am__nodep])dnl
3188 ])
3189
3190 # Generate code to set up dependency tracking.              -*- Autoconf -*-
3191
3192 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
3193 #
3194 # This file is free software; the Free Software Foundation
3195 # gives unlimited permission to copy and/or distribute it,
3196 # with or without modifications, as long as this notice is preserved.
3197
3198
3199 # _AM_OUTPUT_DEPENDENCY_COMMANDS
3200 # ------------------------------
3201 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3202 [{
3203   # Older Autoconf quotes --file arguments for eval, but not when files
3204   # are listed without --file.  Let's play safe and only enable the eval
3205   # if we detect the quoting.
3206   case $CONFIG_FILES in
3207   *\'*) eval set x "$CONFIG_FILES" ;;
3208   *)   set x $CONFIG_FILES ;;
3209   esac
3210   shift
3211   for mf
3212   do
3213     # Strip MF so we end up with the name of the file.
3214     mf=`echo "$mf" | sed -e 's/:.*$//'`
3215     # Check whether this is an Automake generated Makefile or not.
3216     # We used to match only the files named 'Makefile.in', but
3217     # some people rename them; so instead we look at the file content.
3218     # Grep'ing the first line is not enough: some people post-process
3219     # each Makefile.in and add a new line on top of each file to say so.
3220     # Grep'ing the whole file is not good either: AIX grep has a line
3221     # limit of 2048, but all sed's we know have understand at least 4000.
3222     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3223       dirpart=`AS_DIRNAME("$mf")`
3224     else
3225       continue
3226     fi
3227     # Extract the definition of DEPDIR, am__include, and am__quote
3228     # from the Makefile without running 'make'.
3229     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3230     test -z "$DEPDIR" && continue
3231     am__include=`sed -n 's/^am__include = //p' < "$mf"`
3232     test -z "$am__include" && continue
3233     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3234     # Find all dependency output files, they are included files with
3235     # $(DEPDIR) in their names.  We invoke sed twice because it is the
3236     # simplest approach to changing $(DEPDIR) to its actual value in the
3237     # expansion.
3238     for file in `sed -n "
3239       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3240          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
3241       # Make sure the directory exists.
3242       test -f "$dirpart/$file" && continue
3243       fdir=`AS_DIRNAME(["$file"])`
3244       AS_MKDIR_P([$dirpart/$fdir])
3245       # echo "creating $dirpart/$file"
3246       echo '# dummy' > "$dirpart/$file"
3247     done
3248   done
3249 }
3250 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3251
3252
3253 # AM_OUTPUT_DEPENDENCY_COMMANDS
3254 # -----------------------------
3255 # This macro should only be invoked once -- use via AC_REQUIRE.
3256 #
3257 # This code is only required when automatic dependency tracking
3258 # is enabled.  FIXME.  This creates each '.P' file that we will
3259 # need in order to bootstrap the dependency handling code.
3260 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3261 [AC_CONFIG_COMMANDS([depfiles],
3262      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3263      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3264 ])
3265
3266 # Do all the work for Automake.                             -*- Autoconf -*-
3267
3268 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
3269 #
3270 # This file is free software; the Free Software Foundation
3271 # gives unlimited permission to copy and/or distribute it,
3272 # with or without modifications, as long as this notice is preserved.
3273
3274 # This macro actually does too much.  Some checks are only needed if
3275 # your package does certain things.  But this isn't really a big deal.
3276
3277 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
3278 m4_define([AC_PROG_CC],
3279 m4_defn([AC_PROG_CC])
3280 [_AM_PROG_CC_C_O
3281 ])
3282
3283 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3284 # AM_INIT_AUTOMAKE([OPTIONS])
3285 # -----------------------------------------------
3286 # The call with PACKAGE and VERSION arguments is the old style
3287 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
3288 # and VERSION should now be passed to AC_INIT and removed from
3289 # the call to AM_INIT_AUTOMAKE.
3290 # We support both call styles for the transition.  After
3291 # the next Automake release, Autoconf can make the AC_INIT
3292 # arguments mandatory, and then we can depend on a new Autoconf
3293 # release and drop the old call support.
3294 AC_DEFUN([AM_INIT_AUTOMAKE],
3295 [AC_PREREQ([2.65])dnl
3296 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
3297 dnl the ones we care about.
3298 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3299 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3300 AC_REQUIRE([AC_PROG_INSTALL])dnl
3301 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3302   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3303   # is not polluted with repeated "-I."
3304   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3305   # test to see if srcdir already configured
3306   if test -f $srcdir/config.status; then
3307     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3308   fi
3309 fi
3310
3311 # test whether we have cygpath
3312 if test -z "$CYGPATH_W"; then
3313   if (cygpath --version) >/dev/null 2>/dev/null; then
3314     CYGPATH_W='cygpath -w'
3315   else
3316     CYGPATH_W=echo
3317   fi
3318 fi
3319 AC_SUBST([CYGPATH_W])
3320
3321 # Define the identity of the package.
3322 dnl Distinguish between old-style and new-style calls.
3323 m4_ifval([$2],
3324 [AC_DIAGNOSE([obsolete],
3325              [$0: two- and three-arguments forms are deprecated.])
3326 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3327  AC_SUBST([PACKAGE], [$1])dnl
3328  AC_SUBST([VERSION], [$2])],
3329 [_AM_SET_OPTIONS([$1])dnl
3330 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3331 m4_if(
3332   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
3333   [ok:ok],,
3334   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3335  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3336  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3337
3338 _AM_IF_OPTION([no-define],,
3339 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
3340  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
3341
3342 # Some tools Automake needs.
3343 AC_REQUIRE([AM_SANITY_CHECK])dnl
3344 AC_REQUIRE([AC_ARG_PROGRAM])dnl
3345 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
3346 AM_MISSING_PROG([AUTOCONF], [autoconf])
3347 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
3348 AM_MISSING_PROG([AUTOHEADER], [autoheader])
3349 AM_MISSING_PROG([MAKEINFO], [makeinfo])
3350 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3351 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3352 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3353 # For better backward compatibility.  To be removed once Automake 1.9.x
3354 # dies out for good.  For more background, see:
3355 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3356 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3357 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
3358 # We need awk for the "check" target (and possibly the TAP driver).  The
3359 # system "awk" is bad on some platforms.
3360 AC_REQUIRE([AC_PROG_AWK])dnl
3361 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3362 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3363 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3364               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3365                              [_AM_PROG_TAR([v7])])])
3366 _AM_IF_OPTION([no-dependencies],,
3367 [AC_PROVIDE_IFELSE([AC_PROG_CC],
3368                   [_AM_DEPENDENCIES([CC])],
3369                   [m4_define([AC_PROG_CC],
3370                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
3371 AC_PROVIDE_IFELSE([AC_PROG_CXX],
3372                   [_AM_DEPENDENCIES([CXX])],
3373                   [m4_define([AC_PROG_CXX],
3374                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
3375 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3376                   [_AM_DEPENDENCIES([OBJC])],
3377                   [m4_define([AC_PROG_OBJC],
3378                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
3379 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
3380                   [_AM_DEPENDENCIES([OBJCXX])],
3381                   [m4_define([AC_PROG_OBJCXX],
3382                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
3383 ])
3384 AC_REQUIRE([AM_SILENT_RULES])dnl
3385 dnl The testsuite driver may need to know about EXEEXT, so add the
3386 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
3387 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
3388 AC_CONFIG_COMMANDS_PRE(dnl
3389 [m4_provide_if([_AM_COMPILER_EXEEXT],
3390   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3391
3392 # POSIX will say in a future version that running "rm -f" with no argument
3393 # is OK; and we want to be able to make that assumption in our Makefile
3394 # recipes.  So use an aggressive probe to check that the usage we want is
3395 # actually supported "in the wild" to an acceptable degree.
3396 # See automake bug#10828.
3397 # To make any issue more visible, cause the running configure to be aborted
3398 # by default if the 'rm' program in use doesn't match our expectations; the
3399 # user can still override this though.
3400 if rm -f && rm -fr && rm -rf; then : OK; else
3401   cat >&2 <<'END'
3402 Oops!
3403
3404 Your 'rm' program seems unable to run without file operands specified
3405 on the command line, even when the '-f' option is present.  This is contrary
3406 to the behaviour of most rm programs out there, and not conforming with
3407 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3408
3409 Please tell bug-automake@gnu.org about your system, including the value
3410 of your $PATH and any error possibly output before this message.  This
3411 can help us improve future automake versions.
3412
3413 END
3414   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3415     echo 'Configuration will proceed anyway, since you have set the' >&2
3416     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3417     echo >&2
3418   else
3419     cat >&2 <<'END'
3420 Aborting the configuration process, to ensure you take notice of the issue.
3421
3422 You can download and install GNU coreutils to get an 'rm' implementation
3423 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3424
3425 If you want to complete the configuration process using your problematic
3426 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3427 to "yes", and re-run configure.
3428
3429 END
3430     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
3431   fi
3432 fi
3433 dnl The trailing newline in this macro's definition is deliberate, for
3434 dnl backward compatibility and to allow trailing 'dnl'-style comments
3435 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
3436 ])
3437
3438 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
3439 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3440 dnl mangled by Autoconf and run in a shell conditional statement.
3441 m4_define([_AC_COMPILER_EXEEXT],
3442 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3443
3444 # When config.status generates a header, we must update the stamp-h file.
3445 # This file resides in the same directory as the config header
3446 # that is generated.  The stamp files are numbered to have different names.
3447
3448 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3449 # loop where config.status creates the headers, so we can generate
3450 # our stamp files there.
3451 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3452 [# Compute $1's index in $config_headers.
3453 _am_arg=$1
3454 _am_stamp_count=1
3455 for _am_header in $config_headers :; do
3456   case $_am_header in
3457     $_am_arg | $_am_arg:* )
3458       break ;;
3459     * )
3460       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3461   esac
3462 done
3463 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3464
3465 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
3466 #
3467 # This file is free software; the Free Software Foundation
3468 # gives unlimited permission to copy and/or distribute it,
3469 # with or without modifications, as long as this notice is preserved.
3470
3471 # AM_PROG_INSTALL_SH
3472 # ------------------
3473 # Define $install_sh.
3474 AC_DEFUN([AM_PROG_INSTALL_SH],
3475 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3476 if test x"${install_sh+set}" != xset; then
3477   case $am_aux_dir in
3478   *\ * | *\     *)
3479     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3480   *)
3481     install_sh="\${SHELL} $am_aux_dir/install-sh"
3482   esac
3483 fi
3484 AC_SUBST([install_sh])])
3485
3486 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
3487 #
3488 # This file is free software; the Free Software Foundation
3489 # gives unlimited permission to copy and/or distribute it,
3490 # with or without modifications, as long as this notice is preserved.
3491
3492 # Check whether the underlying file-system supports filenames
3493 # with a leading dot.  For instance MS-DOS doesn't.
3494 AC_DEFUN([AM_SET_LEADING_DOT],
3495 [rm -rf .tst 2>/dev/null
3496 mkdir .tst 2>/dev/null
3497 if test -d .tst; then
3498   am__leading_dot=.
3499 else
3500   am__leading_dot=_
3501 fi
3502 rmdir .tst 2>/dev/null
3503 AC_SUBST([am__leading_dot])])
3504
3505 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
3506
3507 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
3508 #
3509 # This file is free software; the Free Software Foundation
3510 # gives unlimited permission to copy and/or distribute it,
3511 # with or without modifications, as long as this notice is preserved.
3512
3513 # AM_MAKE_INCLUDE()
3514 # -----------------
3515 # Check to see how make treats includes.
3516 AC_DEFUN([AM_MAKE_INCLUDE],
3517 [am_make=${MAKE-make}
3518 cat > confinc << 'END'
3519 am__doit:
3520         @echo this is the am__doit target
3521 .PHONY: am__doit
3522 END
3523 # If we don't find an include directive, just comment out the code.
3524 AC_MSG_CHECKING([for style of include used by $am_make])
3525 am__include="#"
3526 am__quote=
3527 _am_result=none
3528 # First try GNU make style include.
3529 echo "include confinc" > confmf
3530 # Ignore all kinds of additional output from 'make'.
3531 case `$am_make -s -f confmf 2> /dev/null` in #(
3532 *the\ am__doit\ target*)
3533   am__include=include
3534   am__quote=
3535   _am_result=GNU
3536   ;;
3537 esac
3538 # Now try BSD make style include.
3539 if test "$am__include" = "#"; then
3540    echo '.include "confinc"' > confmf
3541    case `$am_make -s -f confmf 2> /dev/null` in #(
3542    *the\ am__doit\ target*)
3543      am__include=.include
3544      am__quote="\""
3545      _am_result=BSD
3546      ;;
3547    esac
3548 fi
3549 AC_SUBST([am__include])
3550 AC_SUBST([am__quote])
3551 AC_MSG_RESULT([$_am_result])
3552 rm -f confinc confmf
3553 ])
3554
3555 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
3556
3557 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
3558 #
3559 # This file is free software; the Free Software Foundation
3560 # gives unlimited permission to copy and/or distribute it,
3561 # with or without modifications, as long as this notice is preserved.
3562
3563 # AM_MISSING_PROG(NAME, PROGRAM)
3564 # ------------------------------
3565 AC_DEFUN([AM_MISSING_PROG],
3566 [AC_REQUIRE([AM_MISSING_HAS_RUN])
3567 $1=${$1-"${am_missing_run}$2"}
3568 AC_SUBST($1)])
3569
3570 # AM_MISSING_HAS_RUN
3571 # ------------------
3572 # Define MISSING if not defined so far and test if it is modern enough.
3573 # If it is, set am_missing_run to use it, otherwise, to nothing.
3574 AC_DEFUN([AM_MISSING_HAS_RUN],
3575 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3576 AC_REQUIRE_AUX_FILE([missing])dnl
3577 if test x"${MISSING+set}" != xset; then
3578   case $am_aux_dir in
3579   *\ * | *\     *)
3580     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3581   *)
3582     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3583   esac
3584 fi
3585 # Use eval to expand $SHELL
3586 if eval "$MISSING --is-lightweight"; then
3587   am_missing_run="$MISSING "
3588 else
3589   am_missing_run=
3590   AC_MSG_WARN(['missing' script is too old or missing])
3591 fi
3592 ])
3593
3594 # Helper functions for option handling.                     -*- Autoconf -*-
3595
3596 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
3597 #
3598 # This file is free software; the Free Software Foundation
3599 # gives unlimited permission to copy and/or distribute it,
3600 # with or without modifications, as long as this notice is preserved.
3601
3602 # _AM_MANGLE_OPTION(NAME)
3603 # -----------------------
3604 AC_DEFUN([_AM_MANGLE_OPTION],
3605 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3606
3607 # _AM_SET_OPTION(NAME)
3608 # --------------------
3609 # Set option NAME.  Presently that only means defining a flag for this option.
3610 AC_DEFUN([_AM_SET_OPTION],
3611 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
3612
3613 # _AM_SET_OPTIONS(OPTIONS)
3614 # ------------------------
3615 # OPTIONS is a space-separated list of Automake options.
3616 AC_DEFUN([_AM_SET_OPTIONS],
3617 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3618
3619 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3620 # -------------------------------------------
3621 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3622 AC_DEFUN([_AM_IF_OPTION],
3623 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3624
3625 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
3626 #
3627 # This file is free software; the Free Software Foundation
3628 # gives unlimited permission to copy and/or distribute it,
3629 # with or without modifications, as long as this notice is preserved.
3630
3631 # _AM_PROG_CC_C_O
3632 # ---------------
3633 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
3634 # to automatically call this.
3635 AC_DEFUN([_AM_PROG_CC_C_O],
3636 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3637 AC_REQUIRE_AUX_FILE([compile])dnl
3638 AC_LANG_PUSH([C])dnl
3639 AC_CACHE_CHECK(
3640   [whether $CC understands -c and -o together],
3641   [am_cv_prog_cc_c_o],
3642   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
3643   # Make sure it works both with $CC and with simple cc.
3644   # Following AC_PROG_CC_C_O, we do the test twice because some
3645   # compilers refuse to overwrite an existing .o file with -o,
3646   # though they will create one.
3647   am_cv_prog_cc_c_o=yes
3648   for am_i in 1 2; do
3649     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
3650          && test -f conftest2.$ac_objext; then
3651       : OK
3652     else
3653       am_cv_prog_cc_c_o=no
3654       break
3655     fi
3656   done
3657   rm -f core conftest*
3658   unset am_i])
3659 if test "$am_cv_prog_cc_c_o" != yes; then
3660    # Losing compiler, so override with the script.
3661    # FIXME: It is wrong to rewrite CC.
3662    # But if we don't then we get into trouble of one sort or another.
3663    # A longer-term fix would be to have automake use am__CC in this case,
3664    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3665    CC="$am_aux_dir/compile $CC"
3666 fi
3667 AC_LANG_POP([C])])
3668
3669 # For backward compatibility.
3670 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
3671
3672 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
3673 #
3674 # This file is free software; the Free Software Foundation
3675 # gives unlimited permission to copy and/or distribute it,
3676 # with or without modifications, as long as this notice is preserved.
3677
3678 # AM_RUN_LOG(COMMAND)
3679 # -------------------
3680 # Run COMMAND, save the exit status in ac_status, and log it.
3681 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
3682 AC_DEFUN([AM_RUN_LOG],
3683 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
3684    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
3685    ac_status=$?
3686    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3687    (exit $ac_status); }])
3688
3689 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
3690
3691 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
3692 #
3693 # This file is free software; the Free Software Foundation
3694 # gives unlimited permission to copy and/or distribute it,
3695 # with or without modifications, as long as this notice is preserved.
3696
3697 # AM_SANITY_CHECK
3698 # ---------------
3699 AC_DEFUN([AM_SANITY_CHECK],
3700 [AC_MSG_CHECKING([whether build environment is sane])
3701 # Reject unsafe characters in $srcdir or the absolute working directory
3702 # name.  Accept space and tab only in the latter.
3703 am_lf='
3704 '
3705 case `pwd` in
3706   *[[\\\"\#\$\&\'\`$am_lf]]*)
3707     AC_MSG_ERROR([unsafe absolute working directory name]);;
3708 esac
3709 case $srcdir in
3710   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
3711     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
3712 esac
3713
3714 # Do 'set' in a subshell so we don't clobber the current shell's
3715 # arguments.  Must try -L first in case configure is actually a
3716 # symlink; some systems play weird games with the mod time of symlinks
3717 # (eg FreeBSD returns the mod time of the symlink's containing
3718 # directory).
3719 if (
3720    am_has_slept=no
3721    for am_try in 1 2; do
3722      echo "timestamp, slept: $am_has_slept" > conftest.file
3723      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3724      if test "$[*]" = "X"; then
3725         # -L didn't work.
3726         set X `ls -t "$srcdir/configure" conftest.file`
3727      fi
3728      if test "$[*]" != "X $srcdir/configure conftest.file" \
3729         && test "$[*]" != "X conftest.file $srcdir/configure"; then
3730
3731         # If neither matched, then we have a broken ls.  This can happen
3732         # if, for instance, CONFIG_SHELL is bash and it inherits a
3733         # broken ls alias from the environment.  This has actually
3734         # happened.  Such a system could not be considered "sane".
3735         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
3736   alias in your environment])
3737      fi
3738      if test "$[2]" = conftest.file || test $am_try -eq 2; then
3739        break
3740      fi
3741      # Just in case.
3742      sleep 1
3743      am_has_slept=yes
3744    done
3745    test "$[2]" = conftest.file
3746    )
3747 then
3748    # Ok.
3749    :
3750 else
3751    AC_MSG_ERROR([newly created file is older than distributed files!
3752 Check your system clock])
3753 fi
3754 AC_MSG_RESULT([yes])
3755 # If we didn't sleep, we still need to ensure time stamps of config.status and
3756 # generated files are strictly newer.
3757 am_sleep_pid=
3758 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3759   ( sleep 1 ) &
3760   am_sleep_pid=$!
3761 fi
3762 AC_CONFIG_COMMANDS_PRE(
3763   [AC_MSG_CHECKING([that generated files are newer than configure])
3764    if test -n "$am_sleep_pid"; then
3765      # Hide warnings about reused PIDs.
3766      wait $am_sleep_pid 2>/dev/null
3767    fi
3768    AC_MSG_RESULT([done])])
3769 rm -f conftest.file
3770 ])
3771
3772 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
3773 #
3774 # This file is free software; the Free Software Foundation
3775 # gives unlimited permission to copy and/or distribute it,
3776 # with or without modifications, as long as this notice is preserved.
3777
3778 # AM_SILENT_RULES([DEFAULT])
3779 # --------------------------
3780 # Enable less verbose build rules; with the default set to DEFAULT
3781 # ("yes" being less verbose, "no" or empty being verbose).
3782 AC_DEFUN([AM_SILENT_RULES],
3783 [AC_ARG_ENABLE([silent-rules], [dnl
3784 AS_HELP_STRING(
3785   [--enable-silent-rules],
3786   [less verbose build output (undo: "make V=1")])
3787 AS_HELP_STRING(
3788   [--disable-silent-rules],
3789   [verbose build output (undo: "make V=0")])dnl
3790 ])
3791 case $enable_silent_rules in @%:@ (((
3792   yes) AM_DEFAULT_VERBOSITY=0;;
3793    no) AM_DEFAULT_VERBOSITY=1;;
3794     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
3795 esac
3796 dnl
3797 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
3798 dnl do not support nested variable expansions.
3799 dnl See automake bug#9928 and bug#10237.
3800 am_make=${MAKE-make}
3801 AC_CACHE_CHECK([whether $am_make supports nested variables],
3802    [am_cv_make_support_nested_variables],
3803    [if AS_ECHO([['TRUE=$(BAR$(V))
3804 BAR0=false
3805 BAR1=true
3806 V=1
3807 am__doit:
3808         @$(TRUE)
3809 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
3810   am_cv_make_support_nested_variables=yes
3811 else
3812   am_cv_make_support_nested_variables=no
3813 fi])
3814 if test $am_cv_make_support_nested_variables = yes; then
3815   dnl Using '$V' instead of '$(V)' breaks IRIX make.
3816   AM_V='$(V)'
3817   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3818 else
3819   AM_V=$AM_DEFAULT_VERBOSITY
3820   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3821 fi
3822 AC_SUBST([AM_V])dnl
3823 AM_SUBST_NOTMAKE([AM_V])dnl
3824 AC_SUBST([AM_DEFAULT_V])dnl
3825 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
3826 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
3827 AM_BACKSLASH='\'
3828 AC_SUBST([AM_BACKSLASH])dnl
3829 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
3830 ])
3831
3832 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
3833 #
3834 # This file is free software; the Free Software Foundation
3835 # gives unlimited permission to copy and/or distribute it,
3836 # with or without modifications, as long as this notice is preserved.
3837
3838 # AM_PROG_INSTALL_STRIP
3839 # ---------------------
3840 # One issue with vendor 'install' (even GNU) is that you can't
3841 # specify the program used to strip binaries.  This is especially
3842 # annoying in cross-compiling environments, where the build's strip
3843 # is unlikely to handle the host's binaries.
3844 # Fortunately install-sh will honor a STRIPPROG variable, so we
3845 # always use install-sh in "make install-strip", and initialize
3846 # STRIPPROG with the value of the STRIP variable (set by the user).
3847 AC_DEFUN([AM_PROG_INSTALL_STRIP],
3848 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3849 # Installed binaries are usually stripped using 'strip' when the user
3850 # run "make install-strip".  However 'strip' might not be the right
3851 # tool to use in cross-compilation environments, therefore Automake
3852 # will honor the 'STRIP' environment variable to overrule this program.
3853 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
3854 if test "$cross_compiling" != no; then
3855   AC_CHECK_TOOL([STRIP], [strip], :)
3856 fi
3857 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3858 AC_SUBST([INSTALL_STRIP_PROGRAM])])
3859
3860 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
3861 #
3862 # This file is free software; the Free Software Foundation
3863 # gives unlimited permission to copy and/or distribute it,
3864 # with or without modifications, as long as this notice is preserved.
3865
3866 # _AM_SUBST_NOTMAKE(VARIABLE)
3867 # ---------------------------
3868 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
3869 # This macro is traced by Automake.
3870 AC_DEFUN([_AM_SUBST_NOTMAKE])
3871
3872 # AM_SUBST_NOTMAKE(VARIABLE)
3873 # --------------------------
3874 # Public sister of _AM_SUBST_NOTMAKE.
3875 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
3876
3877 # Check how to create a tarball.                            -*- Autoconf -*-
3878
3879 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
3880 #
3881 # This file is free software; the Free Software Foundation
3882 # gives unlimited permission to copy and/or distribute it,
3883 # with or without modifications, as long as this notice is preserved.
3884
3885 # _AM_PROG_TAR(FORMAT)
3886 # --------------------
3887 # Check how to create a tarball in format FORMAT.
3888 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
3889 #
3890 # Substitute a variable $(am__tar) that is a command
3891 # writing to stdout a FORMAT-tarball containing the directory
3892 # $tardir.
3893 #     tardir=directory && $(am__tar) > result.tar
3894 #
3895 # Substitute a variable $(am__untar) that extract such
3896 # a tarball read from stdin.
3897 #     $(am__untar) < result.tar
3898 #
3899 AC_DEFUN([_AM_PROG_TAR],
3900 [# Always define AMTAR for backward compatibility.  Yes, it's still used
3901 # in the wild :-(  We should find a proper way to deprecate it ...
3902 AC_SUBST([AMTAR], ['$${TAR-tar}'])
3903
3904 # We'll loop over all known methods to create a tar archive until one works.
3905 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
3906
3907 m4_if([$1], [v7],
3908   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
3909
3910   [m4_case([$1],
3911     [ustar],
3912      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
3913       # There is notably a 21 bits limit for the UID and the GID.  In fact,
3914       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
3915       # and bug#13588).
3916       am_max_uid=2097151 # 2^21 - 1
3917       am_max_gid=$am_max_uid
3918       # The $UID and $GID variables are not portable, so we need to resort
3919       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
3920       # below are definitely unexpected, so allow the users to see them
3921       # (that is, avoid stderr redirection).
3922       am_uid=`id -u || echo unknown`
3923       am_gid=`id -g || echo unknown`
3924       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
3925       if test $am_uid -le $am_max_uid; then
3926          AC_MSG_RESULT([yes])
3927       else
3928          AC_MSG_RESULT([no])
3929          _am_tools=none
3930       fi
3931       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
3932       if test $am_gid -le $am_max_gid; then
3933          AC_MSG_RESULT([yes])
3934       else
3935         AC_MSG_RESULT([no])
3936         _am_tools=none
3937       fi],
3938
3939   [pax],
3940     [],
3941
3942   [m4_fatal([Unknown tar format])])
3943
3944   AC_MSG_CHECKING([how to create a $1 tar archive])
3945
3946   # Go ahead even if we have the value already cached.  We do so because we
3947   # need to set the values for the 'am__tar' and 'am__untar' variables.
3948   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
3949
3950   for _am_tool in $_am_tools; do
3951     case $_am_tool in
3952     gnutar)
3953       for _am_tar in tar gnutar gtar; do
3954         AM_RUN_LOG([$_am_tar --version]) && break
3955       done
3956       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
3957       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
3958       am__untar="$_am_tar -xf -"
3959       ;;
3960     plaintar)
3961       # Must skip GNU tar: if it does not support --format= it doesn't create
3962       # ustar tarball either.
3963       (tar --version) >/dev/null 2>&1 && continue
3964       am__tar='tar chf - "$$tardir"'
3965       am__tar_='tar chf - "$tardir"'
3966       am__untar='tar xf -'
3967       ;;
3968     pax)
3969       am__tar='pax -L -x $1 -w "$$tardir"'
3970       am__tar_='pax -L -x $1 -w "$tardir"'
3971       am__untar='pax -r'
3972       ;;
3973     cpio)
3974       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3975       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3976       am__untar='cpio -i -H $1 -d'
3977       ;;
3978     none)
3979       am__tar=false
3980       am__tar_=false
3981       am__untar=false
3982       ;;
3983     esac
3984
3985     # If the value was cached, stop now.  We just wanted to have am__tar
3986     # and am__untar set.
3987     test -n "${am_cv_prog_tar_$1}" && break
3988
3989     # tar/untar a dummy directory, and stop if the command works.
3990     rm -rf conftest.dir
3991     mkdir conftest.dir
3992     echo GrepMe > conftest.dir/file
3993     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
3994     rm -rf conftest.dir
3995     if test -s conftest.tar; then
3996       AM_RUN_LOG([$am__untar <conftest.tar])
3997       AM_RUN_LOG([cat conftest.dir/file])
3998       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3999     fi
4000   done
4001   rm -rf conftest.dir
4002
4003   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
4004   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
4005
4006 AC_SUBST([am__tar])
4007 AC_SUBST([am__untar])
4008 ]) # _AM_PROG_TAR
4009