1 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
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'.])])
24 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
25 dnl (i.e. pass to gconftool-2
26 dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
27 dnl you should install foo.schemas files
30 AC_DEFUN([AM_GCONF_SOURCE_2],
32 if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
33 GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
35 GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
38 AC_ARG_WITH([gconf-source],
39 AC_HELP_STRING([--with-gconf-source=sourceaddress],
40 [Config database for installing schema files.]),
41 [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
43 AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
44 AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
46 if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
47 GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
50 AC_ARG_WITH([gconf-schema-file-dir],
51 AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
52 [Directory for installing schema files.]),
53 [GCONF_SCHEMA_FILE_DIR="$withval"],)
55 AC_SUBST(GCONF_SCHEMA_FILE_DIR)
56 AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
58 AC_ARG_ENABLE(schemas-install,
59 AC_HELP_STRING([--disable-schemas-install],
60 [Disable the schemas installation]),
63 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
65 AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
68 # gettext.m4 serial 66 (gettext-0.18.2)
69 dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
70 dnl This file is free software; the Free Software Foundation
71 dnl gives unlimited permission to copy and/or distribute it,
72 dnl with or without modifications, as long as this notice is preserved.
74 dnl This file can can be used in projects which are not available under
75 dnl the GNU General Public License or the GNU Library General Public
76 dnl License but which still want to provide support for the GNU gettext
78 dnl Please note that the actual code of the GNU gettext library is covered
79 dnl by the GNU Library General Public License, and the rest of the GNU
80 dnl gettext package package is covered by the GNU General Public License.
81 dnl They are *not* in the public domain.
84 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
85 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
87 dnl Macro to add for using GNU gettext.
89 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
90 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
91 dnl default (if it is not specified or empty) is 'no-libtool'.
92 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
93 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
94 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
95 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
96 dnl depending on --{enable,disable}-{shared,static} and on the presence of
97 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
98 dnl $(top_builddir)/intl/libintl.a will be created.
99 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
100 dnl implementations (in libc or libintl) without the ngettext() function
101 dnl will be ignored. If NEEDSYMBOL is specified and is
102 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
103 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
104 dnl INTLDIR is used to find the intl libraries. If empty,
105 dnl the value '$(top_builddir)/intl/' is used.
107 dnl The result of the configuration is one of three cases:
108 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
110 dnl Catalog format: GNU --> install in $(datadir)
111 dnl Catalog extension: .mo after installation, .gmo in source tree
112 dnl 2) GNU gettext has been found in the system's C library.
113 dnl Catalog format: GNU --> install in $(datadir)
114 dnl Catalog extension: .mo after installation, .gmo in source tree
115 dnl 3) No internationalization, always use English msgid.
116 dnl Catalog format: none
117 dnl Catalog extension: none
118 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
119 dnl The use of .gmo is historical (it was needed to avoid overwriting the
120 dnl GNU format catalogs when building on a platform with an X/Open gettext),
121 dnl but we keep it in order not to force irrelevant filename changes on the
124 AC_DEFUN([AM_GNU_GETTEXT],
126 dnl Argument checking.
127 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
128 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
130 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
131 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
132 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
133 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
135 define([gt_included_intl],
136 ifelse([$1], [external],
137 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
139 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
141 AM_GNU_GETTEXT_NEED([$2])
143 AC_REQUIRE([AM_PO_SUBDIRS])dnl
144 ifelse(gt_included_intl, yes, [
145 AC_REQUIRE([AM_INTL_SUBDIR])dnl
148 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
149 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
150 AC_REQUIRE([AC_LIB_RPATH])
152 dnl Sometimes libintl requires libiconv, so first search for libiconv.
153 dnl Ideally we would do this search only after the
154 dnl if test "$USE_NLS" = "yes"; then
155 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
156 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
157 dnl the configure script would need to contain the same shell code
158 dnl again, outside any 'if'. There are two solutions:
159 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
160 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
161 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
162 dnl documented, we avoid it.
163 ifelse(gt_included_intl, yes, , [
164 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
167 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
173 ifelse(gt_included_intl, yes, [
174 BUILD_INCLUDED_LIBINTL=no
175 USE_INCLUDED_LIBINTL=no
181 dnl Add a version number to the cache macros.
182 case " $gt_needs " in
183 *" need-formatstring-macros "*) gt_api_version=3 ;;
184 *" need-ngettext "*) gt_api_version=2 ;;
185 *) gt_api_version=1 ;;
187 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
188 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
190 dnl If we use NLS figure out what method
191 if test "$USE_NLS" = "yes"; then
192 gt_use_preinstalled_gnugettext=no
193 ifelse(gt_included_intl, yes, [
194 AC_MSG_CHECKING([whether included gettext is requested])
195 AC_ARG_WITH([included-gettext],
196 [ --with-included-gettext use the GNU gettext library included here],
197 nls_cv_force_use_gnu_gettext=$withval,
198 nls_cv_force_use_gnu_gettext=no)
199 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
201 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
202 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
204 dnl User does not insist on using GNU NLS library. Figure out what
205 dnl to use. If GNU gettext is available we use this. Else we have
206 dnl to fall back to GNU NLS library.
208 if test $gt_api_version -ge 3; then
209 gt_revision_test_code='
210 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
211 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
214 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
218 gt_revision_test_code=
220 if test $gt_api_version -ge 2; then
221 gt_expression_test_code=' + * ngettext ("", "", 0)'
223 gt_expression_test_code=
226 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
231 $gt_revision_test_code
232 extern int _nl_msg_cat_cntr;
233 extern int *_nl_domain_bindings;
236 bindtextdomain ("", "");
237 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
239 [eval "$gt_func_gnugettext_libc=yes"],
240 [eval "$gt_func_gnugettext_libc=no"])])
242 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
243 dnl Sometimes libintl requires libiconv, so first search for libiconv.
244 ifelse(gt_included_intl, yes, , [
247 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
248 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
249 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
250 dnl even if libiconv doesn't exist.
251 AC_LIB_LINKFLAGS_BODY([intl])
252 AC_CACHE_CHECK([for GNU gettext in libintl],
253 [$gt_func_gnugettext_libintl],
254 [gt_save_CPPFLAGS="$CPPFLAGS"
255 CPPFLAGS="$CPPFLAGS $INCINTL"
257 LIBS="$LIBS $LIBINTL"
258 dnl Now see whether libintl exists and does not depend on libiconv.
263 $gt_revision_test_code
264 extern int _nl_msg_cat_cntr;
269 const char *_nl_expand_alias (const char *);
272 bindtextdomain ("", "");
273 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
275 [eval "$gt_func_gnugettext_libintl=yes"],
276 [eval "$gt_func_gnugettext_libintl=no"])
277 dnl Now see whether libintl exists and depends on libiconv.
278 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
279 LIBS="$LIBS $LIBICONV"
284 $gt_revision_test_code
285 extern int _nl_msg_cat_cntr;
290 const char *_nl_expand_alias (const char *);
293 bindtextdomain ("", "");
294 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
296 [LIBINTL="$LIBINTL $LIBICONV"
297 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
298 eval "$gt_func_gnugettext_libintl=yes"
301 CPPFLAGS="$gt_save_CPPFLAGS"
302 LIBS="$gt_save_LIBS"])
305 dnl If an already present or preinstalled GNU gettext() is found,
306 dnl use it. But if this macro is used in GNU gettext, and GNU
307 dnl gettext is already preinstalled in libintl, we update this
308 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
309 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
310 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
311 && test "$PACKAGE" != gettext-runtime \
312 && test "$PACKAGE" != gettext-tools; }; then
313 gt_use_preinstalled_gnugettext=yes
315 dnl Reset the values set by searching for libintl.
321 ifelse(gt_included_intl, yes, [
322 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
323 dnl GNU gettext is not found in the C library.
324 dnl Fall back on included GNU gettext library.
325 nls_cv_use_gnu_gettext=yes
329 if test "$nls_cv_use_gnu_gettext" = "yes"; then
330 dnl Mark actions used to generate GNU NLS library.
331 BUILD_INCLUDED_LIBINTL=yes
332 USE_INCLUDED_LIBINTL=yes
333 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
334 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
335 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
339 if test "$gt_use_preinstalled_gnugettext" = "yes" \
340 || test "$nls_cv_use_gnu_gettext" = "yes"; then
341 dnl Mark actions to use GNU gettext tools.
346 if test -n "$INTL_MACOSX_LIBS"; then
347 if test "$gt_use_preinstalled_gnugettext" = "yes" \
348 || test "$nls_cv_use_gnu_gettext" = "yes"; then
349 dnl Some extra flags are needed during linking.
350 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
351 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
355 if test "$gt_use_preinstalled_gnugettext" = "yes" \
356 || test "$nls_cv_use_gnu_gettext" = "yes"; then
357 AC_DEFINE([ENABLE_NLS], [1],
358 [Define to 1 if translation of program messages to the user's native language
365 AC_MSG_CHECKING([whether to use NLS])
366 AC_MSG_RESULT([$USE_NLS])
367 if test "$USE_NLS" = "yes"; then
368 AC_MSG_CHECKING([where the gettext function comes from])
369 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
370 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
371 gt_source="external libintl"
376 gt_source="included intl directory"
378 AC_MSG_RESULT([$gt_source])
381 if test "$USE_NLS" = "yes"; then
383 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
384 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
385 AC_MSG_CHECKING([how to link with libintl])
386 AC_MSG_RESULT([$LIBINTL])
387 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
390 dnl For backward compatibility. Some packages may be using this.
391 AC_DEFINE([HAVE_GETTEXT], [1],
392 [Define if the GNU gettext() function is already present or preinstalled.])
393 AC_DEFINE([HAVE_DCGETTEXT], [1],
394 [Define if the GNU dcgettext() function is already present or preinstalled.])
397 dnl We need to process the po/ directory.
401 ifelse(gt_included_intl, yes, [
402 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
403 dnl to 'yes' because some of the testsuite requires it.
404 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
405 BUILD_INCLUDED_LIBINTL=yes
408 dnl Make all variables we use known to autoconf.
409 AC_SUBST([BUILD_INCLUDED_LIBINTL])
410 AC_SUBST([USE_INCLUDED_LIBINTL])
411 AC_SUBST([CATOBJEXT])
413 dnl For backward compatibility. Some configure.ins may be using this.
417 dnl For backward compatibility. Some Makefiles may be using this.
419 AC_SUBST([DATADIRNAME])
421 dnl For backward compatibility. Some Makefiles may be using this.
423 AC_SUBST([INSTOBJEXT])
425 dnl For backward compatibility. Some Makefiles may be using this.
429 dnl For backward compatibility. Some Makefiles may be using this.
431 if test "$USE_INCLUDED_LIBINTL" = yes; then
432 INTLOBJS="\$(GETTOBJS)"
436 dnl Enable libtool support if the surrounding package wishes it.
437 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
438 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
441 dnl For backward compatibility. Some Makefiles may be using this.
445 dnl Make all documented variables known to autoconf.
447 AC_SUBST([LTLIBINTL])
452 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
453 m4_define([gt_NEEDS_INIT],
455 m4_divert_text([DEFAULTS], [gt_needs=])
456 m4_define([gt_NEEDS_INIT], [])
460 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
461 AC_DEFUN([AM_GNU_GETTEXT_NEED],
463 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
467 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
468 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
471 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
472 dnl the schema should be compiled
475 AC_DEFUN([GLIB_GSETTINGS],
477 m4_pattern_allow([AM_V_GEN])
478 AC_ARG_ENABLE(schemas-compile,
479 AS_HELP_STRING([--disable-schemas-compile],
480 [Disable regeneration of gschemas.compiled on install]),
481 [case ${enableval} in
482 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
483 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
484 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
486 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
487 PKG_PROG_PKG_CONFIG([0.16])
488 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
489 if test x$cross_compiling != xyes; then
490 GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
492 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
494 AC_SUBST(GLIB_COMPILE_SCHEMAS)
495 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
496 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
498 ifelse([$1],,[:],[$1])
502 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
504 mostlyclean-am: clean-gsettings-schemas
506 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
508 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
509 $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
511 all-am: $(gsettings_SCHEMAS:.xml=.valid)
512 uninstall-am: uninstall-gsettings-schemas
513 install-data-am: install-gsettings-schemas
515 .SECONDARY: $(gsettings_SCHEMAS)
517 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
519 if test -n "$^"; then \
520 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
521 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
522 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
525 uninstall-gsettings-schemas:
527 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
528 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
529 test -n "$$files" || exit 0; \
530 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
531 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
532 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
534 clean-gsettings-schemas:
535 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
537 ifdef gsettings_ENUM_NAMESPACE
538 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
539 $(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 [$]@
542 _GSETTINGS_SUBST(GSETTINGS_RULES)
545 dnl _GSETTINGS_SUBST(VARIABLE)
546 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
547 AC_DEFUN([_GSETTINGS_SUBST],
550 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
554 # iconv.m4 serial 18 (gettext-0.18.2)
555 dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc.
556 dnl This file is free software; the Free Software Foundation
557 dnl gives unlimited permission to copy and/or distribute it,
558 dnl with or without modifications, as long as this notice is preserved.
560 dnl From Bruno Haible.
562 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
564 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
565 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
566 AC_REQUIRE([AC_LIB_RPATH])
568 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
570 AC_LIB_LINKFLAGS_BODY([iconv])
573 AC_DEFUN([AM_ICONV_LINK],
575 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
576 dnl those with the standalone portable GNU libiconv installed).
577 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
579 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
581 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
583 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
584 dnl because if the user has installed libiconv and not disabled its use
585 dnl via --without-libiconv-prefix, he wants to use it. The first
586 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
587 am_save_CPPFLAGS="$CPPFLAGS"
588 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
590 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
591 am_cv_func_iconv="no, consider installing GNU libiconv"
599 [[iconv_t cd = iconv_open("","");
600 iconv(cd,NULL,NULL,NULL,NULL);
601 iconv_close(cd);]])],
602 [am_cv_func_iconv=yes])
603 if test "$am_cv_func_iconv" != yes; then
605 LIBS="$LIBS $LIBICONV"
612 [[iconv_t cd = iconv_open("","");
613 iconv(cd,NULL,NULL,NULL,NULL);
614 iconv_close(cd);]])],
615 [am_cv_lib_iconv=yes]
616 [am_cv_func_iconv=yes])
620 if test "$am_cv_func_iconv" = yes; then
621 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
622 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
625 if test $am_cv_lib_iconv = yes; then
626 LIBS="$LIBS $LIBICONV"
635 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
638 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
639 if (cd_utf8_to_88591 != (iconv_t)(-1))
641 static const char input[] = "\342\202\254"; /* EURO SIGN */
643 const char *inptr = input;
644 size_t inbytesleft = strlen (input);
646 size_t outbytesleft = sizeof (buf);
647 size_t res = iconv (cd_utf8_to_88591,
648 (char **) &inptr, &inbytesleft,
649 &outptr, &outbytesleft);
652 iconv_close (cd_utf8_to_88591);
655 /* Test against Solaris 10 bug: Failures are not distinguishable from
656 successful returns. */
658 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
659 if (cd_ascii_to_88591 != (iconv_t)(-1))
661 static const char input[] = "\263";
663 const char *inptr = input;
664 size_t inbytesleft = strlen (input);
666 size_t outbytesleft = sizeof (buf);
667 size_t res = iconv (cd_ascii_to_88591,
668 (char **) &inptr, &inbytesleft,
669 &outptr, &outbytesleft);
672 iconv_close (cd_ascii_to_88591);
675 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
677 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
678 if (cd_88591_to_utf8 != (iconv_t)(-1))
680 static const char input[] = "\304";
681 static char buf[2] = { (char)0xDE, (char)0xAD };
682 const char *inptr = input;
683 size_t inbytesleft = 1;
685 size_t outbytesleft = 1;
686 size_t res = iconv (cd_88591_to_utf8,
687 (char **) &inptr, &inbytesleft,
688 &outptr, &outbytesleft);
689 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
691 iconv_close (cd_88591_to_utf8);
694 #if 0 /* This bug could be worked around by the caller. */
695 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
697 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
698 if (cd_88591_to_utf8 != (iconv_t)(-1))
700 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
702 const char *inptr = input;
703 size_t inbytesleft = strlen (input);
705 size_t outbytesleft = sizeof (buf);
706 size_t res = iconv (cd_88591_to_utf8,
707 (char **) &inptr, &inbytesleft,
708 &outptr, &outbytesleft);
711 iconv_close (cd_88591_to_utf8);
715 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
717 if (/* Try standardized names. */
718 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
719 /* Try IRIX, OSF/1 names. */
720 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
722 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
723 /* Try HP-UX names. */
724 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
728 [am_cv_func_iconv_works=yes],
729 [am_cv_func_iconv_works=no],
733 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
734 *) am_cv_func_iconv_works="guessing yes" ;;
740 case "$am_cv_func_iconv_works" in
741 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
742 *) am_func_iconv=yes ;;
745 am_func_iconv=no am_cv_lib_iconv=no
747 if test "$am_func_iconv" = yes; then
748 AC_DEFINE([HAVE_ICONV], [1],
749 [Define if you have the iconv() function and it works.])
751 if test "$am_cv_lib_iconv" = yes; then
752 AC_MSG_CHECKING([how to link with libiconv])
753 AC_MSG_RESULT([$LIBICONV])
755 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
757 CPPFLAGS="$am_save_CPPFLAGS"
762 AC_SUBST([LTLIBICONV])
765 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
766 dnl avoid warnings like
767 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
768 dnl This is tricky because of the way 'aclocal' is implemented:
769 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
770 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
771 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
772 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
774 m4_define([gl_iconv_AC_DEFUN],
775 m4_version_prereq([2.64],
778 [m4_ifdef([gl_00GNULIB],
783 gl_iconv_AC_DEFUN([AM_ICONV],
786 if test "$am_cv_func_iconv" = yes; then
787 AC_MSG_CHECKING([for iconv declaration])
788 AC_CACHE_VAL([am_cv_proto_iconv], [
798 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
799 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
805 [am_cv_proto_iconv_arg1=""],
806 [am_cv_proto_iconv_arg1="const"])
807 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);"])
808 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
811 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
812 [Define as const if the declaration of iconv() needs const.])
813 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
814 m4_ifdef([gl_ICONV_H_DEFAULTS],
815 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
816 if test -n "$am_cv_proto_iconv_arg1"; then
823 # intlmacosx.m4 serial 5 (gettext-0.18.2)
824 dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
825 dnl This file is free software; the Free Software Foundation
826 dnl gives unlimited permission to copy and/or distribute it,
827 dnl with or without modifications, as long as this notice is preserved.
829 dnl This file can can be used in projects which are not available under
830 dnl the GNU General Public License or the GNU Library General Public
831 dnl License but which still want to provide support for the GNU gettext
833 dnl Please note that the actual code of the GNU gettext library is covered
834 dnl by the GNU Library General Public License, and the rest of the GNU
835 dnl gettext package package is covered by the GNU General Public License.
836 dnl They are *not* in the public domain.
838 dnl Checks for special options needed on Mac OS X.
839 dnl Defines INTL_MACOSX_LIBS.
840 AC_DEFUN([gt_INTL_MACOSX],
842 dnl Check for API introduced in Mac OS X 10.2.
843 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
844 [gt_cv_func_CFPreferencesCopyAppValue],
845 [gt_save_LIBS="$LIBS"
846 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
849 [[#include <CoreFoundation/CFPreferences.h>]],
850 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
851 [gt_cv_func_CFPreferencesCopyAppValue=yes],
852 [gt_cv_func_CFPreferencesCopyAppValue=no])
853 LIBS="$gt_save_LIBS"])
854 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
855 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
856 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
858 dnl Check for API introduced in Mac OS X 10.3.
859 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
860 [gt_save_LIBS="$LIBS"
861 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
864 [[#include <CoreFoundation/CFLocale.h>]],
865 [[CFLocaleCopyCurrent();]])],
866 [gt_cv_func_CFLocaleCopyCurrent=yes],
867 [gt_cv_func_CFLocaleCopyCurrent=no])
868 LIBS="$gt_save_LIBS"])
869 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
870 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
871 [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
874 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
875 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
877 AC_SUBST([INTL_MACOSX_LIBS])
881 dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc.
882 dnl This file is free software; the Free Software Foundation
883 dnl gives unlimited permission to copy and/or distribute it,
884 dnl with or without modifications, as long as this notice is preserved.
886 dnl Subroutines of libtool.m4,
887 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
888 dnl collision with libtool.m4.
890 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
891 AC_DEFUN([AC_LIB_PROG_LD_GNU],
892 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
893 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
894 case `$LD -v 2>&1 </dev/null` in
895 *GNU* | *'with BFD'*)
896 acl_cv_prog_gnu_ld=yes
899 acl_cv_prog_gnu_ld=no
902 with_gnu_ld=$acl_cv_prog_gnu_ld
905 dnl From libtool-2.4. Sets the variable LD.
906 AC_DEFUN([AC_LIB_PROG_LD],
907 [AC_REQUIRE([AC_PROG_CC])dnl
908 AC_REQUIRE([AC_CANONICAL_HOST])dnl
910 AC_ARG_WITH([gnu-ld],
911 [AS_HELP_STRING([--with-gnu-ld],
912 [assume the C compiler uses GNU ld [default=no]])],
913 [test "$withval" = no || with_gnu_ld=yes],
916 # Prepare PATH_SEPARATOR.
917 # The user is always right.
918 if test "${PATH_SEPARATOR+set}" != set; then
919 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
920 # contains only /bin. Note that ksh looks also at the FPATH variable,
921 # so we have to set that as well for the test.
923 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
924 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
925 || PATH_SEPARATOR=';'
930 if test "$GCC" = yes; then
931 # Check if gcc -print-prog-name=ld gives a path.
932 AC_MSG_CHECKING([for ld used by $CC])
935 # gcc leaves a trailing carriage return which upsets mingw
936 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
938 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
941 # Accept absolute paths.
942 [[\\/]]* | ?:[[\\/]]*)
943 re_direlt='/[[^/]][[^/]]*/\.\./'
944 # Canonicalize the pathname of ld
945 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
946 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
947 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
949 test -z "$LD" && LD="$ac_prog"
952 # If it fails, then pretend we aren't using GCC.
956 # If it is relative, then search for the first ld in PATH.
960 elif test "$with_gnu_ld" = yes; then
961 AC_MSG_CHECKING([for GNU ld])
963 AC_MSG_CHECKING([for non-GNU ld])
965 AC_CACHE_VAL([acl_cv_path_LD],
966 [if test -z "$LD"; then
967 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
968 for ac_dir in $PATH; do
970 test -z "$ac_dir" && ac_dir=.
971 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
972 acl_cv_path_LD="$ac_dir/$ac_prog"
973 # Check to see if the program is GNU ld. I'd rather use --version,
974 # but apparently some variants of GNU ld only accept -v.
975 # Break only if it was the GNU/non-GNU ld that we prefer.
976 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
977 *GNU* | *'with BFD'*)
978 test "$with_gnu_ld" != no && break
981 test "$with_gnu_ld" != yes && break
988 acl_cv_path_LD="$LD" # Let the user override the test with a path.
991 if test -n "$LD"; then
996 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1000 # lib-link.m4 serial 26 (gettext-0.18.2)
1001 dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
1002 dnl This file is free software; the Free Software Foundation
1003 dnl gives unlimited permission to copy and/or distribute it,
1004 dnl with or without modifications, as long as this notice is preserved.
1006 dnl From Bruno Haible.
1010 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1011 dnl the libraries corresponding to explicit and implicit dependencies.
1012 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1013 dnl augments the CPPFLAGS variable.
1014 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1015 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1016 AC_DEFUN([AC_LIB_LINKFLAGS],
1018 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1019 AC_REQUIRE([AC_LIB_RPATH])
1020 pushdef([Name],[m4_translit([$1],[./+-], [____])])
1021 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1022 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1023 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1024 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1025 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1026 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1027 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1028 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1030 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1031 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1032 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1033 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1034 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1036 AC_SUBST([LTLIB]NAME)
1037 AC_SUBST([LIB]NAME[_PREFIX])
1038 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1039 dnl results of this search when this library appears as a dependency.
1045 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1046 dnl searches for libname and the libraries corresponding to explicit and
1047 dnl implicit dependencies, together with the specified include files and
1048 dnl the ability to compile and link the specified testcode. The missing-message
1049 dnl defaults to 'no' and may contain additional hints for the user.
1050 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1051 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1052 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1053 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1054 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1055 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1056 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1058 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1059 AC_REQUIRE([AC_LIB_RPATH])
1060 pushdef([Name],[m4_translit([$1],[./+-], [____])])
1061 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1062 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1064 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1066 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1068 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1069 dnl because if the user has installed lib[]Name and not disabled its use
1070 dnl via --without-lib[]Name-prefix, he wants to use it.
1071 ac_save_CPPFLAGS="$CPPFLAGS"
1072 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1074 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1075 ac_save_LIBS="$LIBS"
1076 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1077 dnl because these -l options might require -L options that are present in
1078 dnl LIBS. -l options benefit only from the -L options listed before it.
1079 dnl Otherwise, add it to the front of LIBS, because it may be a static
1080 dnl library that depends on another static library that is present in LIBS.
1081 dnl Static libraries benefit only from the static libraries listed after
1083 case " $LIB[]NAME" in
1084 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1085 *) LIBS="$LIB[]NAME $LIBS" ;;
1088 [AC_LANG_PROGRAM([[$3]], [[$4]])],
1089 [ac_cv_lib[]Name=yes],
1090 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1091 LIBS="$ac_save_LIBS"
1093 if test "$ac_cv_lib[]Name" = yes; then
1095 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1096 AC_MSG_CHECKING([how to link with lib[]$1])
1097 AC_MSG_RESULT([$LIB[]NAME])
1100 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1101 dnl $INC[]NAME either.
1102 CPPFLAGS="$ac_save_CPPFLAGS"
1107 AC_SUBST([HAVE_LIB]NAME)
1109 AC_SUBST([LTLIB]NAME)
1110 AC_SUBST([LIB]NAME[_PREFIX])
1115 dnl Determine the platform dependent parameters needed to use rpath:
1118 dnl acl_libname_spec,
1119 dnl acl_library_names_spec,
1120 dnl acl_hardcode_libdir_flag_spec,
1121 dnl acl_hardcode_libdir_separator,
1122 dnl acl_hardcode_direct,
1123 dnl acl_hardcode_minus_L.
1124 AC_DEFUN([AC_LIB_RPATH],
1126 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1127 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1128 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1129 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1130 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1131 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1132 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1133 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1134 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1140 acl_libext="$acl_cv_libext"
1141 acl_shlibext="$acl_cv_shlibext"
1142 acl_libname_spec="$acl_cv_libname_spec"
1143 acl_library_names_spec="$acl_cv_library_names_spec"
1144 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1145 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1146 acl_hardcode_direct="$acl_cv_hardcode_direct"
1147 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1148 dnl Determine whether the user wants rpath handling at all.
1149 AC_ARG_ENABLE([rpath],
1150 [ --disable-rpath do not hardcode runtime library paths],
1151 :, enable_rpath=yes)
1154 dnl AC_LIB_FROMPACKAGE(name, package)
1155 dnl declares that libname comes from the given package. The configure file
1156 dnl will then not have a --with-libname-prefix option but a
1157 dnl --with-package-prefix option. Several libraries can come from the same
1158 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1159 dnl macro call that searches for libname.
1160 AC_DEFUN([AC_LIB_FROMPACKAGE],
1162 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1163 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1164 define([acl_frompackage_]NAME, [$2])
1166 pushdef([PACK],[$2])
1167 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1168 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1169 define([acl_libsinpackage_]PACKUP,
1170 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
1175 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1176 dnl the libraries corresponding to explicit and implicit dependencies.
1177 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1178 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1179 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1180 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1182 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1183 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1184 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1185 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1186 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1187 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1188 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1189 dnl Autoconf >= 2.61 supports dots in --with options.
1190 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
1191 dnl By default, look in $includedir and $libdir.
1193 AC_LIB_WITH_FINAL_PREFIX([
1194 eval additional_includedir=\"$includedir\"
1195 eval additional_libdir=\"$libdir\"
1197 AC_ARG_WITH(P_A_C_K[-prefix],
1198 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1199 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1201 if test "X$withval" = "Xno"; then
1204 if test "X$withval" = "X"; then
1205 AC_LIB_WITH_FINAL_PREFIX([
1206 eval additional_includedir=\"$includedir\"
1207 eval additional_libdir=\"$libdir\"
1210 additional_includedir="$withval/include"
1211 additional_libdir="$withval/$acl_libdirstem"
1212 if test "$acl_libdirstem2" != "$acl_libdirstem" \
1213 && ! test -d "$withval/$acl_libdirstem"; then
1214 additional_libdir="$withval/$acl_libdirstem2"
1219 dnl Search the library and its dependencies in $additional_libdir and
1220 dnl $LDFLAGS. Using breadth-first-seach.
1225 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1226 dnl computed. So it has to be reset here.
1230 names_already_handled=
1231 names_next_round='$1 $2'
1232 while test -n "$names_next_round"; do
1233 names_this_round="$names_next_round"
1235 for name in $names_this_round; do
1237 for n in $names_already_handled; do
1238 if test "$n" = "$name"; then
1243 if test -z "$already_handled"; then
1244 names_already_handled="$names_already_handled $name"
1245 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1246 dnl or AC_LIB_HAVE_LINKFLAGS call.
1247 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
1248 eval value=\"\$HAVE_LIB$uppername\"
1249 if test -n "$value"; then
1250 if test "$value" = yes; then
1251 eval value=\"\$LIB$uppername\"
1252 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1253 eval value=\"\$LTLIB$uppername\"
1254 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1256 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1257 dnl that this library doesn't exist. So just drop it.
1261 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1262 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1267 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1268 if test -n "$acl_shlibext"; then
1269 shrext=".$acl_shlibext" # typically: shrext=.so
1273 if test $use_additional = yes; then
1274 dir="$additional_libdir"
1275 dnl The same code as in the loop below:
1276 dnl First look for a shared library.
1277 if test -n "$acl_shlibext"; then
1278 if test -f "$dir/$libname$shrext"; then
1280 found_so="$dir/$libname$shrext"
1282 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1283 ver=`(cd "$dir" && \
1284 for f in "$libname$shrext".*; do echo "$f"; done \
1285 | sed -e "s,^$libname$shrext\\\\.,," \
1286 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1287 | sed 1q ) 2>/dev/null`
1288 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1290 found_so="$dir/$libname$shrext.$ver"
1293 eval library_names=\"$acl_library_names_spec\"
1294 for f in $library_names; do
1295 if test -f "$dir/$f"; then
1304 dnl Then look for a static library.
1305 if test "X$found_dir" = "X"; then
1306 if test -f "$dir/$libname.$acl_libext"; then
1308 found_a="$dir/$libname.$acl_libext"
1311 if test "X$found_dir" != "X"; then
1312 if test -f "$dir/$libname.la"; then
1313 found_la="$dir/$libname.la"
1317 if test "X$found_dir" = "X"; then
1318 for x in $LDFLAGS $LTLIB[]NAME; do
1319 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1322 dir=`echo "X$x" | sed -e 's/^X-L//'`
1323 dnl First look for a shared library.
1324 if test -n "$acl_shlibext"; then
1325 if test -f "$dir/$libname$shrext"; then
1327 found_so="$dir/$libname$shrext"
1329 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1330 ver=`(cd "$dir" && \
1331 for f in "$libname$shrext".*; do echo "$f"; done \
1332 | sed -e "s,^$libname$shrext\\\\.,," \
1333 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1334 | sed 1q ) 2>/dev/null`
1335 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1337 found_so="$dir/$libname$shrext.$ver"
1340 eval library_names=\"$acl_library_names_spec\"
1341 for f in $library_names; do
1342 if test -f "$dir/$f"; then
1351 dnl Then look for a static library.
1352 if test "X$found_dir" = "X"; then
1353 if test -f "$dir/$libname.$acl_libext"; then
1355 found_a="$dir/$libname.$acl_libext"
1358 if test "X$found_dir" != "X"; then
1359 if test -f "$dir/$libname.la"; then
1360 found_la="$dir/$libname.la"
1365 if test "X$found_dir" != "X"; then
1370 if test "X$found_dir" != "X"; then
1371 dnl Found the library.
1372 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1373 if test "X$found_so" != "X"; then
1374 dnl Linking with a shared library. We attempt to hardcode its
1375 dnl directory into the executable's runpath, unless it's the
1376 dnl standard /usr/lib.
1377 if test "$enable_rpath" = no \
1378 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1379 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1380 dnl No hardcoding is needed.
1381 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1383 dnl Use an explicit option to hardcode DIR into the resulting
1385 dnl Potentially add DIR to ltrpathdirs.
1386 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1388 for x in $ltrpathdirs; do
1389 if test "X$x" = "X$found_dir"; then
1394 if test -z "$haveit"; then
1395 ltrpathdirs="$ltrpathdirs $found_dir"
1397 dnl The hardcoding into $LIBNAME is system dependent.
1398 if test "$acl_hardcode_direct" = yes; then
1399 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1400 dnl resulting binary.
1401 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1403 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1404 dnl Use an explicit option to hardcode DIR into the resulting
1406 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1407 dnl Potentially add DIR to rpathdirs.
1408 dnl The rpathdirs will be appended to $LIBNAME at the end.
1410 for x in $rpathdirs; do
1411 if test "X$x" = "X$found_dir"; then
1416 if test -z "$haveit"; then
1417 rpathdirs="$rpathdirs $found_dir"
1420 dnl Rely on "-L$found_dir".
1421 dnl But don't add it if it's already contained in the LDFLAGS
1422 dnl or the already constructed $LIBNAME
1424 for x in $LDFLAGS $LIB[]NAME; do
1425 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1426 if test "X$x" = "X-L$found_dir"; then
1431 if test -z "$haveit"; then
1432 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1434 if test "$acl_hardcode_minus_L" != no; then
1435 dnl FIXME: Not sure whether we should use
1436 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1438 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1440 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1441 dnl here, because this doesn't fit in flags passed to the
1442 dnl compiler. So give up. No hardcoding. This affects only
1443 dnl very old systems.
1444 dnl FIXME: Not sure whether we should use
1445 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1447 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1453 if test "X$found_a" != "X"; then
1454 dnl Linking with a static library.
1455 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1457 dnl We shouldn't come here, but anyway it's good to have a
1459 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1462 dnl Assume the include files are nearby.
1463 additional_includedir=
1464 case "$found_dir" in
1465 */$acl_libdirstem | */$acl_libdirstem/)
1466 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1467 if test "$name" = '$1'; then
1468 LIB[]NAME[]_PREFIX="$basedir"
1470 additional_includedir="$basedir/include"
1472 */$acl_libdirstem2 | */$acl_libdirstem2/)
1473 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1474 if test "$name" = '$1'; then
1475 LIB[]NAME[]_PREFIX="$basedir"
1477 additional_includedir="$basedir/include"
1480 if test "X$additional_includedir" != "X"; then
1481 dnl Potentially add $additional_includedir to $INCNAME.
1482 dnl But don't add it
1483 dnl 1. if it's the standard /usr/include,
1484 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1485 dnl 3. if it's already present in $CPPFLAGS or the already
1486 dnl constructed $INCNAME,
1487 dnl 4. if it doesn't exist as a directory.
1488 if test "X$additional_includedir" != "X/usr/include"; then
1490 if test "X$additional_includedir" = "X/usr/local/include"; then
1491 if test -n "$GCC"; then
1493 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1497 if test -z "$haveit"; then
1498 for x in $CPPFLAGS $INC[]NAME; do
1499 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1500 if test "X$x" = "X-I$additional_includedir"; then
1505 if test -z "$haveit"; then
1506 if test -d "$additional_includedir"; then
1507 dnl Really add $additional_includedir to $INCNAME.
1508 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1514 dnl Look for dependencies.
1515 if test -n "$found_la"; then
1516 dnl Read the .la file. It defines the variables
1517 dnl dlname, library_names, old_library, dependency_libs, current,
1518 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1519 save_libdir="$libdir"
1521 */* | *\\*) . "$found_la" ;;
1522 *) . "./$found_la" ;;
1524 libdir="$save_libdir"
1525 dnl We use only dependency_libs.
1526 for dep in $dependency_libs; do
1529 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1530 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1531 dnl But don't add it
1532 dnl 1. if it's the standard /usr/lib,
1533 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1534 dnl 3. if it's already present in $LDFLAGS or the already
1535 dnl constructed $LIBNAME,
1536 dnl 4. if it doesn't exist as a directory.
1537 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1538 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1540 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1541 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1542 if test -n "$GCC"; then
1544 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1548 if test -z "$haveit"; then
1550 for x in $LDFLAGS $LIB[]NAME; do
1551 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1552 if test "X$x" = "X-L$additional_libdir"; then
1557 if test -z "$haveit"; then
1558 if test -d "$additional_libdir"; then
1559 dnl Really add $additional_libdir to $LIBNAME.
1560 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1564 for x in $LDFLAGS $LTLIB[]NAME; do
1565 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1566 if test "X$x" = "X-L$additional_libdir"; then
1571 if test -z "$haveit"; then
1572 if test -d "$additional_libdir"; then
1573 dnl Really add $additional_libdir to $LTLIBNAME.
1574 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1581 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1582 if test "$enable_rpath" != no; then
1583 dnl Potentially add DIR to rpathdirs.
1584 dnl The rpathdirs will be appended to $LIBNAME at the end.
1586 for x in $rpathdirs; do
1587 if test "X$x" = "X$dir"; then
1592 if test -z "$haveit"; then
1593 rpathdirs="$rpathdirs $dir"
1595 dnl Potentially add DIR to ltrpathdirs.
1596 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1598 for x in $ltrpathdirs; do
1599 if test "X$x" = "X$dir"; then
1604 if test -z "$haveit"; then
1605 ltrpathdirs="$ltrpathdirs $dir"
1610 dnl Handle this in the next round.
1611 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1614 dnl Handle this in the next round. Throw away the .la's
1615 dnl directory; it is already contained in a preceding -L
1617 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1620 dnl Most likely an immediate library name.
1621 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1622 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1628 dnl Didn't find the library; assume it is in the system directories
1629 dnl known to the linker and runtime loader. (All the system
1630 dnl directories known to the linker should also be known to the
1631 dnl runtime loader, otherwise the system is severely misconfigured.)
1632 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1633 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1639 if test "X$rpathdirs" != "X"; then
1640 if test -n "$acl_hardcode_libdir_separator"; then
1641 dnl Weird platform: only the last -rpath option counts, the user must
1642 dnl pass all path elements in one option. We can arrange that for a
1643 dnl single library, but not when more than one $LIBNAMEs are used.
1645 for found_dir in $rpathdirs; do
1646 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1648 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1649 acl_save_libdir="$libdir"
1651 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1652 libdir="$acl_save_libdir"
1653 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1655 dnl The -rpath options are cumulative.
1656 for found_dir in $rpathdirs; do
1657 acl_save_libdir="$libdir"
1659 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1660 libdir="$acl_save_libdir"
1661 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1665 if test "X$ltrpathdirs" != "X"; then
1666 dnl When using libtool, the option that works for both libraries and
1667 dnl executables is -R. The -R options are cumulative.
1668 for found_dir in $ltrpathdirs; do
1669 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1679 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1680 dnl unless already present in VAR.
1681 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1682 dnl contains two or three consecutive elements that belong together.
1683 AC_DEFUN([AC_LIB_APPENDTOVAR],
1685 for element in [$2]; do
1688 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1689 if test "X$x" = "X$element"; then
1694 if test -z "$haveit"; then
1695 [$1]="${[$1]}${[$1]:+ }$element"
1700 dnl For those cases where a variable contains several -L and -l options
1701 dnl referring to unknown libraries and directories, this macro determines the
1702 dnl necessary additional linker options for the runtime path.
1703 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1704 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1705 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1706 dnl otherwise linking without libtool is assumed.
1707 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1709 AC_REQUIRE([AC_LIB_RPATH])
1710 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1712 if test "$enable_rpath" != no; then
1713 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1714 dnl Use an explicit option to hardcode directories into the resulting
1719 if test -n "$next"; then
1721 dnl No need to hardcode the standard /usr/lib.
1722 if test "X$dir" != "X/usr/$acl_libdirstem" \
1723 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1724 rpathdirs="$rpathdirs $dir"
1730 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1731 dnl No need to hardcode the standard /usr/lib.
1732 if test "X$dir" != "X/usr/$acl_libdirstem" \
1733 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1734 rpathdirs="$rpathdirs $dir"
1741 if test "X$rpathdirs" != "X"; then
1742 if test -n ""$3""; then
1743 dnl libtool is used for linking. Use -R options.
1744 for dir in $rpathdirs; do
1745 $1="${$1}${$1:+ }-R$dir"
1748 dnl The linker is used for linking directly.
1749 if test -n "$acl_hardcode_libdir_separator"; then
1750 dnl Weird platform: only the last -rpath option counts, the user
1751 dnl must pass all path elements in one option.
1753 for dir in $rpathdirs; do
1754 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1756 acl_save_libdir="$libdir"
1758 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1759 libdir="$acl_save_libdir"
1762 dnl The -rpath options are cumulative.
1763 for dir in $rpathdirs; do
1764 acl_save_libdir="$libdir"
1766 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1767 libdir="$acl_save_libdir"
1768 $1="${$1}${$1:+ }$flag"
1778 # lib-prefix.m4 serial 7 (gettext-0.18)
1779 dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc.
1780 dnl This file is free software; the Free Software Foundation
1781 dnl gives unlimited permission to copy and/or distribute it,
1782 dnl with or without modifications, as long as this notice is preserved.
1784 dnl From Bruno Haible.
1786 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1787 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1788 dnl require excessive bracketing.
1789 ifdef([AC_HELP_STRING],
1790 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1791 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1793 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1794 dnl to access previously installed libraries. The basic assumption is that
1795 dnl a user will want packages to use other packages he previously installed
1796 dnl with the same --prefix option.
1797 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1798 dnl libraries, but is otherwise very convenient.
1799 AC_DEFUN([AC_LIB_PREFIX],
1801 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1802 AC_REQUIRE([AC_PROG_CC])
1803 AC_REQUIRE([AC_CANONICAL_HOST])
1804 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1805 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1806 dnl By default, look in $includedir and $libdir.
1808 AC_LIB_WITH_FINAL_PREFIX([
1809 eval additional_includedir=\"$includedir\"
1810 eval additional_libdir=\"$libdir\"
1812 AC_LIB_ARG_WITH([lib-prefix],
1813 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1814 --without-lib-prefix don't search for libraries in includedir and libdir],
1816 if test "X$withval" = "Xno"; then
1819 if test "X$withval" = "X"; then
1820 AC_LIB_WITH_FINAL_PREFIX([
1821 eval additional_includedir=\"$includedir\"
1822 eval additional_libdir=\"$libdir\"
1825 additional_includedir="$withval/include"
1826 additional_libdir="$withval/$acl_libdirstem"
1830 if test $use_additional = yes; then
1831 dnl Potentially add $additional_includedir to $CPPFLAGS.
1832 dnl But don't add it
1833 dnl 1. if it's the standard /usr/include,
1834 dnl 2. if it's already present in $CPPFLAGS,
1835 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1836 dnl 4. if it doesn't exist as a directory.
1837 if test "X$additional_includedir" != "X/usr/include"; then
1839 for x in $CPPFLAGS; do
1840 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1841 if test "X$x" = "X-I$additional_includedir"; then
1846 if test -z "$haveit"; then
1847 if test "X$additional_includedir" = "X/usr/local/include"; then
1848 if test -n "$GCC"; then
1850 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1854 if test -z "$haveit"; then
1855 if test -d "$additional_includedir"; then
1856 dnl Really add $additional_includedir to $CPPFLAGS.
1857 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1862 dnl Potentially add $additional_libdir to $LDFLAGS.
1863 dnl But don't add it
1864 dnl 1. if it's the standard /usr/lib,
1865 dnl 2. if it's already present in $LDFLAGS,
1866 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1867 dnl 4. if it doesn't exist as a directory.
1868 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1870 for x in $LDFLAGS; do
1871 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1872 if test "X$x" = "X-L$additional_libdir"; then
1877 if test -z "$haveit"; then
1878 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1879 if test -n "$GCC"; then
1881 linux*) haveit=yes;;
1885 if test -z "$haveit"; then
1886 if test -d "$additional_libdir"; then
1887 dnl Really add $additional_libdir to $LDFLAGS.
1888 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1896 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1897 dnl acl_final_exec_prefix, containing the values to which $prefix and
1898 dnl $exec_prefix will expand at the end of the configure script.
1899 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1901 dnl Unfortunately, prefix and exec_prefix get only finally determined
1902 dnl at the end of configure.
1903 if test "X$prefix" = "XNONE"; then
1904 acl_final_prefix="$ac_default_prefix"
1906 acl_final_prefix="$prefix"
1908 if test "X$exec_prefix" = "XNONE"; then
1909 acl_final_exec_prefix='${prefix}'
1911 acl_final_exec_prefix="$exec_prefix"
1913 acl_save_prefix="$prefix"
1914 prefix="$acl_final_prefix"
1915 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1916 prefix="$acl_save_prefix"
1919 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1920 dnl variables prefix and exec_prefix bound to the values they will have
1921 dnl at the end of the configure script.
1922 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1924 acl_save_prefix="$prefix"
1925 prefix="$acl_final_prefix"
1926 acl_save_exec_prefix="$exec_prefix"
1927 exec_prefix="$acl_final_exec_prefix"
1929 exec_prefix="$acl_save_exec_prefix"
1930 prefix="$acl_save_prefix"
1933 dnl AC_LIB_PREPARE_MULTILIB creates
1934 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1935 dnl "lib" or "lib64" or "lib/64",
1936 dnl - a variable acl_libdirstem2, as a secondary possible value for
1937 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1939 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1941 dnl There is no formal standard regarding lib and lib64.
1942 dnl On glibc systems, the current practice is that on a system supporting
1943 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1944 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1945 dnl the compiler's default mode by looking at the compiler's library search
1946 dnl path. If at least one of its elements ends in /lib64 or points to a
1947 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1948 dnl Otherwise we use the default, namely "lib".
1949 dnl On Solaris systems, the current practice is that on a system supporting
1950 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1951 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1952 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1953 AC_REQUIRE([AC_CANONICAL_HOST])
1958 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1959 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1960 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1961 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1962 dnl symlink is missing, so we set acl_libdirstem2 too.
1963 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1964 [AC_EGREP_CPP([sixtyfour bits], [
1968 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1970 if test $gl_cv_solaris_64bit = yes; then
1971 acl_libdirstem=lib/64
1973 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1974 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1979 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1980 if test -n "$searchpath"; then
1981 acl_save_IFS="${IFS= }"; IFS=":"
1982 for searchdir in $searchpath; do
1983 if test -d "$searchdir"; then
1984 case "$searchdir" in
1985 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1987 # Better ignore directories of this form. They are misleading.
1989 *) searchdir=`cd "$searchdir" && pwd`
1990 case "$searchdir" in
1991 */lib64 ) acl_libdirstem=lib64 ;;
2000 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
2003 # nls.m4 serial 5 (gettext-0.18)
2004 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
2006 dnl This file is free software; the Free Software Foundation
2007 dnl gives unlimited permission to copy and/or distribute it,
2008 dnl with or without modifications, as long as this notice is preserved.
2010 dnl This file can can be used in projects which are not available under
2011 dnl the GNU General Public License or the GNU Library General Public
2012 dnl License but which still want to provide support for the GNU gettext
2014 dnl Please note that the actual code of the GNU gettext library is covered
2015 dnl by the GNU Library General Public License, and the rest of the GNU
2016 dnl gettext package package is covered by the GNU General Public License.
2017 dnl They are *not* in the public domain.
2020 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2021 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2027 AC_MSG_CHECKING([whether NLS is requested])
2028 dnl Default is enabled NLS
2029 AC_ARG_ENABLE([nls],
2030 [ --disable-nls do not use Native Language Support],
2031 USE_NLS=$enableval, USE_NLS=yes)
2032 AC_MSG_RESULT([$USE_NLS])
2036 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2037 # serial 1 (pkg-config-0.24)
2039 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2041 # This program is free software; you can redistribute it and/or modify
2042 # it under the terms of the GNU General Public License as published by
2043 # the Free Software Foundation; either version 2 of the License, or
2044 # (at your option) any later version.
2046 # This program is distributed in the hope that it will be useful, but
2047 # WITHOUT ANY WARRANTY; without even the implied warranty of
2048 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2049 # General Public License for more details.
2051 # You should have received a copy of the GNU General Public License
2052 # along with this program; if not, write to the Free Software
2053 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2055 # As a special exception to the GNU General Public License, if you
2056 # distribute this file as part of a program that contains a
2057 # configuration script generated by Autoconf, you may include it under
2058 # the same distribution terms that you use for the rest of that program.
2060 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
2061 # ----------------------------------
2062 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2063 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2064 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
2065 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
2066 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
2067 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
2068 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
2070 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2071 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2073 if test -n "$PKG_CONFIG"; then
2074 _pkg_min_version=m4_default([$1], [0.9.0])
2075 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2076 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2077 AC_MSG_RESULT([yes])
2083 ])# PKG_PROG_PKG_CONFIG
2085 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2087 # Check to see whether a particular set of modules exists. Similar
2088 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
2090 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2091 # only at the first occurence in configure.ac, so if the first place
2092 # it's called might be skipped (such as if it is within an "if", you
2093 # have to call PKG_CHECK_EXISTS manually
2094 # --------------------------------------------------------------
2095 AC_DEFUN([PKG_CHECK_EXISTS],
2096 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2097 if test -n "$PKG_CONFIG" && \
2098 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2099 m4_default([$2], [:])
2100 m4_ifvaln([$3], [else
2104 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2105 # ---------------------------------------------
2106 m4_define([_PKG_CONFIG],
2107 [if test -n "$$1"; then
2109 elif test -n "$PKG_CONFIG"; then
2110 PKG_CHECK_EXISTS([$3],
2111 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
2112 test "x$?" != "x0" && pkg_failed=yes ],
2119 # _PKG_SHORT_ERRORS_SUPPORTED
2120 # -----------------------------
2121 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2122 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2123 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2124 _pkg_short_errors_supported=yes
2126 _pkg_short_errors_supported=no
2128 ])# _PKG_SHORT_ERRORS_SUPPORTED
2131 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2132 # [ACTION-IF-NOT-FOUND])
2135 # Note that if there is a possibility the first call to
2136 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2137 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2140 # --------------------------------------------------------------
2141 AC_DEFUN([PKG_CHECK_MODULES],
2142 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2143 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2144 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2147 AC_MSG_CHECKING([for $1])
2149 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2150 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2152 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2153 and $1[]_LIBS to avoid the need to call pkg-config.
2154 See the pkg-config man page for more details.])
2156 if test $pkg_failed = yes; then
2158 _PKG_SHORT_ERRORS_SUPPORTED
2159 if test $_pkg_short_errors_supported = yes; then
2160 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
2162 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
2164 # Put the nasty error message in config.log where it belongs
2165 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2167 m4_default([$4], [AC_MSG_ERROR(
2168 [Package requirements ($2) were not met:
2172 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2173 installed software in a non-standard prefix.
2177 elif test $pkg_failed = untried; then
2179 m4_default([$4], [AC_MSG_FAILURE(
2180 [The pkg-config script could not be found or is too old. Make sure it
2181 is in your PATH or set the PKG_CONFIG environment variable to the full
2186 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
2189 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2190 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2191 AC_MSG_RESULT([yes])
2194 ])# PKG_CHECK_MODULES
2196 # po.m4 serial 21 (gettext-0.18.3)
2197 dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
2198 dnl This file is free software; the Free Software Foundation
2199 dnl gives unlimited permission to copy and/or distribute it,
2200 dnl with or without modifications, as long as this notice is preserved.
2202 dnl This file can can be used in projects which are not available under
2203 dnl the GNU General Public License or the GNU Library General Public
2204 dnl License but which still want to provide support for the GNU gettext
2206 dnl Please note that the actual code of the GNU gettext library is covered
2207 dnl by the GNU Library General Public License, and the rest of the GNU
2208 dnl gettext package package is covered by the GNU General Public License.
2209 dnl They are *not* in the public domain.
2212 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2213 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2217 dnl Checks for all prerequisites of the po subdirectory.
2218 AC_DEFUN([AM_PO_SUBDIRS],
2220 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2221 AC_REQUIRE([AC_PROG_INSTALL])dnl
2222 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2223 AC_REQUIRE([AC_PROG_SED])dnl
2224 AC_REQUIRE([AM_NLS])dnl
2226 dnl Release version of the gettext macros. This is used to ensure that
2227 dnl the gettext macros and po/Makefile.in.in are in sync.
2228 AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
2230 dnl Perform the following tests also if --disable-nls has been given,
2231 dnl because they are needed for "make dist" to work.
2233 dnl Search for GNU msgfmt in the PATH.
2234 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2235 dnl The second test excludes FreeBSD msgfmt.
2236 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2237 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2238 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2240 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2242 dnl Test whether it is GNU msgfmt >= 0.15.
2244 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2245 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2246 *) MSGFMT_015=$MSGFMT ;;
2249 AC_SUBST([MSGFMT_015])
2251 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2252 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2253 *) GMSGFMT_015=$GMSGFMT ;;
2256 AC_SUBST([GMSGFMT_015])
2258 dnl Search for GNU xgettext 0.12 or newer in the PATH.
2259 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2260 dnl The second test excludes FreeBSD xgettext.
2261 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2262 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2263 (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)],
2265 dnl Remove leftover from FreeBSD xgettext call.
2268 dnl Test whether it is GNU xgettext >= 0.15.
2270 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2271 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2272 *) XGETTEXT_015=$XGETTEXT ;;
2275 AC_SUBST([XGETTEXT_015])
2277 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2278 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2279 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2281 dnl Installation directories.
2282 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2283 dnl have to define it here, so that it can be used in po/Makefile.
2284 test -n "$localedir" || localedir='${datadir}/locale'
2285 AC_SUBST([localedir])
2287 dnl Support for AM_XGETTEXT_OPTION.
2288 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2289 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2291 AC_CONFIG_COMMANDS([po-directories], [[
2292 for ac_file in $CONFIG_FILES; do
2293 # Support "outfile[:infile[:infile...]]"
2295 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2297 # PO directories have a Makefile.in generated from Makefile.in.in.
2298 case "$ac_file" in */Makefile.in)
2299 # Adjust a relative srcdir.
2300 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2301 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2302 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2303 # In autoconf-2.13 it is called $ac_given_srcdir.
2304 # In autoconf-2.50 it is called $srcdir.
2305 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2306 case "$ac_given_srcdir" in
2307 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2308 /*) top_srcdir="$ac_given_srcdir" ;;
2309 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2311 # Treat a directory as a PO directory if and only if it has a
2312 # POTFILES.in file. This allows packages to have multiple PO
2313 # directories under different names or in different locations.
2314 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2315 rm -f "$ac_dir/POTFILES"
2316 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2317 gt_tab=`printf '\t'`
2318 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"
2319 POMAKEFILEDEPS="POTFILES.in"
2320 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2321 # on $ac_dir but don't depend on user-specified configuration
2323 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2324 # The LINGUAS file contains the set of available languages.
2325 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2326 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2328 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2329 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2330 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2331 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2333 # The set of available languages was given in configure.in.
2334 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2335 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2338 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2339 # Compute UPDATEPOFILES
2340 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2341 # Compute DUMMYPOFILES
2342 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2344 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2345 case "$ac_given_srcdir" in
2347 *) srcdirpre='$(srcdir)/' ;;
2353 for lang in $ALL_LINGUAS; do
2354 POFILES="$POFILES $srcdirpre$lang.po"
2355 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2356 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2357 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2359 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2360 # environment variable.
2362 if test -n "$ALL_LINGUAS"; then
2363 for presentlang in $ALL_LINGUAS; do
2365 if test "%UNSET%" != "$LINGUAS"; then
2366 desiredlanguages="$LINGUAS"
2368 desiredlanguages="$ALL_LINGUAS"
2370 for desiredlang in $desiredlanguages; do
2371 # Use the presentlang catalog if desiredlang is
2372 # a. equal to presentlang, or
2373 # b. a variant of presentlang (because in this case,
2374 # presentlang can be used as a fallback for messages
2375 # which are not translated in the desiredlang catalog).
2376 case "$desiredlang" in
2377 "$presentlang"*) useit=yes;;
2380 if test $useit = yes; then
2381 INST_LINGUAS="$INST_LINGUAS $presentlang"
2386 if test -n "$INST_LINGUAS"; then
2387 for lang in $INST_LINGUAS; do
2388 CATALOGS="$CATALOGS $lang.gmo"
2391 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2392 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"
2393 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2394 if test -f "$f"; then
2396 *.orig | *.bak | *~) ;;
2397 *) cat "$f" >> "$ac_dir/Makefile" ;;
2405 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2406 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2407 # from automake < 1.5.
2408 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2409 # Capture the value of LINGUAS because we need it to compute CATALOGS.
2410 LINGUAS="${LINGUAS-%UNSET%}"
2414 dnl Postprocesses a Makefile in a directory containing PO files.
2415 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2417 # When this code is run, in config.status, two variables have already been
2419 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2420 # - LINGUAS is the value of the environment variable LINGUAS at configure
2424 # Adjust a relative srcdir.
2425 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2426 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2427 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2428 # In autoconf-2.13 it is called $ac_given_srcdir.
2429 # In autoconf-2.50 it is called $srcdir.
2430 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2431 case "$ac_given_srcdir" in
2432 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2433 /*) top_srcdir="$ac_given_srcdir" ;;
2434 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2437 # Find a way to echo strings without interpreting backslash.
2438 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2441 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2442 gt_echo='printf %s\n'
2453 # A sed script that extracts the value of VARIABLE from a Makefile.
2456 # Test if the hold space is empty.
2461 # Yes it was empty. Look if we have the expected variable definition.
2462 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
2463 # Seen the first line of the variable definition.
2464 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
2469 # Here we are processing a line from the variable definition.
2470 # Remove comment, more precisely replace it with a space.
2472 # See if the line ends in a backslash.
2476 # Print the line, without the trailing backslash.
2479 # There was no trailing backslash. The end of the variable definition is
2480 # reached. Clear the hold space.
2485 # A trailing backslash means that the variable definition continues in the
2486 # next line. Put a nonempty string into the hold space to indicate this.
2493 # Set POTFILES to the value of the Makefile variable POTFILES.
2494 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2495 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2496 # Compute POTFILES_DEPS as
2497 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2499 for file in $POTFILES; do
2500 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2504 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2505 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2507 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2508 # The LINGUAS file contains the set of available languages.
2509 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2510 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2512 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2513 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2514 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2516 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2517 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2519 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2520 # Compute UPDATEPOFILES
2521 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2522 # Compute DUMMYPOFILES
2523 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2525 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2526 # Compute PROPERTIESFILES
2527 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2528 # Compute CLASSFILES
2529 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2531 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2533 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2534 # Compute RESOURCESDLLFILES
2535 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2536 case "$ac_given_srcdir" in
2538 *) srcdirpre='$(srcdir)/' ;;
2549 for lang in $ALL_LINGUAS; do
2550 POFILES="$POFILES $srcdirpre$lang.po"
2551 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2552 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2553 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2554 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2555 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2556 QMFILES="$QMFILES $srcdirpre$lang.qm"
2557 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2558 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2559 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/'`
2560 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2562 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2563 # environment variable.
2565 if test -n "$ALL_LINGUAS"; then
2566 for presentlang in $ALL_LINGUAS; do
2568 if test "%UNSET%" != "$LINGUAS"; then
2569 desiredlanguages="$LINGUAS"
2571 desiredlanguages="$ALL_LINGUAS"
2573 for desiredlang in $desiredlanguages; do
2574 # Use the presentlang catalog if desiredlang is
2575 # a. equal to presentlang, or
2576 # b. a variant of presentlang (because in this case,
2577 # presentlang can be used as a fallback for messages
2578 # which are not translated in the desiredlang catalog).
2579 case "$desiredlang" in
2580 "$presentlang"*) useit=yes;;
2583 if test $useit = yes; then
2584 INST_LINGUAS="$INST_LINGUAS $presentlang"
2593 if test -n "$INST_LINGUAS"; then
2594 for lang in $INST_LINGUAS; do
2595 CATALOGS="$CATALOGS $lang.gmo"
2596 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2597 QTCATALOGS="$QTCATALOGS $lang.qm"
2598 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2599 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2600 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/'`
2601 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2605 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"
2607 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2608 # Add dependencies that cannot be formulated as a simple suffix rule.
2609 for lang in $ALL_LINGUAS; do
2610 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2611 cat >> "$ac_file.tmp" <<EOF
2612 $frobbedlang.msg: $lang.po
2613 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2614 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2618 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2619 # Add dependencies that cannot be formulated as a simple suffix rule.
2620 for lang in $ALL_LINGUAS; do
2621 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/'`
2622 cat >> "$ac_file.tmp" <<EOF
2623 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2624 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2625 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2629 if test -n "$POMAKEFILEDEPS"; then
2630 cat >> "$ac_file.tmp" <<EOF
2631 Makefile: $POMAKEFILEDEPS
2634 mv "$ac_file.tmp" "$ac_file"
2637 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2638 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2640 XGETTEXT_EXTRA_OPTIONS=
2643 dnl Registers an option to be passed to xgettext in the po subdirectory.
2644 AC_DEFUN([AM_XGETTEXT_OPTION],
2646 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2647 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2650 # progtest.m4 serial 7 (gettext-0.18.2)
2651 dnl Copyright (C) 1996-2003, 2005, 2008-2013 Free Software Foundation, Inc.
2652 dnl This file is free software; the Free Software Foundation
2653 dnl gives unlimited permission to copy and/or distribute it,
2654 dnl with or without modifications, as long as this notice is preserved.
2656 dnl This file can can be used in projects which are not available under
2657 dnl the GNU General Public License or the GNU Library General Public
2658 dnl License but which still want to provide support for the GNU gettext
2660 dnl Please note that the actual code of the GNU gettext library is covered
2661 dnl by the GNU Library General Public License, and the rest of the GNU
2662 dnl gettext package package is covered by the GNU General Public License.
2663 dnl They are *not* in the public domain.
2666 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2670 # Search path for a program which passes the given test.
2672 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2673 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2674 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2676 # Prepare PATH_SEPARATOR.
2677 # The user is always right.
2678 if test "${PATH_SEPARATOR+set}" != set; then
2679 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
2680 # contains only /bin. Note that ksh looks also at the FPATH variable,
2681 # so we have to set that as well for the test.
2683 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2684 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2685 || PATH_SEPARATOR=';'
2689 # Find out how to test for executable files. Don't use a zero-byte file,
2690 # as systems may use methods other than mode bits to determine executability.
2691 cat >conf$$.file <<_ASEOF
2695 chmod +x conf$$.file
2696 if test -x conf$$.file >/dev/null 2>&1; then
2697 ac_executable_p="test -x"
2699 ac_executable_p="test -f"
2703 # Extract the first word of "$2", so it can be a program name with args.
2704 set dummy $2; ac_word=[$]2
2705 AC_MSG_CHECKING([for $ac_word])
2706 AC_CACHE_VAL([ac_cv_path_$1],
2708 [[\\/]]* | ?:[[\\/]]*)
2709 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2712 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2713 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2715 test -z "$ac_dir" && ac_dir=.
2716 for ac_exec_ext in '' $ac_executable_extensions; do
2717 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2718 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2720 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2727 dnl If no 4th arg is given, leave the cache variable unset,
2728 dnl so AC_PATH_PROGS will keep looking.
2729 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2734 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2735 AC_MSG_RESULT([$][$1])
2742 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
2745 # This file is free software; the Free Software Foundation
2746 # gives unlimited permission to copy and/or distribute it,
2747 # with or without modifications, as long as this notice is preserved.
2751 # AM_AUTOMAKE_VERSION(VERSION)
2752 # ----------------------------
2753 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2754 # generated from the m4 files accompanying Automake X.Y.
2755 # (This private macro should not be called outside this file.)
2756 AC_DEFUN([AM_AUTOMAKE_VERSION],
2757 [am__api_version='1.11'
2758 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2759 dnl require some minimum version. Point them to the right macro.
2760 m4_if([$1], [1.11.6], [],
2761 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2764 # _AM_AUTOCONF_VERSION(VERSION)
2765 # -----------------------------
2766 # aclocal traces this macro to find the Autoconf version.
2767 # This is a private macro too. Using m4_define simplifies
2768 # the logic in aclocal, which can simply ignore this definition.
2769 m4_define([_AM_AUTOCONF_VERSION], [])
2771 # AM_SET_CURRENT_AUTOMAKE_VERSION
2772 # -------------------------------
2773 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2774 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2775 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2776 [AM_AUTOMAKE_VERSION([1.11.6])dnl
2777 m4_ifndef([AC_AUTOCONF_VERSION],
2778 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2779 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2781 # Copyright (C) 2011 Free Software Foundation, Inc.
2783 # This file is free software; the Free Software Foundation
2784 # gives unlimited permission to copy and/or distribute it,
2785 # with or without modifications, as long as this notice is preserved.
2789 # AM_PROG_AR([ACT-IF-FAIL])
2790 # -------------------------
2791 # Try to determine the archiver interface, and trigger the ar-lib wrapper
2792 # if it is needed. If the detection of archiver interface fails, run
2793 # ACT-IF-FAIL (default is to abort configure with a proper error message).
2794 AC_DEFUN([AM_PROG_AR],
2795 [AC_BEFORE([$0], [LT_INIT])dnl
2796 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
2797 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2798 AC_REQUIRE_AUX_FILE([ar-lib])dnl
2799 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
2802 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
2803 [am_cv_ar_interface=ar
2804 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
2805 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
2806 AC_TRY_EVAL([am_ar_try])
2807 if test "$ac_status" -eq 0; then
2808 am_cv_ar_interface=ar
2810 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
2811 AC_TRY_EVAL([am_ar_try])
2812 if test "$ac_status" -eq 0; then
2813 am_cv_ar_interface=lib
2815 am_cv_ar_interface=unknown
2818 rm -f conftest.lib libconftest.a
2822 case $am_cv_ar_interface in
2826 # Microsoft lib, so override with the ar-lib wrapper script.
2827 # FIXME: It is wrong to rewrite AR.
2828 # But if we don't then we get into trouble of one sort or another.
2829 # A longer-term fix would be to have automake use am__AR in this case,
2830 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
2832 AR="$am_aux_dir/ar-lib $AR"
2836 [AC_MSG_ERROR([could not determine $AR interface])])
2842 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
2844 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
2846 # This file is free software; the Free Software Foundation
2847 # gives unlimited permission to copy and/or distribute it,
2848 # with or without modifications, as long as this notice is preserved.
2852 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2853 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2854 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2856 # Of course, Automake must honor this variable whenever it calls a
2857 # tool from the auxiliary directory. The problem is that $srcdir (and
2858 # therefore $ac_aux_dir as well) can be either absolute or relative,
2859 # depending on how configure is run. This is pretty annoying, since
2860 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2861 # source directory, any form will work fine, but in subdirectories a
2862 # relative path needs to be adjusted first.
2864 # $ac_aux_dir/missing
2865 # fails when called from a subdirectory if $ac_aux_dir is relative
2866 # $top_srcdir/$ac_aux_dir/missing
2867 # fails if $ac_aux_dir is absolute,
2868 # fails when called from a subdirectory in a VPATH build with
2869 # a relative $ac_aux_dir
2871 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2872 # are both prefixed by $srcdir. In an in-source build this is usually
2873 # harmless because $srcdir is `.', but things will broke when you
2874 # start a VPATH build or use an absolute $srcdir.
2876 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2877 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2878 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2879 # and then we would define $MISSING as
2880 # MISSING="\${SHELL} $am_aux_dir/missing"
2881 # This will work as long as MISSING is not called from configure, because
2882 # unfortunately $(top_srcdir) has no meaning in configure.
2883 # However there are other variables, like CC, which are often used in
2884 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2886 # Another solution, used here, is to always expand $ac_aux_dir to an
2887 # absolute PATH. The drawback is that using absolute paths prevent a
2888 # configured tree to be moved without reconfiguration.
2890 AC_DEFUN([AM_AUX_DIR_EXPAND],
2891 [dnl Rely on autoconf to set up CDPATH properly.
2892 AC_PREREQ([2.50])dnl
2893 # expand $ac_aux_dir to an absolute path
2894 am_aux_dir=`cd $ac_aux_dir && pwd`
2897 # AM_CONDITIONAL -*- Autoconf -*-
2899 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
2900 # Free Software Foundation, Inc.
2902 # This file is free software; the Free Software Foundation
2903 # gives unlimited permission to copy and/or distribute it,
2904 # with or without modifications, as long as this notice is preserved.
2908 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2909 # -------------------------------------
2910 # Define a conditional.
2911 AC_DEFUN([AM_CONDITIONAL],
2913 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
2914 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2915 AC_SUBST([$1_TRUE])dnl
2916 AC_SUBST([$1_FALSE])dnl
2917 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
2918 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
2919 m4_define([_AM_COND_VALUE_$1], [$2])dnl
2927 AC_CONFIG_COMMANDS_PRE(
2928 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2929 AC_MSG_ERROR([[conditional "$1" was never defined.
2930 Usually this means the macro was only invoked conditionally.]])
2933 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
2934 # 2010, 2011 Free Software Foundation, Inc.
2936 # This file is free software; the Free Software Foundation
2937 # gives unlimited permission to copy and/or distribute it,
2938 # with or without modifications, as long as this notice is preserved.
2942 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2943 # written in clear, in which case automake, when reading aclocal.m4,
2944 # will think it sees a *use*, and therefore will trigger all it's
2945 # C support machinery. Also note that it means that autoscan, seeing
2946 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2949 # _AM_DEPENDENCIES(NAME)
2950 # ----------------------
2951 # See how the compiler implements dependency checking.
2952 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2953 # We try a few techniques and use that to set a single cache variable.
2955 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2956 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2957 # dependency, and given that the user is not expected to run this macro,
2958 # just rely on AC_PROG_CC.
2959 AC_DEFUN([_AM_DEPENDENCIES],
2960 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2961 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2962 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2963 AC_REQUIRE([AM_DEP_TRACK])dnl
2965 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2966 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2967 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2968 [$1], UPC, [depcc="$UPC" am_compiler_list=],
2969 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2970 [depcc="$$1" am_compiler_list=])
2972 AC_CACHE_CHECK([dependency style of $depcc],
2973 [am_cv_$1_dependencies_compiler_type],
2974 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2975 # We make a subdir and do the tests there. Otherwise we can end up
2976 # making bogus files that we don't know about and never remove. For
2977 # instance it was reported that on HP-UX the gcc test will end up
2978 # making a dummy file named `D' -- because `-MD' means `put the output
2982 # Copy depcomp to subdir because otherwise we won't find it if we're
2983 # using a relative directory.
2984 cp "$am_depcomp" conftest.dir
2986 # We will build objects and dependencies in a subdirectory because
2987 # it helps to detect inapplicable dependency modes. For instance
2988 # both Tru64's cc and ICC support -MD to output dependencies as a
2989 # side effect of compilation, but ICC will put the dependencies in
2990 # the current directory while Tru64 will put them in the object
2994 am_cv_$1_dependencies_compiler_type=none
2995 if test "$am_compiler_list" = ""; then
2996 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3000 [case " $depcc " in #(
3001 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3004 [case " $depcc " in #(
3005 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3008 for depmode in $am_compiler_list; do
3009 # Setup a source with many dependencies, because some compilers
3010 # like to wrap large dependency lists on column 80 (with \), and
3011 # we should not choose a depcomp mode which is confused by this.
3013 # We need to recreate these files for each test, as the compiler may
3014 # overwrite some of them when testing with obscure command lines.
3015 # This happens at least with the AIX C compiler.
3017 for i in 1 2 3 4 5 6; do
3018 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3019 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3020 # Solaris 8's {/usr,}/bin/sh.
3021 touch sub/conftst$i.h
3023 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3025 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3026 # mode. It turns out that the SunPro C++ compiler does not properly
3027 # handle `-M -o', and we need to detect this. Also, some Intel
3028 # versions had trouble with output in subdirs
3029 am__obj=sub/conftest.${OBJEXT-o}
3030 am__minus_obj="-o $am__obj"
3033 # This depmode causes a compiler race in universal mode.
3034 test "$am__universal" = false || continue
3037 # after this tag, mechanisms are not by side-effect, so they'll
3038 # only be used when explicitly requested
3039 if test "x$enable_dependency_tracking" = xyes; then
3045 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3046 # This compiler won't grok `-c -o', but also, the minuso test has
3047 # not run yet. These depmodes are late enough in the game, and
3048 # so weak that their functioning should not be impacted.
3049 am__obj=conftest.${OBJEXT-o}
3054 if depmode=$depmode \
3055 source=sub/conftest.c object=$am__obj \
3056 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3057 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3058 >/dev/null 2>conftest.err &&
3059 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3060 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3061 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3062 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3063 # icc doesn't choke on unknown options, it will just issue warnings
3064 # or remarks (even with -Werror). So we grep stderr for any message
3065 # that says an option was ignored or not supported.
3066 # When given -MP, icc 7.0 and 7.1 complain thusly:
3067 # icc: Command line warning: ignoring option '-M'; no argument required
3068 # The diagnosis changed in icc 8.0:
3069 # icc: Command line remark: option '-MP' not supported
3070 if (grep 'ignoring option' conftest.err ||
3071 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3072 am_cv_$1_dependencies_compiler_type=$depmode
3081 am_cv_$1_dependencies_compiler_type=none
3084 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3085 AM_CONDITIONAL([am__fastdep$1], [
3086 test "x$enable_dependency_tracking" != xno \
3087 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3093 # Choose a directory name for dependency files.
3094 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
3095 AC_DEFUN([AM_SET_DEPDIR],
3096 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3097 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3103 AC_DEFUN([AM_DEP_TRACK],
3104 [AC_ARG_ENABLE(dependency-tracking,
3105 [ --disable-dependency-tracking speeds up one-time build
3106 --enable-dependency-tracking do not reject slow dependency extractors])
3107 if test "x$enable_dependency_tracking" != xno; then
3108 am_depcomp="$ac_aux_dir/depcomp"
3112 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3113 AC_SUBST([AMDEPBACKSLASH])dnl
3114 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3115 AC_SUBST([am__nodep])dnl
3116 _AM_SUBST_NOTMAKE([am__nodep])dnl
3119 # Generate code to set up dependency tracking. -*- Autoconf -*-
3121 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3122 # Free Software Foundation, Inc.
3124 # This file is free software; the Free Software Foundation
3125 # gives unlimited permission to copy and/or distribute it,
3126 # with or without modifications, as long as this notice is preserved.
3130 # _AM_OUTPUT_DEPENDENCY_COMMANDS
3131 # ------------------------------
3132 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3134 # Autoconf 2.62 quotes --file arguments for eval, but not when files
3135 # are listed without --file. Let's play safe and only enable the eval
3136 # if we detect the quoting.
3137 case $CONFIG_FILES in
3138 *\'*) eval set x "$CONFIG_FILES" ;;
3139 *) set x $CONFIG_FILES ;;
3144 # Strip MF so we end up with the name of the file.
3145 mf=`echo "$mf" | sed -e 's/:.*$//'`
3146 # Check whether this is an Automake generated Makefile or not.
3147 # We used to match only the files named `Makefile.in', but
3148 # some people rename them; so instead we look at the file content.
3149 # Grep'ing the first line is not enough: some people post-process
3150 # each Makefile.in and add a new line on top of each file to say so.
3151 # Grep'ing the whole file is not good either: AIX grep has a line
3152 # limit of 2048, but all sed's we know have understand at least 4000.
3153 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3154 dirpart=`AS_DIRNAME("$mf")`
3158 # Extract the definition of DEPDIR, am__include, and am__quote
3159 # from the Makefile without running `make'.
3160 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3161 test -z "$DEPDIR" && continue
3162 am__include=`sed -n 's/^am__include = //p' < "$mf"`
3163 test -z "am__include" && continue
3164 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3165 # When using ansi2knr, U may be empty or an underscore; expand it
3166 U=`sed -n 's/^U = //p' < "$mf"`
3167 # Find all dependency output files, they are included files with
3168 # $(DEPDIR) in their names. We invoke sed twice because it is the
3169 # simplest approach to changing $(DEPDIR) to its actual value in the
3171 for file in `sed -n "
3172 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3173 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3174 # Make sure the directory exists.
3175 test -f "$dirpart/$file" && continue
3176 fdir=`AS_DIRNAME(["$file"])`
3177 AS_MKDIR_P([$dirpart/$fdir])
3178 # echo "creating $dirpart/$file"
3179 echo '# dummy' > "$dirpart/$file"
3183 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3186 # AM_OUTPUT_DEPENDENCY_COMMANDS
3187 # -----------------------------
3188 # This macro should only be invoked once -- use via AC_REQUIRE.
3190 # This code is only required when automatic dependency tracking
3191 # is enabled. FIXME. This creates each `.P' file that we will
3192 # need in order to bootstrap the dependency handling code.
3193 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3194 [AC_CONFIG_COMMANDS([depfiles],
3195 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3196 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3199 # Do all the work for Automake. -*- Autoconf -*-
3201 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3202 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
3204 # This file is free software; the Free Software Foundation
3205 # gives unlimited permission to copy and/or distribute it,
3206 # with or without modifications, as long as this notice is preserved.
3210 # This macro actually does too much. Some checks are only needed if
3211 # your package does certain things. But this isn't really a big deal.
3213 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3214 # AM_INIT_AUTOMAKE([OPTIONS])
3215 # -----------------------------------------------
3216 # The call with PACKAGE and VERSION arguments is the old style
3217 # call (pre autoconf-2.50), which is being phased out. PACKAGE
3218 # and VERSION should now be passed to AC_INIT and removed from
3219 # the call to AM_INIT_AUTOMAKE.
3220 # We support both call styles for the transition. After
3221 # the next Automake release, Autoconf can make the AC_INIT
3222 # arguments mandatory, and then we can depend on a new Autoconf
3223 # release and drop the old call support.
3224 AC_DEFUN([AM_INIT_AUTOMAKE],
3225 [AC_PREREQ([2.62])dnl
3226 dnl Autoconf wants to disallow AM_ names. We explicitly allow
3227 dnl the ones we care about.
3228 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3229 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3230 AC_REQUIRE([AC_PROG_INSTALL])dnl
3231 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3232 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3233 # is not polluted with repeated "-I."
3234 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3235 # test to see if srcdir already configured
3236 if test -f $srcdir/config.status; then
3237 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3241 # test whether we have cygpath
3242 if test -z "$CYGPATH_W"; then
3243 if (cygpath --version) >/dev/null 2>/dev/null; then
3244 CYGPATH_W='cygpath -w'
3249 AC_SUBST([CYGPATH_W])
3251 # Define the identity of the package.
3252 dnl Distinguish between old-style and new-style calls.
3254 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3255 AC_SUBST([PACKAGE], [$1])dnl
3256 AC_SUBST([VERSION], [$2])],
3257 [_AM_SET_OPTIONS([$1])dnl
3258 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3259 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
3260 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3261 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3262 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3264 _AM_IF_OPTION([no-define],,
3265 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
3266 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
3268 # Some tools Automake needs.
3269 AC_REQUIRE([AM_SANITY_CHECK])dnl
3270 AC_REQUIRE([AC_ARG_PROGRAM])dnl
3271 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
3272 AM_MISSING_PROG(AUTOCONF, autoconf)
3273 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
3274 AM_MISSING_PROG(AUTOHEADER, autoheader)
3275 AM_MISSING_PROG(MAKEINFO, makeinfo)
3276 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3277 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3278 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
3279 # We need awk for the "check" target. The system "awk" is bad on
3281 AC_REQUIRE([AC_PROG_AWK])dnl
3282 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3283 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3284 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3285 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3286 [_AM_PROG_TAR([v7])])])
3287 _AM_IF_OPTION([no-dependencies],,
3288 [AC_PROVIDE_IFELSE([AC_PROG_CC],
3289 [_AM_DEPENDENCIES(CC)],
3290 [define([AC_PROG_CC],
3291 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
3292 AC_PROVIDE_IFELSE([AC_PROG_CXX],
3293 [_AM_DEPENDENCIES(CXX)],
3294 [define([AC_PROG_CXX],
3295 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
3296 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3297 [_AM_DEPENDENCIES(OBJC)],
3298 [define([AC_PROG_OBJC],
3299 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
3301 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
3302 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
3303 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
3304 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
3305 AC_CONFIG_COMMANDS_PRE(dnl
3306 [m4_provide_if([_AM_COMPILER_EXEEXT],
3307 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3310 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
3311 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3312 dnl mangled by Autoconf and run in a shell conditional statement.
3313 m4_define([_AC_COMPILER_EXEEXT],
3314 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3317 # When config.status generates a header, we must update the stamp-h file.
3318 # This file resides in the same directory as the config header
3319 # that is generated. The stamp files are numbered to have different names.
3321 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3322 # loop where config.status creates the headers, so we can generate
3323 # our stamp files there.
3324 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3325 [# Compute $1's index in $config_headers.
3328 for _am_header in $config_headers :; do
3330 $_am_arg | $_am_arg:* )
3333 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3336 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3338 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
3341 # This file is free software; the Free Software Foundation
3342 # gives unlimited permission to copy and/or distribute it,
3343 # with or without modifications, as long as this notice is preserved.
3347 # AM_PROG_INSTALL_SH
3348 # ------------------
3349 # Define $install_sh.
3350 AC_DEFUN([AM_PROG_INSTALL_SH],
3351 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3352 if test x"${install_sh}" != xset; then
3355 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3357 install_sh="\${SHELL} $am_aux_dir/install-sh"
3360 AC_SUBST(install_sh)])
3362 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
3364 # This file is free software; the Free Software Foundation
3365 # gives unlimited permission to copy and/or distribute it,
3366 # with or without modifications, as long as this notice is preserved.
3370 # Check whether the underlying file-system supports filenames
3371 # with a leading dot. For instance MS-DOS doesn't.
3372 AC_DEFUN([AM_SET_LEADING_DOT],
3373 [rm -rf .tst 2>/dev/null
3374 mkdir .tst 2>/dev/null
3375 if test -d .tst; then
3380 rmdir .tst 2>/dev/null
3381 AC_SUBST([am__leading_dot])])
3383 # Check to see how 'make' treats includes. -*- Autoconf -*-
3385 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
3387 # This file is free software; the Free Software Foundation
3388 # gives unlimited permission to copy and/or distribute it,
3389 # with or without modifications, as long as this notice is preserved.
3395 # Check to see how make treats includes.
3396 AC_DEFUN([AM_MAKE_INCLUDE],
3397 [am_make=${MAKE-make}
3398 cat > confinc << 'END'
3400 @echo this is the am__doit target
3403 # If we don't find an include directive, just comment out the code.
3404 AC_MSG_CHECKING([for style of include used by $am_make])
3408 # First try GNU make style include.
3409 echo "include confinc" > confmf
3410 # Ignore all kinds of additional output from `make'.
3411 case `$am_make -s -f confmf 2> /dev/null` in #(
3412 *the\ am__doit\ target*)
3418 # Now try BSD make style include.
3419 if test "$am__include" = "#"; then
3420 echo '.include "confinc"' > confmf
3421 case `$am_make -s -f confmf 2> /dev/null` in #(
3422 *the\ am__doit\ target*)
3423 am__include=.include
3429 AC_SUBST([am__include])
3430 AC_SUBST([am__quote])
3431 AC_MSG_RESULT([$_am_result])
3432 rm -f confinc confmf
3435 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
3436 # Free Software Foundation, Inc.
3438 # This file is free software; the Free Software Foundation
3439 # gives unlimited permission to copy and/or distribute it,
3440 # with or without modifications, as long as this notice is preserved.
3446 # Like AC_PROG_CC_C_O, but changed for automake.
3447 AC_DEFUN([AM_PROG_CC_C_O],
3448 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
3449 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3450 AC_REQUIRE_AUX_FILE([compile])dnl
3451 # FIXME: we rely on the cache variable name because
3452 # there is no other way.
3454 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
3455 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
3456 if test "$am_t" != yes; then
3457 # Losing compiler, so override with the script.
3458 # FIXME: It is wrong to rewrite CC.
3459 # But if we don't then we get into trouble of one sort or another.
3460 # A longer-term fix would be to have automake use am__CC in this case,
3461 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3462 CC="$am_aux_dir/compile $CC"
3464 dnl Make sure AC_PROG_CC is never called again, or it will override our
3466 m4_define([AC_PROG_CC],
3467 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
3470 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3472 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
3473 # Free Software Foundation, Inc.
3475 # This file is free software; the Free Software Foundation
3476 # gives unlimited permission to copy and/or distribute it,
3477 # with or without modifications, as long as this notice is preserved.
3481 # AM_MISSING_PROG(NAME, PROGRAM)
3482 # ------------------------------
3483 AC_DEFUN([AM_MISSING_PROG],
3484 [AC_REQUIRE([AM_MISSING_HAS_RUN])
3485 $1=${$1-"${am_missing_run}$2"}
3489 # AM_MISSING_HAS_RUN
3490 # ------------------
3491 # Define MISSING if not defined so far and test if it supports --run.
3492 # If it does, set am_missing_run to use it, otherwise, to nothing.
3493 AC_DEFUN([AM_MISSING_HAS_RUN],
3494 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3495 AC_REQUIRE_AUX_FILE([missing])dnl
3496 if test x"${MISSING+set}" != xset; then
3499 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3501 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3504 # Use eval to expand $SHELL
3505 if eval "$MISSING --run true"; then
3506 am_missing_run="$MISSING --run "
3509 AC_MSG_WARN([`missing' script is too old or missing])
3513 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
3516 # This file is free software; the Free Software Foundation
3517 # gives unlimited permission to copy and/or distribute it,
3518 # with or without modifications, as long as this notice is preserved.
3524 # Check for `mkdir -p'.
3525 AC_DEFUN([AM_PROG_MKDIR_P],
3526 [AC_PREREQ([2.60])dnl
3527 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3528 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
3529 dnl while keeping a definition of mkdir_p for backward compatibility.
3530 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
3531 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
3532 dnl Makefile.ins that do not define MKDIR_P, so we do our own
3533 dnl adjustment using top_builddir (which is defined more often than
3535 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
3537 [[\\/$]]* | ?:[[\\/]]*) ;;
3538 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3542 # Helper functions for option handling. -*- Autoconf -*-
3544 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
3547 # This file is free software; the Free Software Foundation
3548 # gives unlimited permission to copy and/or distribute it,
3549 # with or without modifications, as long as this notice is preserved.
3553 # _AM_MANGLE_OPTION(NAME)
3554 # -----------------------
3555 AC_DEFUN([_AM_MANGLE_OPTION],
3556 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3558 # _AM_SET_OPTION(NAME)
3559 # --------------------
3560 # Set option NAME. Presently that only means defining a flag for this option.
3561 AC_DEFUN([_AM_SET_OPTION],
3562 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
3564 # _AM_SET_OPTIONS(OPTIONS)
3565 # ------------------------
3566 # OPTIONS is a space-separated list of Automake options.
3567 AC_DEFUN([_AM_SET_OPTIONS],
3568 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3570 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3571 # -------------------------------------------
3572 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3573 AC_DEFUN([_AM_IF_OPTION],
3574 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3576 # Check to make sure that the build environment is sane. -*- Autoconf -*-
3578 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
3579 # Free Software Foundation, Inc.
3581 # This file is free software; the Free Software Foundation
3582 # gives unlimited permission to copy and/or distribute it,
3583 # with or without modifications, as long as this notice is preserved.
3589 AC_DEFUN([AM_SANITY_CHECK],
3590 [AC_MSG_CHECKING([whether build environment is sane])
3593 echo timestamp > conftest.file
3594 # Reject unsafe characters in $srcdir or the absolute working directory
3595 # name. Accept space and tab only in the latter.
3599 *[[\\\"\#\$\&\'\`$am_lf]]*)
3600 AC_MSG_ERROR([unsafe absolute working directory name]);;
3603 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
3604 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
3607 # Do `set' in a subshell so we don't clobber the current shell's
3608 # arguments. Must try -L first in case configure is actually a
3609 # symlink; some systems play weird games with the mod time of symlinks
3610 # (eg FreeBSD returns the mod time of the symlink's containing
3613 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3614 if test "$[*]" = "X"; then
3616 set X `ls -t "$srcdir/configure" conftest.file`
3619 if test "$[*]" != "X $srcdir/configure conftest.file" \
3620 && test "$[*]" != "X conftest.file $srcdir/configure"; then
3622 # If neither matched, then we have a broken ls. This can happen
3623 # if, for instance, CONFIG_SHELL is bash and it inherits a
3624 # broken ls alias from the environment. This has actually
3625 # happened. Such a system could not be considered "sane".
3626 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
3627 alias in your environment])
3630 test "$[2]" = conftest.file
3636 AC_MSG_ERROR([newly created file is older than distributed files!
3637 Check your system clock])
3639 AC_MSG_RESULT(yes)])
3641 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
3643 # This file is free software; the Free Software Foundation
3644 # gives unlimited permission to copy and/or distribute it,
3645 # with or without modifications, as long as this notice is preserved.
3649 # AM_PROG_INSTALL_STRIP
3650 # ---------------------
3651 # One issue with vendor `install' (even GNU) is that you can't
3652 # specify the program used to strip binaries. This is especially
3653 # annoying in cross-compiling environments, where the build's strip
3654 # is unlikely to handle the host's binaries.
3655 # Fortunately install-sh will honor a STRIPPROG variable, so we
3656 # always use install-sh in `make install-strip', and initialize
3657 # STRIPPROG with the value of the STRIP variable (set by the user).
3658 AC_DEFUN([AM_PROG_INSTALL_STRIP],
3659 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3660 # Installed binaries are usually stripped using `strip' when the user
3661 # run `make install-strip'. However `strip' might not be the right
3662 # tool to use in cross-compilation environments, therefore Automake
3663 # will honor the `STRIP' environment variable to overrule this program.
3664 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
3665 if test "$cross_compiling" != no; then
3666 AC_CHECK_TOOL([STRIP], [strip], :)
3668 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3669 AC_SUBST([INSTALL_STRIP_PROGRAM])])
3671 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
3673 # This file is free software; the Free Software Foundation
3674 # gives unlimited permission to copy and/or distribute it,
3675 # with or without modifications, as long as this notice is preserved.
3679 # _AM_SUBST_NOTMAKE(VARIABLE)
3680 # ---------------------------
3681 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
3682 # This macro is traced by Automake.
3683 AC_DEFUN([_AM_SUBST_NOTMAKE])
3685 # AM_SUBST_NOTMAKE(VARIABLE)
3686 # --------------------------
3687 # Public sister of _AM_SUBST_NOTMAKE.
3688 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
3690 # Check how to create a tarball. -*- Autoconf -*-
3692 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
3694 # This file is free software; the Free Software Foundation
3695 # gives unlimited permission to copy and/or distribute it,
3696 # with or without modifications, as long as this notice is preserved.
3700 # _AM_PROG_TAR(FORMAT)
3701 # --------------------
3702 # Check how to create a tarball in format FORMAT.
3703 # FORMAT should be one of `v7', `ustar', or `pax'.
3705 # Substitute a variable $(am__tar) that is a command
3706 # writing to stdout a FORMAT-tarball containing the directory
3708 # tardir=directory && $(am__tar) > result.tar
3710 # Substitute a variable $(am__untar) that extract such
3711 # a tarball read from stdin.
3712 # $(am__untar) < result.tar
3713 AC_DEFUN([_AM_PROG_TAR],
3714 [# Always define AMTAR for backward compatibility. Yes, it's still used
3715 # in the wild :-( We should find a proper way to deprecate it ...
3716 AC_SUBST([AMTAR], ['$${TAR-tar}'])
3718 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
3719 [m4_case([$1], [ustar],, [pax],,
3720 [m4_fatal([Unknown tar format])])
3721 AC_MSG_CHECKING([how to create a $1 tar archive])
3722 # Loop over all known methods to create a tar archive until one works.
3723 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
3724 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
3725 # Do not fold the above two line into one, because Tru64 sh and
3726 # Solaris sh will not grok spaces in the rhs of `-'.
3727 for _am_tool in $_am_tools
3731 for _am_tar in tar gnutar gtar;
3733 AM_RUN_LOG([$_am_tar --version]) && break
3735 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
3736 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
3737 am__untar="$_am_tar -xf -"
3740 # Must skip GNU tar: if it does not support --format= it doesn't create
3741 # ustar tarball either.
3742 (tar --version) >/dev/null 2>&1 && continue
3743 am__tar='tar chf - "$$tardir"'
3744 am__tar_='tar chf - "$tardir"'
3745 am__untar='tar xf -'
3748 am__tar='pax -L -x $1 -w "$$tardir"'
3749 am__tar_='pax -L -x $1 -w "$tardir"'
3753 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3754 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3755 am__untar='cpio -i -H $1 -d'
3764 # If the value was cached, stop now. We just wanted to have am__tar
3765 # and am__untar set.
3766 test -n "${am_cv_prog_tar_$1}" && break
3768 # tar/untar a dummy directory, and stop if the command works
3771 echo GrepMe > conftest.dir/file
3772 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
3774 if test -s conftest.tar; then
3775 AM_RUN_LOG([$am__untar <conftest.tar])
3776 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3781 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
3782 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
3784 AC_SUBST([am__untar])