1 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23 # gettext.m4 serial 66 (gettext-0.18.2)
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.
29 dnl This file can 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
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 package is covered by the GNU General Public License.
36 dnl They are *not* in the public domain.
39 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
40 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
42 dnl Macro to add for using GNU gettext.
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.
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
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
79 AC_DEFUN([AM_GNU_GETTEXT],
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
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
90 define([gt_included_intl],
91 ifelse([$1], [external],
92 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
94 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
96 AM_GNU_GETTEXT_NEED([$2])
98 AC_REQUIRE([AM_PO_SUBDIRS])dnl
99 ifelse(gt_included_intl, yes, [
100 AC_REQUIRE([AM_INTL_SUBDIR])dnl
103 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
104 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
105 AC_REQUIRE([AC_LIB_RPATH])
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])
122 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
128 ifelse(gt_included_intl, yes, [
129 BUILD_INCLUDED_LIBINTL=no
130 USE_INCLUDED_LIBINTL=no
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 ;;
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"
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])
156 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
157 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
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.
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)
169 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
173 gt_revision_test_code=
175 if test $gt_api_version -ge 2; then
176 gt_expression_test_code=' + * ngettext ("", "", 0)'
178 gt_expression_test_code=
181 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
186 $gt_revision_test_code
187 extern int _nl_msg_cat_cntr;
188 extern int *_nl_domain_bindings;
191 bindtextdomain ("", "");
192 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
194 [eval "$gt_func_gnugettext_libc=yes"],
195 [eval "$gt_func_gnugettext_libc=no"])])
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, , [
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"
212 LIBS="$LIBS $LIBINTL"
213 dnl Now see whether libintl exists and does not depend on libiconv.
218 $gt_revision_test_code
219 extern int _nl_msg_cat_cntr;
224 const char *_nl_expand_alias (const char *);
227 bindtextdomain ("", "");
228 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
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"
239 $gt_revision_test_code
240 extern int _nl_msg_cat_cntr;
245 const char *_nl_expand_alias (const char *);
248 bindtextdomain ("", "");
249 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
251 [LIBINTL="$LIBINTL $LIBICONV"
252 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
253 eval "$gt_func_gnugettext_libintl=yes"
256 CPPFLAGS="$gt_save_CPPFLAGS"
257 LIBS="$gt_save_LIBS"])
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
270 dnl Reset the values set by searching for libintl.
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
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/ $//'`
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.
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"
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
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"
331 gt_source="included intl directory"
333 AC_MSG_RESULT([$gt_source])
336 if test "$USE_NLS" = "yes"; then
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])
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.])
352 dnl We need to process the po/ directory.
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
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])
368 dnl For backward compatibility. Some configure.ins may be using this.
372 dnl For backward compatibility. Some Makefiles may be using this.
374 AC_SUBST([DATADIRNAME])
376 dnl For backward compatibility. Some Makefiles may be using this.
378 AC_SUBST([INSTOBJEXT])
380 dnl For backward compatibility. Some Makefiles may be using this.
384 dnl For backward compatibility. Some Makefiles may be using this.
386 if test "$USE_INCLUDED_LIBINTL" = yes; then
387 INTLOBJS="\$(GETTOBJS)"
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])
396 dnl For backward compatibility. Some Makefiles may be using this.
400 dnl Make all documented variables known to autoconf.
402 AC_SUBST([LTLIBINTL])
407 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
408 m4_define([gt_NEEDS_INIT],
410 m4_divert_text([DEFAULTS], [gt_needs=])
411 m4_define([gt_NEEDS_INIT], [])
415 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
416 AC_DEFUN([AM_GNU_GETTEXT_NEED],
418 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
422 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
423 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
426 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
427 dnl the schema should be compiled
430 AC_DEFUN([GLIB_GSETTINGS],
432 m4_pattern_allow([AM_V_GEN])
433 AC_ARG_ENABLE(schemas-compile,
434 AS_HELP_STRING([--disable-schemas-compile],
435 [Disable regeneration of gschemas.compiled on install]),
436 [case ${enableval} in
437 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
438 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
439 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
441 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
442 PKG_PROG_PKG_CONFIG([0.16])
443 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
444 if test x$cross_compiling != xyes; then
445 GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
447 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
449 AC_SUBST(GLIB_COMPILE_SCHEMAS)
450 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
451 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
453 ifelse([$1],,[:],[$1])
457 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
459 mostlyclean-am: clean-gsettings-schemas
461 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
463 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
464 $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
466 all-am: $(gsettings_SCHEMAS:.xml=.valid)
467 uninstall-am: uninstall-gsettings-schemas
468 install-data-am: install-gsettings-schemas
470 .SECONDARY: $(gsettings_SCHEMAS)
472 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
474 if test -n "$^"; then \
475 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
476 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
477 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
480 uninstall-gsettings-schemas:
482 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
483 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
484 test -n "$$files" || exit 0; \
485 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
486 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
487 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
489 clean-gsettings-schemas:
490 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
492 ifdef gsettings_ENUM_NAMESPACE
493 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
494 $(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 [$]@
497 _GSETTINGS_SUBST(GSETTINGS_RULES)
500 dnl _GSETTINGS_SUBST(VARIABLE)
501 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
502 AC_DEFUN([_GSETTINGS_SUBST],
505 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
509 # iconv.m4 serial 18 (gettext-0.18.2)
510 dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
511 dnl This file is free software; the Free Software Foundation
512 dnl gives unlimited permission to copy and/or distribute it,
513 dnl with or without modifications, as long as this notice is preserved.
515 dnl From Bruno Haible.
517 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
519 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
520 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
521 AC_REQUIRE([AC_LIB_RPATH])
523 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
525 AC_LIB_LINKFLAGS_BODY([iconv])
528 AC_DEFUN([AM_ICONV_LINK],
530 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
531 dnl those with the standalone portable GNU libiconv installed).
532 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
534 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
536 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
538 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
539 dnl because if the user has installed libiconv and not disabled its use
540 dnl via --without-libiconv-prefix, he wants to use it. The first
541 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
542 am_save_CPPFLAGS="$CPPFLAGS"
543 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
545 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
546 am_cv_func_iconv="no, consider installing GNU libiconv"
554 [[iconv_t cd = iconv_open("","");
555 iconv(cd,NULL,NULL,NULL,NULL);
556 iconv_close(cd);]])],
557 [am_cv_func_iconv=yes])
558 if test "$am_cv_func_iconv" != yes; then
560 LIBS="$LIBS $LIBICONV"
567 [[iconv_t cd = iconv_open("","");
568 iconv(cd,NULL,NULL,NULL,NULL);
569 iconv_close(cd);]])],
570 [am_cv_lib_iconv=yes]
571 [am_cv_func_iconv=yes])
575 if test "$am_cv_func_iconv" = yes; then
576 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
577 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
580 if test $am_cv_lib_iconv = yes; then
581 LIBS="$LIBS $LIBICONV"
590 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
593 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
594 if (cd_utf8_to_88591 != (iconv_t)(-1))
596 static const char input[] = "\342\202\254"; /* EURO SIGN */
598 const char *inptr = input;
599 size_t inbytesleft = strlen (input);
601 size_t outbytesleft = sizeof (buf);
602 size_t res = iconv (cd_utf8_to_88591,
603 (char **) &inptr, &inbytesleft,
604 &outptr, &outbytesleft);
607 iconv_close (cd_utf8_to_88591);
610 /* Test against Solaris 10 bug: Failures are not distinguishable from
611 successful returns. */
613 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
614 if (cd_ascii_to_88591 != (iconv_t)(-1))
616 static const char input[] = "\263";
618 const char *inptr = input;
619 size_t inbytesleft = strlen (input);
621 size_t outbytesleft = sizeof (buf);
622 size_t res = iconv (cd_ascii_to_88591,
623 (char **) &inptr, &inbytesleft,
624 &outptr, &outbytesleft);
627 iconv_close (cd_ascii_to_88591);
630 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
632 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
633 if (cd_88591_to_utf8 != (iconv_t)(-1))
635 static const char input[] = "\304";
636 static char buf[2] = { (char)0xDE, (char)0xAD };
637 const char *inptr = input;
638 size_t inbytesleft = 1;
640 size_t outbytesleft = 1;
641 size_t res = iconv (cd_88591_to_utf8,
642 (char **) &inptr, &inbytesleft,
643 &outptr, &outbytesleft);
644 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
646 iconv_close (cd_88591_to_utf8);
649 #if 0 /* This bug could be worked around by the caller. */
650 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
652 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
653 if (cd_88591_to_utf8 != (iconv_t)(-1))
655 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
657 const char *inptr = input;
658 size_t inbytesleft = strlen (input);
660 size_t outbytesleft = sizeof (buf);
661 size_t res = iconv (cd_88591_to_utf8,
662 (char **) &inptr, &inbytesleft,
663 &outptr, &outbytesleft);
666 iconv_close (cd_88591_to_utf8);
670 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
672 if (/* Try standardized names. */
673 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
674 /* Try IRIX, OSF/1 names. */
675 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
677 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
678 /* Try HP-UX names. */
679 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
683 [am_cv_func_iconv_works=yes],
684 [am_cv_func_iconv_works=no],
688 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
689 *) am_cv_func_iconv_works="guessing yes" ;;
695 case "$am_cv_func_iconv_works" in
696 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
697 *) am_func_iconv=yes ;;
700 am_func_iconv=no am_cv_lib_iconv=no
702 if test "$am_func_iconv" = yes; then
703 AC_DEFINE([HAVE_ICONV], [1],
704 [Define if you have the iconv() function and it works.])
706 if test "$am_cv_lib_iconv" = yes; then
707 AC_MSG_CHECKING([how to link with libiconv])
708 AC_MSG_RESULT([$LIBICONV])
710 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
712 CPPFLAGS="$am_save_CPPFLAGS"
717 AC_SUBST([LTLIBICONV])
720 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
721 dnl avoid warnings like
722 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
723 dnl This is tricky because of the way 'aclocal' is implemented:
724 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
725 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
726 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
727 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
729 m4_define([gl_iconv_AC_DEFUN],
730 m4_version_prereq([2.64],
733 [m4_ifdef([gl_00GNULIB],
738 gl_iconv_AC_DEFUN([AM_ICONV],
741 if test "$am_cv_func_iconv" = yes; then
742 AC_MSG_CHECKING([for iconv declaration])
743 AC_CACHE_VAL([am_cv_proto_iconv], [
753 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
754 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
760 [am_cv_proto_iconv_arg1=""],
761 [am_cv_proto_iconv_arg1="const"])
762 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);"])
763 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
766 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
767 [Define as const if the declaration of iconv() needs const.])
768 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
769 m4_ifdef([gl_ICONV_H_DEFAULTS],
770 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
771 if test -n "$am_cv_proto_iconv_arg1"; then
778 # intlmacosx.m4 serial 5 (gettext-0.18.2)
779 dnl Copyright (C) 2004-2014 Free Software Foundation, Inc.
780 dnl This file is free software; the Free Software Foundation
781 dnl gives unlimited permission to copy and/or distribute it,
782 dnl with or without modifications, as long as this notice is preserved.
784 dnl This file can can be used in projects which are not available under
785 dnl the GNU General Public License or the GNU Library General Public
786 dnl License but which still want to provide support for the GNU gettext
788 dnl Please note that the actual code of the GNU gettext library is covered
789 dnl by the GNU Library General Public License, and the rest of the GNU
790 dnl gettext package package is covered by the GNU General Public License.
791 dnl They are *not* in the public domain.
793 dnl Checks for special options needed on Mac OS X.
794 dnl Defines INTL_MACOSX_LIBS.
795 AC_DEFUN([gt_INTL_MACOSX],
797 dnl Check for API introduced in Mac OS X 10.2.
798 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
799 [gt_cv_func_CFPreferencesCopyAppValue],
800 [gt_save_LIBS="$LIBS"
801 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
804 [[#include <CoreFoundation/CFPreferences.h>]],
805 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
806 [gt_cv_func_CFPreferencesCopyAppValue=yes],
807 [gt_cv_func_CFPreferencesCopyAppValue=no])
808 LIBS="$gt_save_LIBS"])
809 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
810 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
811 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
813 dnl Check for API introduced in Mac OS X 10.3.
814 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
815 [gt_save_LIBS="$LIBS"
816 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
819 [[#include <CoreFoundation/CFLocale.h>]],
820 [[CFLocaleCopyCurrent();]])],
821 [gt_cv_func_CFLocaleCopyCurrent=yes],
822 [gt_cv_func_CFLocaleCopyCurrent=no])
823 LIBS="$gt_save_LIBS"])
824 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
825 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
826 [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
829 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
830 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
832 AC_SUBST([INTL_MACOSX_LIBS])
836 dnl Copyright (C) 1996-2003, 2009-2014 Free Software Foundation, Inc.
837 dnl This file is free software; the Free Software Foundation
838 dnl gives unlimited permission to copy and/or distribute it,
839 dnl with or without modifications, as long as this notice is preserved.
841 dnl Subroutines of libtool.m4,
842 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
843 dnl collision with libtool.m4.
845 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
846 AC_DEFUN([AC_LIB_PROG_LD_GNU],
847 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
848 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
849 case `$LD -v 2>&1 </dev/null` in
850 *GNU* | *'with BFD'*)
851 acl_cv_prog_gnu_ld=yes
854 acl_cv_prog_gnu_ld=no
857 with_gnu_ld=$acl_cv_prog_gnu_ld
860 dnl From libtool-2.4. Sets the variable LD.
861 AC_DEFUN([AC_LIB_PROG_LD],
862 [AC_REQUIRE([AC_PROG_CC])dnl
863 AC_REQUIRE([AC_CANONICAL_HOST])dnl
865 AC_ARG_WITH([gnu-ld],
866 [AS_HELP_STRING([--with-gnu-ld],
867 [assume the C compiler uses GNU ld [default=no]])],
868 [test "$withval" = no || with_gnu_ld=yes],
871 # Prepare PATH_SEPARATOR.
872 # The user is always right.
873 if test "${PATH_SEPARATOR+set}" != set; then
874 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
875 # contains only /bin. Note that ksh looks also at the FPATH variable,
876 # so we have to set that as well for the test.
878 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
879 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
880 || PATH_SEPARATOR=';'
885 if test "$GCC" = yes; then
886 # Check if gcc -print-prog-name=ld gives a path.
887 AC_MSG_CHECKING([for ld used by $CC])
890 # gcc leaves a trailing carriage return which upsets mingw
891 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
893 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
896 # Accept absolute paths.
897 [[\\/]]* | ?:[[\\/]]*)
898 re_direlt='/[[^/]][[^/]]*/\.\./'
899 # Canonicalize the pathname of ld
900 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
901 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
902 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
904 test -z "$LD" && LD="$ac_prog"
907 # If it fails, then pretend we aren't using GCC.
911 # If it is relative, then search for the first ld in PATH.
915 elif test "$with_gnu_ld" = yes; then
916 AC_MSG_CHECKING([for GNU ld])
918 AC_MSG_CHECKING([for non-GNU ld])
920 AC_CACHE_VAL([acl_cv_path_LD],
921 [if test -z "$LD"; then
922 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
923 for ac_dir in $PATH; do
925 test -z "$ac_dir" && ac_dir=.
926 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
927 acl_cv_path_LD="$ac_dir/$ac_prog"
928 # Check to see if the program is GNU ld. I'd rather use --version,
929 # but apparently some variants of GNU ld only accept -v.
930 # Break only if it was the GNU/non-GNU ld that we prefer.
931 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
932 *GNU* | *'with BFD'*)
933 test "$with_gnu_ld" != no && break
936 test "$with_gnu_ld" != yes && break
943 acl_cv_path_LD="$LD" # Let the user override the test with a path.
946 if test -n "$LD"; then
951 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
955 # lib-link.m4 serial 26 (gettext-0.18.2)
956 dnl Copyright (C) 2001-2014 Free Software Foundation, Inc.
957 dnl This file is free software; the Free Software Foundation
958 dnl gives unlimited permission to copy and/or distribute it,
959 dnl with or without modifications, as long as this notice is preserved.
961 dnl From Bruno Haible.
965 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
966 dnl the libraries corresponding to explicit and implicit dependencies.
967 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
968 dnl augments the CPPFLAGS variable.
969 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
970 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
971 AC_DEFUN([AC_LIB_LINKFLAGS],
973 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
974 AC_REQUIRE([AC_LIB_RPATH])
975 pushdef([Name],[m4_translit([$1],[./+-], [____])])
976 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
977 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
978 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
979 AC_LIB_LINKFLAGS_BODY([$1], [$2])
980 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
981 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
982 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
983 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
985 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
986 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
987 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
988 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
989 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
991 AC_SUBST([LTLIB]NAME)
992 AC_SUBST([LIB]NAME[_PREFIX])
993 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
994 dnl results of this search when this library appears as a dependency.
1000 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1001 dnl searches for libname and the libraries corresponding to explicit and
1002 dnl implicit dependencies, together with the specified include files and
1003 dnl the ability to compile and link the specified testcode. The missing-message
1004 dnl defaults to 'no' and may contain additional hints for the user.
1005 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1006 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1007 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1008 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1009 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1010 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1011 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1013 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1014 AC_REQUIRE([AC_LIB_RPATH])
1015 pushdef([Name],[m4_translit([$1],[./+-], [____])])
1016 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1017 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1019 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1021 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1023 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1024 dnl because if the user has installed lib[]Name and not disabled its use
1025 dnl via --without-lib[]Name-prefix, he wants to use it.
1026 ac_save_CPPFLAGS="$CPPFLAGS"
1027 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1029 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1030 ac_save_LIBS="$LIBS"
1031 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1032 dnl because these -l options might require -L options that are present in
1033 dnl LIBS. -l options benefit only from the -L options listed before it.
1034 dnl Otherwise, add it to the front of LIBS, because it may be a static
1035 dnl library that depends on another static library that is present in LIBS.
1036 dnl Static libraries benefit only from the static libraries listed after
1038 case " $LIB[]NAME" in
1039 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1040 *) LIBS="$LIB[]NAME $LIBS" ;;
1043 [AC_LANG_PROGRAM([[$3]], [[$4]])],
1044 [ac_cv_lib[]Name=yes],
1045 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1046 LIBS="$ac_save_LIBS"
1048 if test "$ac_cv_lib[]Name" = yes; then
1050 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1051 AC_MSG_CHECKING([how to link with lib[]$1])
1052 AC_MSG_RESULT([$LIB[]NAME])
1055 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1056 dnl $INC[]NAME either.
1057 CPPFLAGS="$ac_save_CPPFLAGS"
1062 AC_SUBST([HAVE_LIB]NAME)
1064 AC_SUBST([LTLIB]NAME)
1065 AC_SUBST([LIB]NAME[_PREFIX])
1070 dnl Determine the platform dependent parameters needed to use rpath:
1073 dnl acl_libname_spec,
1074 dnl acl_library_names_spec,
1075 dnl acl_hardcode_libdir_flag_spec,
1076 dnl acl_hardcode_libdir_separator,
1077 dnl acl_hardcode_direct,
1078 dnl acl_hardcode_minus_L.
1079 AC_DEFUN([AC_LIB_RPATH],
1081 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1082 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1083 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1084 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1085 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1086 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1087 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1088 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1089 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1095 acl_libext="$acl_cv_libext"
1096 acl_shlibext="$acl_cv_shlibext"
1097 acl_libname_spec="$acl_cv_libname_spec"
1098 acl_library_names_spec="$acl_cv_library_names_spec"
1099 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1100 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1101 acl_hardcode_direct="$acl_cv_hardcode_direct"
1102 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1103 dnl Determine whether the user wants rpath handling at all.
1104 AC_ARG_ENABLE([rpath],
1105 [ --disable-rpath do not hardcode runtime library paths],
1106 :, enable_rpath=yes)
1109 dnl AC_LIB_FROMPACKAGE(name, package)
1110 dnl declares that libname comes from the given package. The configure file
1111 dnl will then not have a --with-libname-prefix option but a
1112 dnl --with-package-prefix option. Several libraries can come from the same
1113 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1114 dnl macro call that searches for libname.
1115 AC_DEFUN([AC_LIB_FROMPACKAGE],
1117 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1118 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1119 define([acl_frompackage_]NAME, [$2])
1121 pushdef([PACK],[$2])
1122 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1123 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1124 define([acl_libsinpackage_]PACKUP,
1125 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
1130 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1131 dnl the libraries corresponding to explicit and implicit dependencies.
1132 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1133 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1134 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1135 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1137 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1138 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1139 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1140 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1141 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1142 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1143 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1144 dnl Autoconf >= 2.61 supports dots in --with options.
1145 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
1146 dnl By default, look in $includedir and $libdir.
1148 AC_LIB_WITH_FINAL_PREFIX([
1149 eval additional_includedir=\"$includedir\"
1150 eval additional_libdir=\"$libdir\"
1152 AC_ARG_WITH(P_A_C_K[-prefix],
1153 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1154 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1156 if test "X$withval" = "Xno"; then
1159 if test "X$withval" = "X"; then
1160 AC_LIB_WITH_FINAL_PREFIX([
1161 eval additional_includedir=\"$includedir\"
1162 eval additional_libdir=\"$libdir\"
1165 additional_includedir="$withval/include"
1166 additional_libdir="$withval/$acl_libdirstem"
1167 if test "$acl_libdirstem2" != "$acl_libdirstem" \
1168 && ! test -d "$withval/$acl_libdirstem"; then
1169 additional_libdir="$withval/$acl_libdirstem2"
1174 dnl Search the library and its dependencies in $additional_libdir and
1175 dnl $LDFLAGS. Using breadth-first-seach.
1180 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1181 dnl computed. So it has to be reset here.
1185 names_already_handled=
1186 names_next_round='$1 $2'
1187 while test -n "$names_next_round"; do
1188 names_this_round="$names_next_round"
1190 for name in $names_this_round; do
1192 for n in $names_already_handled; do
1193 if test "$n" = "$name"; then
1198 if test -z "$already_handled"; then
1199 names_already_handled="$names_already_handled $name"
1200 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1201 dnl or AC_LIB_HAVE_LINKFLAGS call.
1202 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
1203 eval value=\"\$HAVE_LIB$uppername\"
1204 if test -n "$value"; then
1205 if test "$value" = yes; then
1206 eval value=\"\$LIB$uppername\"
1207 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1208 eval value=\"\$LTLIB$uppername\"
1209 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1211 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1212 dnl that this library doesn't exist. So just drop it.
1216 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1217 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1222 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1223 if test -n "$acl_shlibext"; then
1224 shrext=".$acl_shlibext" # typically: shrext=.so
1228 if test $use_additional = yes; then
1229 dir="$additional_libdir"
1230 dnl The same code as in the loop below:
1231 dnl First look for a shared library.
1232 if test -n "$acl_shlibext"; then
1233 if test -f "$dir/$libname$shrext"; then
1235 found_so="$dir/$libname$shrext"
1237 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1238 ver=`(cd "$dir" && \
1239 for f in "$libname$shrext".*; do echo "$f"; done \
1240 | sed -e "s,^$libname$shrext\\\\.,," \
1241 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1242 | sed 1q ) 2>/dev/null`
1243 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1245 found_so="$dir/$libname$shrext.$ver"
1248 eval library_names=\"$acl_library_names_spec\"
1249 for f in $library_names; do
1250 if test -f "$dir/$f"; then
1259 dnl Then look for a static library.
1260 if test "X$found_dir" = "X"; then
1261 if test -f "$dir/$libname.$acl_libext"; then
1263 found_a="$dir/$libname.$acl_libext"
1266 if test "X$found_dir" != "X"; then
1267 if test -f "$dir/$libname.la"; then
1268 found_la="$dir/$libname.la"
1272 if test "X$found_dir" = "X"; then
1273 for x in $LDFLAGS $LTLIB[]NAME; do
1274 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1277 dir=`echo "X$x" | sed -e 's/^X-L//'`
1278 dnl First look for a shared library.
1279 if test -n "$acl_shlibext"; then
1280 if test -f "$dir/$libname$shrext"; then
1282 found_so="$dir/$libname$shrext"
1284 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1285 ver=`(cd "$dir" && \
1286 for f in "$libname$shrext".*; do echo "$f"; done \
1287 | sed -e "s,^$libname$shrext\\\\.,," \
1288 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1289 | sed 1q ) 2>/dev/null`
1290 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1292 found_so="$dir/$libname$shrext.$ver"
1295 eval library_names=\"$acl_library_names_spec\"
1296 for f in $library_names; do
1297 if test -f "$dir/$f"; then
1306 dnl Then look for a static library.
1307 if test "X$found_dir" = "X"; then
1308 if test -f "$dir/$libname.$acl_libext"; then
1310 found_a="$dir/$libname.$acl_libext"
1313 if test "X$found_dir" != "X"; then
1314 if test -f "$dir/$libname.la"; then
1315 found_la="$dir/$libname.la"
1320 if test "X$found_dir" != "X"; then
1325 if test "X$found_dir" != "X"; then
1326 dnl Found the library.
1327 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1328 if test "X$found_so" != "X"; then
1329 dnl Linking with a shared library. We attempt to hardcode its
1330 dnl directory into the executable's runpath, unless it's the
1331 dnl standard /usr/lib.
1332 if test "$enable_rpath" = no \
1333 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1334 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1335 dnl No hardcoding is needed.
1336 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1338 dnl Use an explicit option to hardcode DIR into the resulting
1340 dnl Potentially add DIR to ltrpathdirs.
1341 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1343 for x in $ltrpathdirs; do
1344 if test "X$x" = "X$found_dir"; then
1349 if test -z "$haveit"; then
1350 ltrpathdirs="$ltrpathdirs $found_dir"
1352 dnl The hardcoding into $LIBNAME is system dependent.
1353 if test "$acl_hardcode_direct" = yes; then
1354 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1355 dnl resulting binary.
1356 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1358 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1359 dnl Use an explicit option to hardcode DIR into the resulting
1361 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1362 dnl Potentially add DIR to rpathdirs.
1363 dnl The rpathdirs will be appended to $LIBNAME at the end.
1365 for x in $rpathdirs; do
1366 if test "X$x" = "X$found_dir"; then
1371 if test -z "$haveit"; then
1372 rpathdirs="$rpathdirs $found_dir"
1375 dnl Rely on "-L$found_dir".
1376 dnl But don't add it if it's already contained in the LDFLAGS
1377 dnl or the already constructed $LIBNAME
1379 for x in $LDFLAGS $LIB[]NAME; do
1380 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1381 if test "X$x" = "X-L$found_dir"; then
1386 if test -z "$haveit"; then
1387 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1389 if test "$acl_hardcode_minus_L" != no; then
1390 dnl FIXME: Not sure whether we should use
1391 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1393 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1395 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1396 dnl here, because this doesn't fit in flags passed to the
1397 dnl compiler. So give up. No hardcoding. This affects only
1398 dnl very old systems.
1399 dnl FIXME: Not sure whether we should use
1400 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1402 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1408 if test "X$found_a" != "X"; then
1409 dnl Linking with a static library.
1410 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1412 dnl We shouldn't come here, but anyway it's good to have a
1414 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1417 dnl Assume the include files are nearby.
1418 additional_includedir=
1419 case "$found_dir" in
1420 */$acl_libdirstem | */$acl_libdirstem/)
1421 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1422 if test "$name" = '$1'; then
1423 LIB[]NAME[]_PREFIX="$basedir"
1425 additional_includedir="$basedir/include"
1427 */$acl_libdirstem2 | */$acl_libdirstem2/)
1428 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1429 if test "$name" = '$1'; then
1430 LIB[]NAME[]_PREFIX="$basedir"
1432 additional_includedir="$basedir/include"
1435 if test "X$additional_includedir" != "X"; then
1436 dnl Potentially add $additional_includedir to $INCNAME.
1437 dnl But don't add it
1438 dnl 1. if it's the standard /usr/include,
1439 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1440 dnl 3. if it's already present in $CPPFLAGS or the already
1441 dnl constructed $INCNAME,
1442 dnl 4. if it doesn't exist as a directory.
1443 if test "X$additional_includedir" != "X/usr/include"; then
1445 if test "X$additional_includedir" = "X/usr/local/include"; then
1446 if test -n "$GCC"; then
1448 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1452 if test -z "$haveit"; then
1453 for x in $CPPFLAGS $INC[]NAME; do
1454 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1455 if test "X$x" = "X-I$additional_includedir"; then
1460 if test -z "$haveit"; then
1461 if test -d "$additional_includedir"; then
1462 dnl Really add $additional_includedir to $INCNAME.
1463 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1469 dnl Look for dependencies.
1470 if test -n "$found_la"; then
1471 dnl Read the .la file. It defines the variables
1472 dnl dlname, library_names, old_library, dependency_libs, current,
1473 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1474 save_libdir="$libdir"
1476 */* | *\\*) . "$found_la" ;;
1477 *) . "./$found_la" ;;
1479 libdir="$save_libdir"
1480 dnl We use only dependency_libs.
1481 for dep in $dependency_libs; do
1484 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1485 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1486 dnl But don't add it
1487 dnl 1. if it's the standard /usr/lib,
1488 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1489 dnl 3. if it's already present in $LDFLAGS or the already
1490 dnl constructed $LIBNAME,
1491 dnl 4. if it doesn't exist as a directory.
1492 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1493 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1495 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1496 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1497 if test -n "$GCC"; then
1499 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1503 if test -z "$haveit"; then
1505 for x in $LDFLAGS $LIB[]NAME; do
1506 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1507 if test "X$x" = "X-L$additional_libdir"; then
1512 if test -z "$haveit"; then
1513 if test -d "$additional_libdir"; then
1514 dnl Really add $additional_libdir to $LIBNAME.
1515 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1519 for x in $LDFLAGS $LTLIB[]NAME; do
1520 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1521 if test "X$x" = "X-L$additional_libdir"; then
1526 if test -z "$haveit"; then
1527 if test -d "$additional_libdir"; then
1528 dnl Really add $additional_libdir to $LTLIBNAME.
1529 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1536 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1537 if test "$enable_rpath" != no; then
1538 dnl Potentially add DIR to rpathdirs.
1539 dnl The rpathdirs will be appended to $LIBNAME at the end.
1541 for x in $rpathdirs; do
1542 if test "X$x" = "X$dir"; then
1547 if test -z "$haveit"; then
1548 rpathdirs="$rpathdirs $dir"
1550 dnl Potentially add DIR to ltrpathdirs.
1551 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1553 for x in $ltrpathdirs; do
1554 if test "X$x" = "X$dir"; then
1559 if test -z "$haveit"; then
1560 ltrpathdirs="$ltrpathdirs $dir"
1565 dnl Handle this in the next round.
1566 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1569 dnl Handle this in the next round. Throw away the .la's
1570 dnl directory; it is already contained in a preceding -L
1572 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1575 dnl Most likely an immediate library name.
1576 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1577 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1583 dnl Didn't find the library; assume it is in the system directories
1584 dnl known to the linker and runtime loader. (All the system
1585 dnl directories known to the linker should also be known to the
1586 dnl runtime loader, otherwise the system is severely misconfigured.)
1587 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1588 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1594 if test "X$rpathdirs" != "X"; then
1595 if test -n "$acl_hardcode_libdir_separator"; then
1596 dnl Weird platform: only the last -rpath option counts, the user must
1597 dnl pass all path elements in one option. We can arrange that for a
1598 dnl single library, but not when more than one $LIBNAMEs are used.
1600 for found_dir in $rpathdirs; do
1601 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1603 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1604 acl_save_libdir="$libdir"
1606 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1607 libdir="$acl_save_libdir"
1608 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1610 dnl The -rpath options are cumulative.
1611 for found_dir in $rpathdirs; do
1612 acl_save_libdir="$libdir"
1614 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1615 libdir="$acl_save_libdir"
1616 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1620 if test "X$ltrpathdirs" != "X"; then
1621 dnl When using libtool, the option that works for both libraries and
1622 dnl executables is -R. The -R options are cumulative.
1623 for found_dir in $ltrpathdirs; do
1624 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1634 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1635 dnl unless already present in VAR.
1636 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1637 dnl contains two or three consecutive elements that belong together.
1638 AC_DEFUN([AC_LIB_APPENDTOVAR],
1640 for element in [$2]; do
1643 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1644 if test "X$x" = "X$element"; then
1649 if test -z "$haveit"; then
1650 [$1]="${[$1]}${[$1]:+ }$element"
1655 dnl For those cases where a variable contains several -L and -l options
1656 dnl referring to unknown libraries and directories, this macro determines the
1657 dnl necessary additional linker options for the runtime path.
1658 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1659 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1660 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1661 dnl otherwise linking without libtool is assumed.
1662 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1664 AC_REQUIRE([AC_LIB_RPATH])
1665 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1667 if test "$enable_rpath" != no; then
1668 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1669 dnl Use an explicit option to hardcode directories into the resulting
1674 if test -n "$next"; then
1676 dnl No need to hardcode the standard /usr/lib.
1677 if test "X$dir" != "X/usr/$acl_libdirstem" \
1678 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1679 rpathdirs="$rpathdirs $dir"
1685 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1686 dnl No need to hardcode the standard /usr/lib.
1687 if test "X$dir" != "X/usr/$acl_libdirstem" \
1688 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1689 rpathdirs="$rpathdirs $dir"
1696 if test "X$rpathdirs" != "X"; then
1697 if test -n ""$3""; then
1698 dnl libtool is used for linking. Use -R options.
1699 for dir in $rpathdirs; do
1700 $1="${$1}${$1:+ }-R$dir"
1703 dnl The linker is used for linking directly.
1704 if test -n "$acl_hardcode_libdir_separator"; then
1705 dnl Weird platform: only the last -rpath option counts, the user
1706 dnl must pass all path elements in one option.
1708 for dir in $rpathdirs; do
1709 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1711 acl_save_libdir="$libdir"
1713 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1714 libdir="$acl_save_libdir"
1717 dnl The -rpath options are cumulative.
1718 for dir in $rpathdirs; do
1719 acl_save_libdir="$libdir"
1721 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1722 libdir="$acl_save_libdir"
1723 $1="${$1}${$1:+ }$flag"
1733 # lib-prefix.m4 serial 7 (gettext-0.18)
1734 dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc.
1735 dnl This file is free software; the Free Software Foundation
1736 dnl gives unlimited permission to copy and/or distribute it,
1737 dnl with or without modifications, as long as this notice is preserved.
1739 dnl From Bruno Haible.
1741 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1742 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1743 dnl require excessive bracketing.
1744 ifdef([AC_HELP_STRING],
1745 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1746 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1748 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1749 dnl to access previously installed libraries. The basic assumption is that
1750 dnl a user will want packages to use other packages he previously installed
1751 dnl with the same --prefix option.
1752 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1753 dnl libraries, but is otherwise very convenient.
1754 AC_DEFUN([AC_LIB_PREFIX],
1756 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1757 AC_REQUIRE([AC_PROG_CC])
1758 AC_REQUIRE([AC_CANONICAL_HOST])
1759 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1760 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1761 dnl By default, look in $includedir and $libdir.
1763 AC_LIB_WITH_FINAL_PREFIX([
1764 eval additional_includedir=\"$includedir\"
1765 eval additional_libdir=\"$libdir\"
1767 AC_LIB_ARG_WITH([lib-prefix],
1768 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1769 --without-lib-prefix don't search for libraries in includedir and libdir],
1771 if test "X$withval" = "Xno"; then
1774 if test "X$withval" = "X"; then
1775 AC_LIB_WITH_FINAL_PREFIX([
1776 eval additional_includedir=\"$includedir\"
1777 eval additional_libdir=\"$libdir\"
1780 additional_includedir="$withval/include"
1781 additional_libdir="$withval/$acl_libdirstem"
1785 if test $use_additional = yes; then
1786 dnl Potentially add $additional_includedir to $CPPFLAGS.
1787 dnl But don't add it
1788 dnl 1. if it's the standard /usr/include,
1789 dnl 2. if it's already present in $CPPFLAGS,
1790 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1791 dnl 4. if it doesn't exist as a directory.
1792 if test "X$additional_includedir" != "X/usr/include"; then
1794 for x in $CPPFLAGS; do
1795 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1796 if test "X$x" = "X-I$additional_includedir"; then
1801 if test -z "$haveit"; then
1802 if test "X$additional_includedir" = "X/usr/local/include"; then
1803 if test -n "$GCC"; then
1805 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1809 if test -z "$haveit"; then
1810 if test -d "$additional_includedir"; then
1811 dnl Really add $additional_includedir to $CPPFLAGS.
1812 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1817 dnl Potentially add $additional_libdir to $LDFLAGS.
1818 dnl But don't add it
1819 dnl 1. if it's the standard /usr/lib,
1820 dnl 2. if it's already present in $LDFLAGS,
1821 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1822 dnl 4. if it doesn't exist as a directory.
1823 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1825 for x in $LDFLAGS; do
1826 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1827 if test "X$x" = "X-L$additional_libdir"; then
1832 if test -z "$haveit"; then
1833 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1834 if test -n "$GCC"; then
1836 linux*) haveit=yes;;
1840 if test -z "$haveit"; then
1841 if test -d "$additional_libdir"; then
1842 dnl Really add $additional_libdir to $LDFLAGS.
1843 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1851 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1852 dnl acl_final_exec_prefix, containing the values to which $prefix and
1853 dnl $exec_prefix will expand at the end of the configure script.
1854 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1856 dnl Unfortunately, prefix and exec_prefix get only finally determined
1857 dnl at the end of configure.
1858 if test "X$prefix" = "XNONE"; then
1859 acl_final_prefix="$ac_default_prefix"
1861 acl_final_prefix="$prefix"
1863 if test "X$exec_prefix" = "XNONE"; then
1864 acl_final_exec_prefix='${prefix}'
1866 acl_final_exec_prefix="$exec_prefix"
1868 acl_save_prefix="$prefix"
1869 prefix="$acl_final_prefix"
1870 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1871 prefix="$acl_save_prefix"
1874 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1875 dnl variables prefix and exec_prefix bound to the values they will have
1876 dnl at the end of the configure script.
1877 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1879 acl_save_prefix="$prefix"
1880 prefix="$acl_final_prefix"
1881 acl_save_exec_prefix="$exec_prefix"
1882 exec_prefix="$acl_final_exec_prefix"
1884 exec_prefix="$acl_save_exec_prefix"
1885 prefix="$acl_save_prefix"
1888 dnl AC_LIB_PREPARE_MULTILIB creates
1889 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1890 dnl "lib" or "lib64" or "lib/64",
1891 dnl - a variable acl_libdirstem2, as a secondary possible value for
1892 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1894 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1896 dnl There is no formal standard regarding lib and lib64.
1897 dnl On glibc systems, the current practice is that on a system supporting
1898 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1899 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1900 dnl the compiler's default mode by looking at the compiler's library search
1901 dnl path. If at least one of its elements ends in /lib64 or points to a
1902 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1903 dnl Otherwise we use the default, namely "lib".
1904 dnl On Solaris 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/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1907 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1908 AC_REQUIRE([AC_CANONICAL_HOST])
1913 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1914 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1915 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1916 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1917 dnl symlink is missing, so we set acl_libdirstem2 too.
1918 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1919 [AC_EGREP_CPP([sixtyfour bits], [
1923 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1925 if test $gl_cv_solaris_64bit = yes; then
1926 acl_libdirstem=lib/64
1928 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1929 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1934 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1935 if test -n "$searchpath"; then
1936 acl_save_IFS="${IFS= }"; IFS=":"
1937 for searchdir in $searchpath; do
1938 if test -d "$searchdir"; then
1939 case "$searchdir" in
1940 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1942 # Better ignore directories of this form. They are misleading.
1944 *) searchdir=`cd "$searchdir" && pwd`
1945 case "$searchdir" in
1946 */lib64 ) acl_libdirstem=lib64 ;;
1955 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1958 # nls.m4 serial 5 (gettext-0.18)
1959 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
1961 dnl This file is free software; the Free Software Foundation
1962 dnl gives unlimited permission to copy and/or distribute it,
1963 dnl with or without modifications, as long as this notice is preserved.
1965 dnl This file can can be used in projects which are not available under
1966 dnl the GNU General Public License or the GNU Library General Public
1967 dnl License but which still want to provide support for the GNU gettext
1969 dnl Please note that the actual code of the GNU gettext library is covered
1970 dnl by the GNU Library General Public License, and the rest of the GNU
1971 dnl gettext package package is covered by the GNU General Public License.
1972 dnl They are *not* in the public domain.
1975 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1976 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1982 AC_MSG_CHECKING([whether NLS is requested])
1983 dnl Default is enabled NLS
1984 AC_ARG_ENABLE([nls],
1985 [ --disable-nls do not use Native Language Support],
1986 USE_NLS=$enableval, USE_NLS=yes)
1987 AC_MSG_RESULT([$USE_NLS])
1991 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1992 # serial 1 (pkg-config-0.24)
1994 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1996 # This program is free software; you can redistribute it and/or modify
1997 # it under the terms of the GNU General Public License as published by
1998 # the Free Software Foundation; either version 2 of the License, or
1999 # (at your option) any later version.
2001 # This program is distributed in the hope that it will be useful, but
2002 # WITHOUT ANY WARRANTY; without even the implied warranty of
2003 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2004 # General Public License for more details.
2006 # You should have received a copy of the GNU General Public License
2007 # along with this program; if not, write to the Free Software
2008 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2010 # As a special exception to the GNU General Public License, if you
2011 # distribute this file as part of a program that contains a
2012 # configuration script generated by Autoconf, you may include it under
2013 # the same distribution terms that you use for the rest of that program.
2015 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
2016 # ----------------------------------
2017 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2018 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2019 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
2020 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
2021 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
2022 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
2023 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
2025 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2026 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2028 if test -n "$PKG_CONFIG"; then
2029 _pkg_min_version=m4_default([$1], [0.9.0])
2030 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2031 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2032 AC_MSG_RESULT([yes])
2038 ])# PKG_PROG_PKG_CONFIG
2040 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2042 # Check to see whether a particular set of modules exists. Similar
2043 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
2045 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2046 # only at the first occurence in configure.ac, so if the first place
2047 # it's called might be skipped (such as if it is within an "if", you
2048 # have to call PKG_CHECK_EXISTS manually
2049 # --------------------------------------------------------------
2050 AC_DEFUN([PKG_CHECK_EXISTS],
2051 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2052 if test -n "$PKG_CONFIG" && \
2053 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2054 m4_default([$2], [:])
2055 m4_ifvaln([$3], [else
2059 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2060 # ---------------------------------------------
2061 m4_define([_PKG_CONFIG],
2062 [if test -n "$$1"; then
2064 elif test -n "$PKG_CONFIG"; then
2065 PKG_CHECK_EXISTS([$3],
2066 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
2067 test "x$?" != "x0" && pkg_failed=yes ],
2074 # _PKG_SHORT_ERRORS_SUPPORTED
2075 # -----------------------------
2076 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2077 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2078 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2079 _pkg_short_errors_supported=yes
2081 _pkg_short_errors_supported=no
2083 ])# _PKG_SHORT_ERRORS_SUPPORTED
2086 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2087 # [ACTION-IF-NOT-FOUND])
2090 # Note that if there is a possibility the first call to
2091 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2092 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2095 # --------------------------------------------------------------
2096 AC_DEFUN([PKG_CHECK_MODULES],
2097 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2098 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2099 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2102 AC_MSG_CHECKING([for $1])
2104 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2105 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2107 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2108 and $1[]_LIBS to avoid the need to call pkg-config.
2109 See the pkg-config man page for more details.])
2111 if test $pkg_failed = yes; then
2113 _PKG_SHORT_ERRORS_SUPPORTED
2114 if test $_pkg_short_errors_supported = yes; then
2115 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
2117 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
2119 # Put the nasty error message in config.log where it belongs
2120 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2122 m4_default([$4], [AC_MSG_ERROR(
2123 [Package requirements ($2) were not met:
2127 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2128 installed software in a non-standard prefix.
2132 elif test $pkg_failed = untried; then
2134 m4_default([$4], [AC_MSG_FAILURE(
2135 [The pkg-config script could not be found or is too old. Make sure it
2136 is in your PATH or set the PKG_CONFIG environment variable to the full
2141 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
2144 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2145 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2146 AC_MSG_RESULT([yes])
2149 ])# PKG_CHECK_MODULES
2152 # PKG_INSTALLDIR(DIRECTORY)
2153 # -------------------------
2154 # Substitutes the variable pkgconfigdir as the location where a module
2155 # should install pkg-config .pc files. By default the directory is
2156 # $libdir/pkgconfig, but the default can be changed by passing
2157 # DIRECTORY. The user can override through the --with-pkgconfigdir
2159 AC_DEFUN([PKG_INSTALLDIR],
2160 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
2161 m4_pushdef([pkg_description],
2162 [pkg-config installation directory @<:@]pkg_default[@:>@])
2163 AC_ARG_WITH([pkgconfigdir],
2164 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
2165 [with_pkgconfigdir=]pkg_default)
2166 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
2167 m4_popdef([pkg_default])
2168 m4_popdef([pkg_description])
2169 ]) dnl PKG_INSTALLDIR
2172 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
2173 # -------------------------
2174 # Substitutes the variable noarch_pkgconfigdir as the location where a
2175 # module should install arch-independent pkg-config .pc files. By
2176 # default the directory is $datadir/pkgconfig, but the default can be
2177 # changed by passing DIRECTORY. The user can override through the
2178 # --with-noarch-pkgconfigdir parameter.
2179 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
2180 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
2181 m4_pushdef([pkg_description],
2182 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
2183 AC_ARG_WITH([noarch-pkgconfigdir],
2184 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
2185 [with_noarch_pkgconfigdir=]pkg_default)
2186 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
2187 m4_popdef([pkg_default])
2188 m4_popdef([pkg_description])
2189 ]) dnl PKG_NOARCH_INSTALLDIR
2192 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
2193 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2194 # -------------------------------------------
2195 # Retrieves the value of the pkg-config variable for the given module.
2196 AC_DEFUN([PKG_CHECK_VAR],
2197 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2198 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
2200 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
2201 AS_VAR_COPY([$1], [pkg_cv_][$1])
2203 AS_VAR_IF([$1], [""], [$5], [$4])dnl
2206 # po.m4 serial 22 (gettext-0.19)
2207 dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
2208 dnl This file is free software; the Free Software Foundation
2209 dnl gives unlimited permission to copy and/or distribute it,
2210 dnl with or without modifications, as long as this notice is preserved.
2212 dnl This file can can be used in projects which are not available under
2213 dnl the GNU General Public License or the GNU Library General Public
2214 dnl License but which still want to provide support for the GNU gettext
2216 dnl Please note that the actual code of the GNU gettext library is covered
2217 dnl by the GNU Library General Public License, and the rest of the GNU
2218 dnl gettext package package is covered by the GNU General Public License.
2219 dnl They are *not* in the public domain.
2222 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2223 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2227 dnl Checks for all prerequisites of the po subdirectory.
2228 AC_DEFUN([AM_PO_SUBDIRS],
2230 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2231 AC_REQUIRE([AC_PROG_INSTALL])dnl
2232 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2233 AC_REQUIRE([AC_PROG_SED])dnl
2234 AC_REQUIRE([AM_NLS])dnl
2236 dnl Release version of the gettext macros. This is used to ensure that
2237 dnl the gettext macros and po/Makefile.in.in are in sync.
2238 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
2240 dnl Perform the following tests also if --disable-nls has been given,
2241 dnl because they are needed for "make dist" to work.
2243 dnl Search for GNU msgfmt in the PATH.
2244 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2245 dnl The second test excludes FreeBSD msgfmt.
2246 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2247 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2248 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2250 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2252 dnl Test whether it is GNU msgfmt >= 0.15.
2254 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2255 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2256 *) MSGFMT_015=$MSGFMT ;;
2259 AC_SUBST([MSGFMT_015])
2261 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2262 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2263 *) GMSGFMT_015=$GMSGFMT ;;
2266 AC_SUBST([GMSGFMT_015])
2268 dnl Search for GNU xgettext 0.12 or newer in the PATH.
2269 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2270 dnl The second test excludes FreeBSD xgettext.
2271 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2272 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2273 (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)],
2275 dnl Remove leftover from FreeBSD xgettext call.
2278 dnl Test whether it is GNU xgettext >= 0.15.
2280 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2281 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2282 *) XGETTEXT_015=$XGETTEXT ;;
2285 AC_SUBST([XGETTEXT_015])
2287 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2288 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2289 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2291 dnl Installation directories.
2292 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2293 dnl have to define it here, so that it can be used in po/Makefile.
2294 test -n "$localedir" || localedir='${datadir}/locale'
2295 AC_SUBST([localedir])
2297 dnl Support for AM_XGETTEXT_OPTION.
2298 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2299 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2301 AC_CONFIG_COMMANDS([po-directories], [[
2302 for ac_file in $CONFIG_FILES; do
2303 # Support "outfile[:infile[:infile...]]"
2305 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2307 # PO directories have a Makefile.in generated from Makefile.in.in.
2308 case "$ac_file" in */Makefile.in)
2309 # Adjust a relative srcdir.
2310 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2311 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2312 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2313 # In autoconf-2.13 it is called $ac_given_srcdir.
2314 # In autoconf-2.50 it is called $srcdir.
2315 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2316 case "$ac_given_srcdir" in
2317 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2318 /*) top_srcdir="$ac_given_srcdir" ;;
2319 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2321 # Treat a directory as a PO directory if and only if it has a
2322 # POTFILES.in file. This allows packages to have multiple PO
2323 # directories under different names or in different locations.
2324 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2325 rm -f "$ac_dir/POTFILES"
2326 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2327 gt_tab=`printf '\t'`
2328 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"
2329 POMAKEFILEDEPS="POTFILES.in"
2330 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2331 # on $ac_dir but don't depend on user-specified configuration
2333 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2334 # The LINGUAS file contains the set of available languages.
2335 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2336 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2338 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2339 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2340 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2341 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2343 # The set of available languages was given in configure.in.
2344 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2345 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2348 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2349 # Compute UPDATEPOFILES
2350 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2351 # Compute DUMMYPOFILES
2352 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2354 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2355 case "$ac_given_srcdir" in
2357 *) srcdirpre='$(srcdir)/' ;;
2363 for lang in $ALL_LINGUAS; do
2364 POFILES="$POFILES $srcdirpre$lang.po"
2365 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2366 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2367 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2369 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2370 # environment variable.
2372 if test -n "$ALL_LINGUAS"; then
2373 for presentlang in $ALL_LINGUAS; do
2375 if test "%UNSET%" != "$LINGUAS"; then
2376 desiredlanguages="$LINGUAS"
2378 desiredlanguages="$ALL_LINGUAS"
2380 for desiredlang in $desiredlanguages; do
2381 # Use the presentlang catalog if desiredlang is
2382 # a. equal to presentlang, or
2383 # b. a variant of presentlang (because in this case,
2384 # presentlang can be used as a fallback for messages
2385 # which are not translated in the desiredlang catalog).
2386 case "$desiredlang" in
2387 "$presentlang"*) useit=yes;;
2390 if test $useit = yes; then
2391 INST_LINGUAS="$INST_LINGUAS $presentlang"
2396 if test -n "$INST_LINGUAS"; then
2397 for lang in $INST_LINGUAS; do
2398 CATALOGS="$CATALOGS $lang.gmo"
2401 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2402 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"
2403 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2404 if test -f "$f"; then
2406 *.orig | *.bak | *~) ;;
2407 *) cat "$f" >> "$ac_dir/Makefile" ;;
2415 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2416 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2417 # from automake < 1.5.
2418 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2419 # Capture the value of LINGUAS because we need it to compute CATALOGS.
2420 LINGUAS="${LINGUAS-%UNSET%}"
2424 dnl Postprocesses a Makefile in a directory containing PO files.
2425 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2427 # When this code is run, in config.status, two variables have already been
2429 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2430 # - LINGUAS is the value of the environment variable LINGUAS at configure
2434 # Adjust a relative srcdir.
2435 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2436 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2437 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2438 # In autoconf-2.13 it is called $ac_given_srcdir.
2439 # In autoconf-2.50 it is called $srcdir.
2440 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2441 case "$ac_given_srcdir" in
2442 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2443 /*) top_srcdir="$ac_given_srcdir" ;;
2444 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2447 # Find a way to echo strings without interpreting backslash.
2448 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2451 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2452 gt_echo='printf %s\n'
2463 # A sed script that extracts the value of VARIABLE from a Makefile.
2466 # Test if the hold space is empty.
2471 # Yes it was empty. Look if we have the expected variable definition.
2472 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
2473 # Seen the first line of the variable definition.
2474 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
2479 # Here we are processing a line from the variable definition.
2480 # Remove comment, more precisely replace it with a space.
2482 # See if the line ends in a backslash.
2486 # Print the line, without the trailing backslash.
2489 # There was no trailing backslash. The end of the variable definition is
2490 # reached. Clear the hold space.
2495 # A trailing backslash means that the variable definition continues in the
2496 # next line. Put a nonempty string into the hold space to indicate this.
2503 # Set POTFILES to the value of the Makefile variable POTFILES.
2504 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2505 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2506 # Compute POTFILES_DEPS as
2507 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2509 for file in $POTFILES; do
2510 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2514 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2515 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2517 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2518 # The LINGUAS file contains the set of available languages.
2519 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2520 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2522 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2523 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2524 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2526 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2527 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2529 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2530 # Compute UPDATEPOFILES
2531 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2532 # Compute DUMMYPOFILES
2533 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2535 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2536 # Compute PROPERTIESFILES
2537 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2538 # Compute CLASSFILES
2539 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2541 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2543 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2544 # Compute RESOURCESDLLFILES
2545 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2546 case "$ac_given_srcdir" in
2548 *) srcdirpre='$(srcdir)/' ;;
2559 for lang in $ALL_LINGUAS; do
2560 POFILES="$POFILES $srcdirpre$lang.po"
2561 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2562 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2563 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2564 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2565 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2566 QMFILES="$QMFILES $srcdirpre$lang.qm"
2567 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2568 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2569 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/'`
2570 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2572 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2573 # environment variable.
2575 if test -n "$ALL_LINGUAS"; then
2576 for presentlang in $ALL_LINGUAS; do
2578 if test "%UNSET%" != "$LINGUAS"; then
2579 desiredlanguages="$LINGUAS"
2581 desiredlanguages="$ALL_LINGUAS"
2583 for desiredlang in $desiredlanguages; do
2584 # Use the presentlang catalog if desiredlang is
2585 # a. equal to presentlang, or
2586 # b. a variant of presentlang (because in this case,
2587 # presentlang can be used as a fallback for messages
2588 # which are not translated in the desiredlang catalog).
2589 case "$desiredlang" in
2590 "$presentlang"*) useit=yes;;
2593 if test $useit = yes; then
2594 INST_LINGUAS="$INST_LINGUAS $presentlang"
2603 if test -n "$INST_LINGUAS"; then
2604 for lang in $INST_LINGUAS; do
2605 CATALOGS="$CATALOGS $lang.gmo"
2606 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2607 QTCATALOGS="$QTCATALOGS $lang.qm"
2608 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2609 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2610 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/'`
2611 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2615 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"
2617 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2618 # Add dependencies that cannot be formulated as a simple suffix rule.
2619 for lang in $ALL_LINGUAS; do
2620 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2621 cat >> "$ac_file.tmp" <<EOF
2622 $frobbedlang.msg: $lang.po
2623 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2624 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2628 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2629 # Add dependencies that cannot be formulated as a simple suffix rule.
2630 for lang in $ALL_LINGUAS; do
2631 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/'`
2632 cat >> "$ac_file.tmp" <<EOF
2633 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2634 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2635 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2639 if test -n "$POMAKEFILEDEPS"; then
2640 cat >> "$ac_file.tmp" <<EOF
2641 Makefile: $POMAKEFILEDEPS
2644 mv "$ac_file.tmp" "$ac_file"
2647 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2648 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2650 XGETTEXT_EXTRA_OPTIONS=
2653 dnl Registers an option to be passed to xgettext in the po subdirectory.
2654 AC_DEFUN([AM_XGETTEXT_OPTION],
2656 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2657 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2660 # progtest.m4 serial 7 (gettext-0.18.2)
2661 dnl Copyright (C) 1996-2003, 2005, 2008-2014 Free Software Foundation, Inc.
2662 dnl This file is free software; the Free Software Foundation
2663 dnl gives unlimited permission to copy and/or distribute it,
2664 dnl with or without modifications, as long as this notice is preserved.
2666 dnl This file can can be used in projects which are not available under
2667 dnl the GNU General Public License or the GNU Library General Public
2668 dnl License but which still want to provide support for the GNU gettext
2670 dnl Please note that the actual code of the GNU gettext library is covered
2671 dnl by the GNU Library General Public License, and the rest of the GNU
2672 dnl gettext package package is covered by the GNU General Public License.
2673 dnl They are *not* in the public domain.
2676 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2680 # Search path for a program which passes the given test.
2682 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2683 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2684 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2686 # Prepare PATH_SEPARATOR.
2687 # The user is always right.
2688 if test "${PATH_SEPARATOR+set}" != set; then
2689 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
2690 # contains only /bin. Note that ksh looks also at the FPATH variable,
2691 # so we have to set that as well for the test.
2693 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2694 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2695 || PATH_SEPARATOR=';'
2699 # Find out how to test for executable files. Don't use a zero-byte file,
2700 # as systems may use methods other than mode bits to determine executability.
2701 cat >conf$$.file <<_ASEOF
2705 chmod +x conf$$.file
2706 if test -x conf$$.file >/dev/null 2>&1; then
2707 ac_executable_p="test -x"
2709 ac_executable_p="test -f"
2713 # Extract the first word of "$2", so it can be a program name with args.
2714 set dummy $2; ac_word=[$]2
2715 AC_MSG_CHECKING([for $ac_word])
2716 AC_CACHE_VAL([ac_cv_path_$1],
2718 [[\\/]]* | ?:[[\\/]]*)
2719 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2722 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2723 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2725 test -z "$ac_dir" && ac_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
2727 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2728 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2730 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2737 dnl If no 4th arg is given, leave the cache variable unset,
2738 dnl so AC_PATH_PROGS will keep looking.
2739 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2744 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2745 AC_MSG_RESULT([$][$1])
2752 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
2754 # This file is free software; the Free Software Foundation
2755 # gives unlimited permission to copy and/or distribute it,
2756 # with or without modifications, as long as this notice is preserved.
2758 # AM_AUTOMAKE_VERSION(VERSION)
2759 # ----------------------------
2760 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2761 # generated from the m4 files accompanying Automake X.Y.
2762 # (This private macro should not be called outside this file.)
2763 AC_DEFUN([AM_AUTOMAKE_VERSION],
2764 [am__api_version='1.14'
2765 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2766 dnl require some minimum version. Point them to the right macro.
2767 m4_if([$1], [1.14.1], [],
2768 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2771 # _AM_AUTOCONF_VERSION(VERSION)
2772 # -----------------------------
2773 # aclocal traces this macro to find the Autoconf version.
2774 # This is a private macro too. Using m4_define simplifies
2775 # the logic in aclocal, which can simply ignore this definition.
2776 m4_define([_AM_AUTOCONF_VERSION], [])
2778 # AM_SET_CURRENT_AUTOMAKE_VERSION
2779 # -------------------------------
2780 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2781 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2782 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2783 [AM_AUTOMAKE_VERSION([1.14.1])dnl
2784 m4_ifndef([AC_AUTOCONF_VERSION],
2785 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2786 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2788 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
2790 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
2792 # This file is free software; the Free Software Foundation
2793 # gives unlimited permission to copy and/or distribute it,
2794 # with or without modifications, as long as this notice is preserved.
2796 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2797 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
2798 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
2800 # Of course, Automake must honor this variable whenever it calls a
2801 # tool from the auxiliary directory. The problem is that $srcdir (and
2802 # therefore $ac_aux_dir as well) can be either absolute or relative,
2803 # depending on how configure is run. This is pretty annoying, since
2804 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2805 # source directory, any form will work fine, but in subdirectories a
2806 # relative path needs to be adjusted first.
2808 # $ac_aux_dir/missing
2809 # fails when called from a subdirectory if $ac_aux_dir is relative
2810 # $top_srcdir/$ac_aux_dir/missing
2811 # fails if $ac_aux_dir is absolute,
2812 # fails when called from a subdirectory in a VPATH build with
2813 # a relative $ac_aux_dir
2815 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2816 # are both prefixed by $srcdir. In an in-source build this is usually
2817 # harmless because $srcdir is '.', but things will broke when you
2818 # start a VPATH build or use an absolute $srcdir.
2820 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2821 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2822 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2823 # and then we would define $MISSING as
2824 # MISSING="\${SHELL} $am_aux_dir/missing"
2825 # This will work as long as MISSING is not called from configure, because
2826 # unfortunately $(top_srcdir) has no meaning in configure.
2827 # However there are other variables, like CC, which are often used in
2828 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2830 # Another solution, used here, is to always expand $ac_aux_dir to an
2831 # absolute PATH. The drawback is that using absolute paths prevent a
2832 # configured tree to be moved without reconfiguration.
2834 AC_DEFUN([AM_AUX_DIR_EXPAND],
2835 [dnl Rely on autoconf to set up CDPATH properly.
2836 AC_PREREQ([2.50])dnl
2837 # expand $ac_aux_dir to an absolute path
2838 am_aux_dir=`cd $ac_aux_dir && pwd`
2841 # AM_CONDITIONAL -*- Autoconf -*-
2843 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
2845 # This file is free software; the Free Software Foundation
2846 # gives unlimited permission to copy and/or distribute it,
2847 # with or without modifications, as long as this notice is preserved.
2849 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2850 # -------------------------------------
2851 # Define a conditional.
2852 AC_DEFUN([AM_CONDITIONAL],
2853 [AC_PREREQ([2.52])dnl
2854 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
2855 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2856 AC_SUBST([$1_TRUE])dnl
2857 AC_SUBST([$1_FALSE])dnl
2858 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
2859 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
2860 m4_define([_AM_COND_VALUE_$1], [$2])dnl
2868 AC_CONFIG_COMMANDS_PRE(
2869 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2870 AC_MSG_ERROR([[conditional "$1" was never defined.
2871 Usually this means the macro was only invoked conditionally.]])
2874 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
2876 # This file is free software; the Free Software Foundation
2877 # gives unlimited permission to copy and/or distribute it,
2878 # with or without modifications, as long as this notice is preserved.
2881 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
2882 # written in clear, in which case automake, when reading aclocal.m4,
2883 # will think it sees a *use*, and therefore will trigger all it's
2884 # C support machinery. Also note that it means that autoscan, seeing
2885 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2888 # _AM_DEPENDENCIES(NAME)
2889 # ----------------------
2890 # See how the compiler implements dependency checking.
2891 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
2892 # We try a few techniques and use that to set a single cache variable.
2894 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2895 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2896 # dependency, and given that the user is not expected to run this macro,
2897 # just rely on AC_PROG_CC.
2898 AC_DEFUN([_AM_DEPENDENCIES],
2899 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2900 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2901 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2902 AC_REQUIRE([AM_DEP_TRACK])dnl
2904 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
2905 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
2906 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2907 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
2908 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
2909 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2910 [depcc="$$1" am_compiler_list=])
2912 AC_CACHE_CHECK([dependency style of $depcc],
2913 [am_cv_$1_dependencies_compiler_type],
2914 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2915 # We make a subdir and do the tests there. Otherwise we can end up
2916 # making bogus files that we don't know about and never remove. For
2917 # instance it was reported that on HP-UX the gcc test will end up
2918 # making a dummy file named 'D' -- because '-MD' means "put the output
2922 # Copy depcomp to subdir because otherwise we won't find it if we're
2923 # using a relative directory.
2924 cp "$am_depcomp" conftest.dir
2926 # We will build objects and dependencies in a subdirectory because
2927 # it helps to detect inapplicable dependency modes. For instance
2928 # both Tru64's cc and ICC support -MD to output dependencies as a
2929 # side effect of compilation, but ICC will put the dependencies in
2930 # the current directory while Tru64 will put them in the object
2934 am_cv_$1_dependencies_compiler_type=none
2935 if test "$am_compiler_list" = ""; then
2936 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2940 [case " $depcc " in #(
2941 *\ -arch\ *\ -arch\ *) am__universal=true ;;
2944 [case " $depcc " in #(
2945 *\ -arch\ *\ -arch\ *) am__universal=true ;;
2948 for depmode in $am_compiler_list; do
2949 # Setup a source with many dependencies, because some compilers
2950 # like to wrap large dependency lists on column 80 (with \), and
2951 # we should not choose a depcomp mode which is confused by this.
2953 # We need to recreate these files for each test, as the compiler may
2954 # overwrite some of them when testing with obscure command lines.
2955 # This happens at least with the AIX C compiler.
2957 for i in 1 2 3 4 5 6; do
2958 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2959 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
2960 # Solaris 10 /bin/sh.
2961 echo '/* dummy */' > sub/conftst$i.h
2963 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2965 # We check with '-c' and '-o' for the sake of the "dashmstdout"
2966 # mode. It turns out that the SunPro C++ compiler does not properly
2967 # handle '-M -o', and we need to detect this. Also, some Intel
2968 # versions had trouble with output in subdirs.
2969 am__obj=sub/conftest.${OBJEXT-o}
2970 am__minus_obj="-o $am__obj"
2973 # This depmode causes a compiler race in universal mode.
2974 test "$am__universal" = false || continue
2977 # After this tag, mechanisms are not by side-effect, so they'll
2978 # only be used when explicitly requested.
2979 if test "x$enable_dependency_tracking" = xyes; then
2985 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
2986 # This compiler won't grok '-c -o', but also, the minuso test has
2987 # not run yet. These depmodes are late enough in the game, and
2988 # so weak that their functioning should not be impacted.
2989 am__obj=conftest.${OBJEXT-o}
2994 if depmode=$depmode \
2995 source=sub/conftest.c object=$am__obj \
2996 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2997 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2998 >/dev/null 2>conftest.err &&
2999 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3000 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3001 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3002 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3003 # icc doesn't choke on unknown options, it will just issue warnings
3004 # or remarks (even with -Werror). So we grep stderr for any message
3005 # that says an option was ignored or not supported.
3006 # When given -MP, icc 7.0 and 7.1 complain thusly:
3007 # icc: Command line warning: ignoring option '-M'; no argument required
3008 # The diagnosis changed in icc 8.0:
3009 # icc: Command line remark: option '-MP' not supported
3010 if (grep 'ignoring option' conftest.err ||
3011 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3012 am_cv_$1_dependencies_compiler_type=$depmode
3021 am_cv_$1_dependencies_compiler_type=none
3024 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3025 AM_CONDITIONAL([am__fastdep$1], [
3026 test "x$enable_dependency_tracking" != xno \
3027 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3033 # Choose a directory name for dependency files.
3034 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3035 AC_DEFUN([AM_SET_DEPDIR],
3036 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3037 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3043 AC_DEFUN([AM_DEP_TRACK],
3044 [AC_ARG_ENABLE([dependency-tracking], [dnl
3046 [--enable-dependency-tracking],
3047 [do not reject slow dependency extractors])
3049 [--disable-dependency-tracking],
3050 [speeds up one-time build])])
3051 if test "x$enable_dependency_tracking" != xno; then
3052 am_depcomp="$ac_aux_dir/depcomp"
3056 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3057 AC_SUBST([AMDEPBACKSLASH])dnl
3058 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3059 AC_SUBST([am__nodep])dnl
3060 _AM_SUBST_NOTMAKE([am__nodep])dnl
3063 # Generate code to set up dependency tracking. -*- Autoconf -*-
3065 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
3067 # This file is free software; the Free Software Foundation
3068 # gives unlimited permission to copy and/or distribute it,
3069 # with or without modifications, as long as this notice is preserved.
3072 # _AM_OUTPUT_DEPENDENCY_COMMANDS
3073 # ------------------------------
3074 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3076 # Older Autoconf quotes --file arguments for eval, but not when files
3077 # are listed without --file. Let's play safe and only enable the eval
3078 # if we detect the quoting.
3079 case $CONFIG_FILES in
3080 *\'*) eval set x "$CONFIG_FILES" ;;
3081 *) set x $CONFIG_FILES ;;
3086 # Strip MF so we end up with the name of the file.
3087 mf=`echo "$mf" | sed -e 's/:.*$//'`
3088 # Check whether this is an Automake generated Makefile or not.
3089 # We used to match only the files named 'Makefile.in', but
3090 # some people rename them; so instead we look at the file content.
3091 # Grep'ing the first line is not enough: some people post-process
3092 # each Makefile.in and add a new line on top of each file to say so.
3093 # Grep'ing the whole file is not good either: AIX grep has a line
3094 # limit of 2048, but all sed's we know have understand at least 4000.
3095 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3096 dirpart=`AS_DIRNAME("$mf")`
3100 # Extract the definition of DEPDIR, am__include, and am__quote
3101 # from the Makefile without running 'make'.
3102 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3103 test -z "$DEPDIR" && continue
3104 am__include=`sed -n 's/^am__include = //p' < "$mf"`
3105 test -z "$am__include" && continue
3106 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3107 # Find all dependency output files, they are included files with
3108 # $(DEPDIR) in their names. We invoke sed twice because it is the
3109 # simplest approach to changing $(DEPDIR) to its actual value in the
3111 for file in `sed -n "
3112 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3113 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
3114 # Make sure the directory exists.
3115 test -f "$dirpart/$file" && continue
3116 fdir=`AS_DIRNAME(["$file"])`
3117 AS_MKDIR_P([$dirpart/$fdir])
3118 # echo "creating $dirpart/$file"
3119 echo '# dummy' > "$dirpart/$file"
3123 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3126 # AM_OUTPUT_DEPENDENCY_COMMANDS
3127 # -----------------------------
3128 # This macro should only be invoked once -- use via AC_REQUIRE.
3130 # This code is only required when automatic dependency tracking
3131 # is enabled. FIXME. This creates each '.P' file that we will
3132 # need in order to bootstrap the dependency handling code.
3133 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3134 [AC_CONFIG_COMMANDS([depfiles],
3135 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3136 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3139 # Do all the work for Automake. -*- Autoconf -*-
3141 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3143 # This file is free software; the Free Software Foundation
3144 # gives unlimited permission to copy and/or distribute it,
3145 # with or without modifications, as long as this notice is preserved.
3147 # This macro actually does too much. Some checks are only needed if
3148 # your package does certain things. But this isn't really a big deal.
3150 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
3151 m4_define([AC_PROG_CC],
3152 m4_defn([AC_PROG_CC])
3156 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3157 # AM_INIT_AUTOMAKE([OPTIONS])
3158 # -----------------------------------------------
3159 # The call with PACKAGE and VERSION arguments is the old style
3160 # call (pre autoconf-2.50), which is being phased out. PACKAGE
3161 # and VERSION should now be passed to AC_INIT and removed from
3162 # the call to AM_INIT_AUTOMAKE.
3163 # We support both call styles for the transition. After
3164 # the next Automake release, Autoconf can make the AC_INIT
3165 # arguments mandatory, and then we can depend on a new Autoconf
3166 # release and drop the old call support.
3167 AC_DEFUN([AM_INIT_AUTOMAKE],
3168 [AC_PREREQ([2.65])dnl
3169 dnl Autoconf wants to disallow AM_ names. We explicitly allow
3170 dnl the ones we care about.
3171 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3172 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3173 AC_REQUIRE([AC_PROG_INSTALL])dnl
3174 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3175 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3176 # is not polluted with repeated "-I."
3177 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3178 # test to see if srcdir already configured
3179 if test -f $srcdir/config.status; then
3180 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3184 # test whether we have cygpath
3185 if test -z "$CYGPATH_W"; then
3186 if (cygpath --version) >/dev/null 2>/dev/null; then
3187 CYGPATH_W='cygpath -w'
3192 AC_SUBST([CYGPATH_W])
3194 # Define the identity of the package.
3195 dnl Distinguish between old-style and new-style calls.
3197 [AC_DIAGNOSE([obsolete],
3198 [$0: two- and three-arguments forms are deprecated.])
3199 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3200 AC_SUBST([PACKAGE], [$1])dnl
3201 AC_SUBST([VERSION], [$2])],
3202 [_AM_SET_OPTIONS([$1])dnl
3203 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3205 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
3207 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3208 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3209 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3211 _AM_IF_OPTION([no-define],,
3212 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
3213 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
3215 # Some tools Automake needs.
3216 AC_REQUIRE([AM_SANITY_CHECK])dnl
3217 AC_REQUIRE([AC_ARG_PROGRAM])dnl
3218 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
3219 AM_MISSING_PROG([AUTOCONF], [autoconf])
3220 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
3221 AM_MISSING_PROG([AUTOHEADER], [autoheader])
3222 AM_MISSING_PROG([MAKEINFO], [makeinfo])
3223 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3224 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3225 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3226 # For better backward compatibility. To be removed once Automake 1.9.x
3227 # dies out for good. For more background, see:
3228 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3229 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3230 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
3231 # We need awk for the "check" target. The system "awk" is bad on
3233 AC_REQUIRE([AC_PROG_AWK])dnl
3234 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3235 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3236 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3237 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3238 [_AM_PROG_TAR([v7])])])
3239 _AM_IF_OPTION([no-dependencies],,
3240 [AC_PROVIDE_IFELSE([AC_PROG_CC],
3241 [_AM_DEPENDENCIES([CC])],
3242 [m4_define([AC_PROG_CC],
3243 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
3244 AC_PROVIDE_IFELSE([AC_PROG_CXX],
3245 [_AM_DEPENDENCIES([CXX])],
3246 [m4_define([AC_PROG_CXX],
3247 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
3248 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3249 [_AM_DEPENDENCIES([OBJC])],
3250 [m4_define([AC_PROG_OBJC],
3251 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
3252 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
3253 [_AM_DEPENDENCIES([OBJCXX])],
3254 [m4_define([AC_PROG_OBJCXX],
3255 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
3257 AC_REQUIRE([AM_SILENT_RULES])dnl
3258 dnl The testsuite driver may need to know about EXEEXT, so add the
3259 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
3260 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
3261 AC_CONFIG_COMMANDS_PRE(dnl
3262 [m4_provide_if([_AM_COMPILER_EXEEXT],
3263 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3265 # POSIX will say in a future version that running "rm -f" with no argument
3266 # is OK; and we want to be able to make that assumption in our Makefile
3267 # recipes. So use an aggressive probe to check that the usage we want is
3268 # actually supported "in the wild" to an acceptable degree.
3269 # See automake bug#10828.
3270 # To make any issue more visible, cause the running configure to be aborted
3271 # by default if the 'rm' program in use doesn't match our expectations; the
3272 # user can still override this though.
3273 if rm -f && rm -fr && rm -rf; then : OK; else
3277 Your 'rm' program seems unable to run without file operands specified
3278 on the command line, even when the '-f' option is present. This is contrary
3279 to the behaviour of most rm programs out there, and not conforming with
3280 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3282 Please tell bug-automake@gnu.org about your system, including the value
3283 of your $PATH and any error possibly output before this message. This
3284 can help us improve future automake versions.
3287 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3288 echo 'Configuration will proceed anyway, since you have set the' >&2
3289 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3293 Aborting the configuration process, to ensure you take notice of the issue.
3295 You can download and install GNU coreutils to get an 'rm' implementation
3296 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3298 If you want to complete the configuration process using your problematic
3299 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3300 to "yes", and re-run configure.
3303 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
3308 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
3309 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3310 dnl mangled by Autoconf and run in a shell conditional statement.
3311 m4_define([_AC_COMPILER_EXEEXT],
3312 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3314 # When config.status generates a header, we must update the stamp-h file.
3315 # This file resides in the same directory as the config header
3316 # that is generated. The stamp files are numbered to have different names.
3318 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3319 # loop where config.status creates the headers, so we can generate
3320 # our stamp files there.
3321 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3322 [# Compute $1's index in $config_headers.
3325 for _am_header in $config_headers :; do
3327 $_am_arg | $_am_arg:* )
3330 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3333 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3335 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3337 # This file is free software; the Free Software Foundation
3338 # gives unlimited permission to copy and/or distribute it,
3339 # with or without modifications, as long as this notice is preserved.
3341 # AM_PROG_INSTALL_SH
3342 # ------------------
3343 # Define $install_sh.
3344 AC_DEFUN([AM_PROG_INSTALL_SH],
3345 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3346 if test x"${install_sh}" != xset; then
3349 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3351 install_sh="\${SHELL} $am_aux_dir/install-sh"
3354 AC_SUBST([install_sh])])
3356 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
3358 # This file is free software; the Free Software Foundation
3359 # gives unlimited permission to copy and/or distribute it,
3360 # with or without modifications, as long as this notice is preserved.
3362 # Check whether the underlying file-system supports filenames
3363 # with a leading dot. For instance MS-DOS doesn't.
3364 AC_DEFUN([AM_SET_LEADING_DOT],
3365 [rm -rf .tst 2>/dev/null
3366 mkdir .tst 2>/dev/null
3367 if test -d .tst; then
3372 rmdir .tst 2>/dev/null
3373 AC_SUBST([am__leading_dot])])
3375 # Check to see how 'make' treats includes. -*- Autoconf -*-
3377 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3379 # This file is free software; the Free Software Foundation
3380 # gives unlimited permission to copy and/or distribute it,
3381 # with or without modifications, as long as this notice is preserved.
3385 # Check to see how make treats includes.
3386 AC_DEFUN([AM_MAKE_INCLUDE],
3387 [am_make=${MAKE-make}
3388 cat > confinc << 'END'
3390 @echo this is the am__doit target
3393 # If we don't find an include directive, just comment out the code.
3394 AC_MSG_CHECKING([for style of include used by $am_make])
3398 # First try GNU make style include.
3399 echo "include confinc" > confmf
3400 # Ignore all kinds of additional output from 'make'.
3401 case `$am_make -s -f confmf 2> /dev/null` in #(
3402 *the\ am__doit\ target*)
3408 # Now try BSD make style include.
3409 if test "$am__include" = "#"; then
3410 echo '.include "confinc"' > confmf
3411 case `$am_make -s -f confmf 2> /dev/null` in #(
3412 *the\ am__doit\ target*)
3413 am__include=.include
3419 AC_SUBST([am__include])
3420 AC_SUBST([am__quote])
3421 AC_MSG_RESULT([$_am_result])
3422 rm -f confinc confmf
3425 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3427 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
3429 # This file is free software; the Free Software Foundation
3430 # gives unlimited permission to copy and/or distribute it,
3431 # with or without modifications, as long as this notice is preserved.
3433 # AM_MISSING_PROG(NAME, PROGRAM)
3434 # ------------------------------
3435 AC_DEFUN([AM_MISSING_PROG],
3436 [AC_REQUIRE([AM_MISSING_HAS_RUN])
3437 $1=${$1-"${am_missing_run}$2"}
3440 # AM_MISSING_HAS_RUN
3441 # ------------------
3442 # Define MISSING if not defined so far and test if it is modern enough.
3443 # If it is, set am_missing_run to use it, otherwise, to nothing.
3444 AC_DEFUN([AM_MISSING_HAS_RUN],
3445 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3446 AC_REQUIRE_AUX_FILE([missing])dnl
3447 if test x"${MISSING+set}" != xset; then
3450 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3452 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3455 # Use eval to expand $SHELL
3456 if eval "$MISSING --is-lightweight"; then
3457 am_missing_run="$MISSING "
3460 AC_MSG_WARN(['missing' script is too old or missing])
3464 # Helper functions for option handling. -*- Autoconf -*-
3466 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3468 # This file is free software; the Free Software Foundation
3469 # gives unlimited permission to copy and/or distribute it,
3470 # with or without modifications, as long as this notice is preserved.
3472 # _AM_MANGLE_OPTION(NAME)
3473 # -----------------------
3474 AC_DEFUN([_AM_MANGLE_OPTION],
3475 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3477 # _AM_SET_OPTION(NAME)
3478 # --------------------
3479 # Set option NAME. Presently that only means defining a flag for this option.
3480 AC_DEFUN([_AM_SET_OPTION],
3481 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
3483 # _AM_SET_OPTIONS(OPTIONS)
3484 # ------------------------
3485 # OPTIONS is a space-separated list of Automake options.
3486 AC_DEFUN([_AM_SET_OPTIONS],
3487 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3489 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3490 # -------------------------------------------
3491 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3492 AC_DEFUN([_AM_IF_OPTION],
3493 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3495 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
3497 # This file is free software; the Free Software Foundation
3498 # gives unlimited permission to copy and/or distribute it,
3499 # with or without modifications, as long as this notice is preserved.
3503 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
3504 # to automatically call this.
3505 AC_DEFUN([_AM_PROG_CC_C_O],
3506 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3507 AC_REQUIRE_AUX_FILE([compile])dnl
3508 AC_LANG_PUSH([C])dnl
3510 [whether $CC understands -c and -o together],
3511 [am_cv_prog_cc_c_o],
3512 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
3513 # Make sure it works both with $CC and with simple cc.
3514 # Following AC_PROG_CC_C_O, we do the test twice because some
3515 # compilers refuse to overwrite an existing .o file with -o,
3516 # though they will create one.
3517 am_cv_prog_cc_c_o=yes
3519 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
3520 && test -f conftest2.$ac_objext; then
3523 am_cv_prog_cc_c_o=no
3527 rm -f core conftest*
3529 if test "$am_cv_prog_cc_c_o" != yes; then
3530 # Losing compiler, so override with the script.
3531 # FIXME: It is wrong to rewrite CC.
3532 # But if we don't then we get into trouble of one sort or another.
3533 # A longer-term fix would be to have automake use am__CC in this case,
3534 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3535 CC="$am_aux_dir/compile $CC"
3539 # For backward compatibility.
3540 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
3542 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3544 # This file is free software; the Free Software Foundation
3545 # gives unlimited permission to copy and/or distribute it,
3546 # with or without modifications, as long as this notice is preserved.
3548 # AM_RUN_LOG(COMMAND)
3549 # -------------------
3550 # Run COMMAND, save the exit status in ac_status, and log it.
3551 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
3552 AC_DEFUN([AM_RUN_LOG],
3553 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
3554 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
3556 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3557 (exit $ac_status); }])
3559 # Check to make sure that the build environment is sane. -*- Autoconf -*-
3561 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3563 # This file is free software; the Free Software Foundation
3564 # gives unlimited permission to copy and/or distribute it,
3565 # with or without modifications, as long as this notice is preserved.
3569 AC_DEFUN([AM_SANITY_CHECK],
3570 [AC_MSG_CHECKING([whether build environment is sane])
3571 # Reject unsafe characters in $srcdir or the absolute working directory
3572 # name. Accept space and tab only in the latter.
3576 *[[\\\"\#\$\&\'\`$am_lf]]*)
3577 AC_MSG_ERROR([unsafe absolute working directory name]);;
3580 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
3581 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
3584 # Do 'set' in a subshell so we don't clobber the current shell's
3585 # arguments. Must try -L first in case configure is actually a
3586 # symlink; some systems play weird games with the mod time of symlinks
3587 # (eg FreeBSD returns the mod time of the symlink's containing
3591 for am_try in 1 2; do
3592 echo "timestamp, slept: $am_has_slept" > conftest.file
3593 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3594 if test "$[*]" = "X"; then
3596 set X `ls -t "$srcdir/configure" conftest.file`
3598 if test "$[*]" != "X $srcdir/configure conftest.file" \
3599 && test "$[*]" != "X conftest.file $srcdir/configure"; then
3601 # If neither matched, then we have a broken ls. This can happen
3602 # if, for instance, CONFIG_SHELL is bash and it inherits a
3603 # broken ls alias from the environment. This has actually
3604 # happened. Such a system could not be considered "sane".
3605 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
3606 alias in your environment])
3608 if test "$[2]" = conftest.file || test $am_try -eq 2; then
3615 test "$[2]" = conftest.file
3621 AC_MSG_ERROR([newly created file is older than distributed files!
3622 Check your system clock])
3624 AC_MSG_RESULT([yes])
3625 # If we didn't sleep, we still need to ensure time stamps of config.status and
3626 # generated files are strictly newer.
3628 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3632 AC_CONFIG_COMMANDS_PRE(
3633 [AC_MSG_CHECKING([that generated files are newer than configure])
3634 if test -n "$am_sleep_pid"; then
3635 # Hide warnings about reused PIDs.
3636 wait $am_sleep_pid 2>/dev/null
3638 AC_MSG_RESULT([done])])
3642 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
3644 # This file is free software; the Free Software Foundation
3645 # gives unlimited permission to copy and/or distribute it,
3646 # with or without modifications, as long as this notice is preserved.
3648 # AM_SILENT_RULES([DEFAULT])
3649 # --------------------------
3650 # Enable less verbose build rules; with the default set to DEFAULT
3651 # ("yes" being less verbose, "no" or empty being verbose).
3652 AC_DEFUN([AM_SILENT_RULES],
3653 [AC_ARG_ENABLE([silent-rules], [dnl
3655 [--enable-silent-rules],
3656 [less verbose build output (undo: "make V=1")])
3658 [--disable-silent-rules],
3659 [verbose build output (undo: "make V=0")])dnl
3661 case $enable_silent_rules in @%:@ (((
3662 yes) AM_DEFAULT_VERBOSITY=0;;
3663 no) AM_DEFAULT_VERBOSITY=1;;
3664 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
3667 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
3668 dnl do not support nested variable expansions.
3669 dnl See automake bug#9928 and bug#10237.
3670 am_make=${MAKE-make}
3671 AC_CACHE_CHECK([whether $am_make supports nested variables],
3672 [am_cv_make_support_nested_variables],
3673 [if AS_ECHO([['TRUE=$(BAR$(V))
3679 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
3680 am_cv_make_support_nested_variables=yes
3682 am_cv_make_support_nested_variables=no
3684 if test $am_cv_make_support_nested_variables = yes; then
3685 dnl Using '$V' instead of '$(V)' breaks IRIX make.
3687 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3689 AM_V=$AM_DEFAULT_VERBOSITY
3690 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3693 AM_SUBST_NOTMAKE([AM_V])dnl
3694 AC_SUBST([AM_DEFAULT_V])dnl
3695 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
3696 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
3698 AC_SUBST([AM_BACKSLASH])dnl
3699 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
3702 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3704 # This file is free software; the Free Software Foundation
3705 # gives unlimited permission to copy and/or distribute it,
3706 # with or without modifications, as long as this notice is preserved.
3708 # AM_PROG_INSTALL_STRIP
3709 # ---------------------
3710 # One issue with vendor 'install' (even GNU) is that you can't
3711 # specify the program used to strip binaries. This is especially
3712 # annoying in cross-compiling environments, where the build's strip
3713 # is unlikely to handle the host's binaries.
3714 # Fortunately install-sh will honor a STRIPPROG variable, so we
3715 # always use install-sh in "make install-strip", and initialize
3716 # STRIPPROG with the value of the STRIP variable (set by the user).
3717 AC_DEFUN([AM_PROG_INSTALL_STRIP],
3718 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3719 # Installed binaries are usually stripped using 'strip' when the user
3720 # run "make install-strip". However 'strip' might not be the right
3721 # tool to use in cross-compilation environments, therefore Automake
3722 # will honor the 'STRIP' environment variable to overrule this program.
3723 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
3724 if test "$cross_compiling" != no; then
3725 AC_CHECK_TOOL([STRIP], [strip], :)
3727 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3728 AC_SUBST([INSTALL_STRIP_PROGRAM])])
3730 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
3732 # This file is free software; the Free Software Foundation
3733 # gives unlimited permission to copy and/or distribute it,
3734 # with or without modifications, as long as this notice is preserved.
3736 # _AM_SUBST_NOTMAKE(VARIABLE)
3737 # ---------------------------
3738 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
3739 # This macro is traced by Automake.
3740 AC_DEFUN([_AM_SUBST_NOTMAKE])
3742 # AM_SUBST_NOTMAKE(VARIABLE)
3743 # --------------------------
3744 # Public sister of _AM_SUBST_NOTMAKE.
3745 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
3747 # Check how to create a tarball. -*- Autoconf -*-
3749 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
3751 # This file is free software; the Free Software Foundation
3752 # gives unlimited permission to copy and/or distribute it,
3753 # with or without modifications, as long as this notice is preserved.
3755 # _AM_PROG_TAR(FORMAT)
3756 # --------------------
3757 # Check how to create a tarball in format FORMAT.
3758 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
3760 # Substitute a variable $(am__tar) that is a command
3761 # writing to stdout a FORMAT-tarball containing the directory
3763 # tardir=directory && $(am__tar) > result.tar
3765 # Substitute a variable $(am__untar) that extract such
3766 # a tarball read from stdin.
3767 # $(am__untar) < result.tar
3769 AC_DEFUN([_AM_PROG_TAR],
3770 [# Always define AMTAR for backward compatibility. Yes, it's still used
3771 # in the wild :-( We should find a proper way to deprecate it ...
3772 AC_SUBST([AMTAR], ['$${TAR-tar}'])
3774 # We'll loop over all known methods to create a tar archive until one works.
3775 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
3778 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
3782 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
3783 # There is notably a 21 bits limit for the UID and the GID. In fact,
3784 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
3786 am_max_uid=2097151 # 2^21 - 1
3787 am_max_gid=$am_max_uid
3788 # The $UID and $GID variables are not portable, so we need to resort
3789 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
3790 # below are definitely unexpected, so allow the users to see them
3791 # (that is, avoid stderr redirection).
3792 am_uid=`id -u || echo unknown`
3793 am_gid=`id -g || echo unknown`
3794 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
3795 if test $am_uid -le $am_max_uid; then
3796 AC_MSG_RESULT([yes])
3801 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
3802 if test $am_gid -le $am_max_gid; then
3803 AC_MSG_RESULT([yes])
3812 [m4_fatal([Unknown tar format])])
3814 AC_MSG_CHECKING([how to create a $1 tar archive])
3816 # Go ahead even if we have the value already cached. We do so because we
3817 # need to set the values for the 'am__tar' and 'am__untar' variables.
3818 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
3820 for _am_tool in $_am_tools; do
3823 for _am_tar in tar gnutar gtar; do
3824 AM_RUN_LOG([$_am_tar --version]) && break
3826 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
3827 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
3828 am__untar="$_am_tar -xf -"
3831 # Must skip GNU tar: if it does not support --format= it doesn't create
3832 # ustar tarball either.
3833 (tar --version) >/dev/null 2>&1 && continue
3834 am__tar='tar chf - "$$tardir"'
3835 am__tar_='tar chf - "$tardir"'
3836 am__untar='tar xf -'
3839 am__tar='pax -L -x $1 -w "$$tardir"'
3840 am__tar_='pax -L -x $1 -w "$tardir"'
3844 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3845 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3846 am__untar='cpio -i -H $1 -d'
3855 # If the value was cached, stop now. We just wanted to have am__tar
3856 # and am__untar set.
3857 test -n "${am_cv_prog_tar_$1}" && break
3859 # tar/untar a dummy directory, and stop if the command works.
3862 echo GrepMe > conftest.dir/file
3863 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
3865 if test -s conftest.tar; then
3866 AM_RUN_LOG([$am__untar <conftest.tar])
3867 AM_RUN_LOG([cat conftest.dir/file])
3868 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3873 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
3874 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
3877 AC_SUBST([am__untar])