1 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23 # gettext.m4 serial 66 (gettext-0.18.2)
24 dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
25 dnl This file is free software; the Free Software Foundation
26 dnl gives unlimited permission to copy and/or distribute it,
27 dnl with or without modifications, as long as this notice is preserved.
29 dnl This file can can be used in projects which are not available under
30 dnl the GNU General Public License or the GNU Library General Public
31 dnl License but which still want to provide support for the GNU gettext
33 dnl Please note that the actual code of the GNU gettext library is covered
34 dnl by the GNU Library General Public License, and the rest of the GNU
35 dnl gettext package package is covered by the GNU General Public License.
36 dnl They are *not* in the public domain.
39 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
40 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
42 dnl Macro to add for using GNU gettext.
44 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
45 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
46 dnl default (if it is not specified or empty) is 'no-libtool'.
47 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
48 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
49 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
50 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
51 dnl depending on --{enable,disable}-{shared,static} and on the presence of
52 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
53 dnl $(top_builddir)/intl/libintl.a will be created.
54 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
55 dnl implementations (in libc or libintl) without the ngettext() function
56 dnl will be ignored. If NEEDSYMBOL is specified and is
57 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
58 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
59 dnl INTLDIR is used to find the intl libraries. If empty,
60 dnl the value '$(top_builddir)/intl/' is used.
62 dnl The result of the configuration is one of three cases:
63 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
65 dnl Catalog format: GNU --> install in $(datadir)
66 dnl Catalog extension: .mo after installation, .gmo in source tree
67 dnl 2) GNU gettext has been found in the system's C library.
68 dnl Catalog format: GNU --> install in $(datadir)
69 dnl Catalog extension: .mo after installation, .gmo in source tree
70 dnl 3) No internationalization, always use English msgid.
71 dnl Catalog format: none
72 dnl Catalog extension: none
73 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
74 dnl The use of .gmo is historical (it was needed to avoid overwriting the
75 dnl GNU format catalogs when building on a platform with an X/Open gettext),
76 dnl but we keep it in order not to force irrelevant filename changes on the
79 AC_DEFUN([AM_GNU_GETTEXT],
81 dnl Argument checking.
82 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
83 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
85 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
86 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
87 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
88 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
90 define([gt_included_intl],
91 ifelse([$1], [external],
92 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
94 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
96 AM_GNU_GETTEXT_NEED([$2])
98 AC_REQUIRE([AM_PO_SUBDIRS])dnl
99 ifelse(gt_included_intl, yes, [
100 AC_REQUIRE([AM_INTL_SUBDIR])dnl
103 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
104 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
105 AC_REQUIRE([AC_LIB_RPATH])
107 dnl Sometimes libintl requires libiconv, so first search for libiconv.
108 dnl Ideally we would do this search only after the
109 dnl if test "$USE_NLS" = "yes"; then
110 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
111 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
112 dnl the configure script would need to contain the same shell code
113 dnl again, outside any 'if'. There are two solutions:
114 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
115 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
116 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
117 dnl documented, we avoid it.
118 ifelse(gt_included_intl, yes, , [
119 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
122 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
128 ifelse(gt_included_intl, yes, [
129 BUILD_INCLUDED_LIBINTL=no
130 USE_INCLUDED_LIBINTL=no
136 dnl Add a version number to the cache macros.
137 case " $gt_needs " in
138 *" need-formatstring-macros "*) gt_api_version=3 ;;
139 *" need-ngettext "*) gt_api_version=2 ;;
140 *) gt_api_version=1 ;;
142 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
143 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
145 dnl If we use NLS figure out what method
146 if test "$USE_NLS" = "yes"; then
147 gt_use_preinstalled_gnugettext=no
148 ifelse(gt_included_intl, yes, [
149 AC_MSG_CHECKING([whether included gettext is requested])
150 AC_ARG_WITH([included-gettext],
151 [ --with-included-gettext use the GNU gettext library included here],
152 nls_cv_force_use_gnu_gettext=$withval,
153 nls_cv_force_use_gnu_gettext=no)
154 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
156 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
157 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
159 dnl User does not insist on using GNU NLS library. Figure out what
160 dnl to use. If GNU gettext is available we use this. Else we have
161 dnl to fall back to GNU NLS library.
163 if test $gt_api_version -ge 3; then
164 gt_revision_test_code='
165 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
166 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
169 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
173 gt_revision_test_code=
175 if test $gt_api_version -ge 2; then
176 gt_expression_test_code=' + * ngettext ("", "", 0)'
178 gt_expression_test_code=
181 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
186 $gt_revision_test_code
187 extern int _nl_msg_cat_cntr;
188 extern int *_nl_domain_bindings;
191 bindtextdomain ("", "");
192 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
194 [eval "$gt_func_gnugettext_libc=yes"],
195 [eval "$gt_func_gnugettext_libc=no"])])
197 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
198 dnl Sometimes libintl requires libiconv, so first search for libiconv.
199 ifelse(gt_included_intl, yes, , [
202 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
203 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
204 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
205 dnl even if libiconv doesn't exist.
206 AC_LIB_LINKFLAGS_BODY([intl])
207 AC_CACHE_CHECK([for GNU gettext in libintl],
208 [$gt_func_gnugettext_libintl],
209 [gt_save_CPPFLAGS="$CPPFLAGS"
210 CPPFLAGS="$CPPFLAGS $INCINTL"
212 LIBS="$LIBS $LIBINTL"
213 dnl Now see whether libintl exists and does not depend on libiconv.
218 $gt_revision_test_code
219 extern int _nl_msg_cat_cntr;
224 const char *_nl_expand_alias (const char *);
227 bindtextdomain ("", "");
228 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
230 [eval "$gt_func_gnugettext_libintl=yes"],
231 [eval "$gt_func_gnugettext_libintl=no"])
232 dnl Now see whether libintl exists and depends on libiconv.
233 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
234 LIBS="$LIBS $LIBICONV"
239 $gt_revision_test_code
240 extern int _nl_msg_cat_cntr;
245 const char *_nl_expand_alias (const char *);
248 bindtextdomain ("", "");
249 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
251 [LIBINTL="$LIBINTL $LIBICONV"
252 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
253 eval "$gt_func_gnugettext_libintl=yes"
256 CPPFLAGS="$gt_save_CPPFLAGS"
257 LIBS="$gt_save_LIBS"])
260 dnl If an already present or preinstalled GNU gettext() is found,
261 dnl use it. But if this macro is used in GNU gettext, and GNU
262 dnl gettext is already preinstalled in libintl, we update this
263 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
264 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
265 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
266 && test "$PACKAGE" != gettext-runtime \
267 && test "$PACKAGE" != gettext-tools; }; then
268 gt_use_preinstalled_gnugettext=yes
270 dnl Reset the values set by searching for libintl.
276 ifelse(gt_included_intl, yes, [
277 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
278 dnl GNU gettext is not found in the C library.
279 dnl Fall back on included GNU gettext library.
280 nls_cv_use_gnu_gettext=yes
284 if test "$nls_cv_use_gnu_gettext" = "yes"; then
285 dnl Mark actions used to generate GNU NLS library.
286 BUILD_INCLUDED_LIBINTL=yes
287 USE_INCLUDED_LIBINTL=yes
288 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
289 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
290 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
294 if test "$gt_use_preinstalled_gnugettext" = "yes" \
295 || test "$nls_cv_use_gnu_gettext" = "yes"; then
296 dnl Mark actions to use GNU gettext tools.
301 if test -n "$INTL_MACOSX_LIBS"; then
302 if test "$gt_use_preinstalled_gnugettext" = "yes" \
303 || test "$nls_cv_use_gnu_gettext" = "yes"; then
304 dnl Some extra flags are needed during linking.
305 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
306 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
310 if test "$gt_use_preinstalled_gnugettext" = "yes" \
311 || test "$nls_cv_use_gnu_gettext" = "yes"; then
312 AC_DEFINE([ENABLE_NLS], [1],
313 [Define to 1 if translation of program messages to the user's native language
320 AC_MSG_CHECKING([whether to use NLS])
321 AC_MSG_RESULT([$USE_NLS])
322 if test "$USE_NLS" = "yes"; then
323 AC_MSG_CHECKING([where the gettext function comes from])
324 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
325 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
326 gt_source="external libintl"
331 gt_source="included intl directory"
333 AC_MSG_RESULT([$gt_source])
336 if test "$USE_NLS" = "yes"; then
338 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
339 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
340 AC_MSG_CHECKING([how to link with libintl])
341 AC_MSG_RESULT([$LIBINTL])
342 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
345 dnl For backward compatibility. Some packages may be using this.
346 AC_DEFINE([HAVE_GETTEXT], [1],
347 [Define if the GNU gettext() function is already present or preinstalled.])
348 AC_DEFINE([HAVE_DCGETTEXT], [1],
349 [Define if the GNU dcgettext() function is already present or preinstalled.])
352 dnl We need to process the po/ directory.
356 ifelse(gt_included_intl, yes, [
357 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
358 dnl to 'yes' because some of the testsuite requires it.
359 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
360 BUILD_INCLUDED_LIBINTL=yes
363 dnl Make all variables we use known to autoconf.
364 AC_SUBST([BUILD_INCLUDED_LIBINTL])
365 AC_SUBST([USE_INCLUDED_LIBINTL])
366 AC_SUBST([CATOBJEXT])
368 dnl For backward compatibility. Some configure.ins may be using this.
372 dnl For backward compatibility. Some Makefiles may be using this.
374 AC_SUBST([DATADIRNAME])
376 dnl For backward compatibility. Some Makefiles may be using this.
378 AC_SUBST([INSTOBJEXT])
380 dnl For backward compatibility. Some Makefiles may be using this.
384 dnl For backward compatibility. Some Makefiles may be using this.
386 if test "$USE_INCLUDED_LIBINTL" = yes; then
387 INTLOBJS="\$(GETTOBJS)"
391 dnl Enable libtool support if the surrounding package wishes it.
392 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
393 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
396 dnl For backward compatibility. Some Makefiles may be using this.
400 dnl Make all documented variables known to autoconf.
402 AC_SUBST([LTLIBINTL])
407 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
408 m4_define([gt_NEEDS_INIT],
410 m4_divert_text([DEFAULTS], [gt_needs=])
411 m4_define([gt_NEEDS_INIT], [])
415 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
416 AC_DEFUN([AM_GNU_GETTEXT_NEED],
418 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
422 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
423 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
425 # iconv.m4 serial 18 (gettext-0.18.2)
426 dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc.
427 dnl This file is free software; the Free Software Foundation
428 dnl gives unlimited permission to copy and/or distribute it,
429 dnl with or without modifications, as long as this notice is preserved.
431 dnl From Bruno Haible.
433 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
435 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
436 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
437 AC_REQUIRE([AC_LIB_RPATH])
439 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
441 AC_LIB_LINKFLAGS_BODY([iconv])
444 AC_DEFUN([AM_ICONV_LINK],
446 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
447 dnl those with the standalone portable GNU libiconv installed).
448 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
450 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
452 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
454 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
455 dnl because if the user has installed libiconv and not disabled its use
456 dnl via --without-libiconv-prefix, he wants to use it. The first
457 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
458 am_save_CPPFLAGS="$CPPFLAGS"
459 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
461 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
462 am_cv_func_iconv="no, consider installing GNU libiconv"
470 [[iconv_t cd = iconv_open("","");
471 iconv(cd,NULL,NULL,NULL,NULL);
472 iconv_close(cd);]])],
473 [am_cv_func_iconv=yes])
474 if test "$am_cv_func_iconv" != yes; then
476 LIBS="$LIBS $LIBICONV"
483 [[iconv_t cd = iconv_open("","");
484 iconv(cd,NULL,NULL,NULL,NULL);
485 iconv_close(cd);]])],
486 [am_cv_lib_iconv=yes]
487 [am_cv_func_iconv=yes])
491 if test "$am_cv_func_iconv" = yes; then
492 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
493 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
496 if test $am_cv_lib_iconv = yes; then
497 LIBS="$LIBS $LIBICONV"
506 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
509 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
510 if (cd_utf8_to_88591 != (iconv_t)(-1))
512 static const char input[] = "\342\202\254"; /* EURO SIGN */
514 const char *inptr = input;
515 size_t inbytesleft = strlen (input);
517 size_t outbytesleft = sizeof (buf);
518 size_t res = iconv (cd_utf8_to_88591,
519 (char **) &inptr, &inbytesleft,
520 &outptr, &outbytesleft);
523 iconv_close (cd_utf8_to_88591);
526 /* Test against Solaris 10 bug: Failures are not distinguishable from
527 successful returns. */
529 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
530 if (cd_ascii_to_88591 != (iconv_t)(-1))
532 static const char input[] = "\263";
534 const char *inptr = input;
535 size_t inbytesleft = strlen (input);
537 size_t outbytesleft = sizeof (buf);
538 size_t res = iconv (cd_ascii_to_88591,
539 (char **) &inptr, &inbytesleft,
540 &outptr, &outbytesleft);
543 iconv_close (cd_ascii_to_88591);
546 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
548 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
549 if (cd_88591_to_utf8 != (iconv_t)(-1))
551 static const char input[] = "\304";
552 static char buf[2] = { (char)0xDE, (char)0xAD };
553 const char *inptr = input;
554 size_t inbytesleft = 1;
556 size_t outbytesleft = 1;
557 size_t res = iconv (cd_88591_to_utf8,
558 (char **) &inptr, &inbytesleft,
559 &outptr, &outbytesleft);
560 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
562 iconv_close (cd_88591_to_utf8);
565 #if 0 /* This bug could be worked around by the caller. */
566 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
568 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
569 if (cd_88591_to_utf8 != (iconv_t)(-1))
571 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
573 const char *inptr = input;
574 size_t inbytesleft = strlen (input);
576 size_t outbytesleft = sizeof (buf);
577 size_t res = iconv (cd_88591_to_utf8,
578 (char **) &inptr, &inbytesleft,
579 &outptr, &outbytesleft);
582 iconv_close (cd_88591_to_utf8);
586 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
588 if (/* Try standardized names. */
589 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
590 /* Try IRIX, OSF/1 names. */
591 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
593 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
594 /* Try HP-UX names. */
595 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
599 [am_cv_func_iconv_works=yes],
600 [am_cv_func_iconv_works=no],
604 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
605 *) am_cv_func_iconv_works="guessing yes" ;;
611 case "$am_cv_func_iconv_works" in
612 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
613 *) am_func_iconv=yes ;;
616 am_func_iconv=no am_cv_lib_iconv=no
618 if test "$am_func_iconv" = yes; then
619 AC_DEFINE([HAVE_ICONV], [1],
620 [Define if you have the iconv() function and it works.])
622 if test "$am_cv_lib_iconv" = yes; then
623 AC_MSG_CHECKING([how to link with libiconv])
624 AC_MSG_RESULT([$LIBICONV])
626 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
628 CPPFLAGS="$am_save_CPPFLAGS"
633 AC_SUBST([LTLIBICONV])
636 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
637 dnl avoid warnings like
638 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
639 dnl This is tricky because of the way 'aclocal' is implemented:
640 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
641 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
642 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
643 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
645 m4_define([gl_iconv_AC_DEFUN],
646 m4_version_prereq([2.64],
649 [m4_ifdef([gl_00GNULIB],
654 gl_iconv_AC_DEFUN([AM_ICONV],
657 if test "$am_cv_func_iconv" = yes; then
658 AC_MSG_CHECKING([for iconv declaration])
659 AC_CACHE_VAL([am_cv_proto_iconv], [
669 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
670 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
676 [am_cv_proto_iconv_arg1=""],
677 [am_cv_proto_iconv_arg1="const"])
678 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);"])
679 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
682 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
683 [Define as const if the declaration of iconv() needs const.])
684 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
685 m4_ifdef([gl_ICONV_H_DEFAULTS],
686 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
687 if test -n "$am_cv_proto_iconv_arg1"; then
694 # intlmacosx.m4 serial 5 (gettext-0.18.2)
695 dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
696 dnl This file is free software; the Free Software Foundation
697 dnl gives unlimited permission to copy and/or distribute it,
698 dnl with or without modifications, as long as this notice is preserved.
700 dnl This file can can be used in projects which are not available under
701 dnl the GNU General Public License or the GNU Library General Public
702 dnl License but which still want to provide support for the GNU gettext
704 dnl Please note that the actual code of the GNU gettext library is covered
705 dnl by the GNU Library General Public License, and the rest of the GNU
706 dnl gettext package package is covered by the GNU General Public License.
707 dnl They are *not* in the public domain.
709 dnl Checks for special options needed on Mac OS X.
710 dnl Defines INTL_MACOSX_LIBS.
711 AC_DEFUN([gt_INTL_MACOSX],
713 dnl Check for API introduced in Mac OS X 10.2.
714 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
715 [gt_cv_func_CFPreferencesCopyAppValue],
716 [gt_save_LIBS="$LIBS"
717 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
720 [[#include <CoreFoundation/CFPreferences.h>]],
721 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
722 [gt_cv_func_CFPreferencesCopyAppValue=yes],
723 [gt_cv_func_CFPreferencesCopyAppValue=no])
724 LIBS="$gt_save_LIBS"])
725 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
726 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
727 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
729 dnl Check for API introduced in Mac OS X 10.3.
730 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
731 [gt_save_LIBS="$LIBS"
732 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
735 [[#include <CoreFoundation/CFLocale.h>]],
736 [[CFLocaleCopyCurrent();]])],
737 [gt_cv_func_CFLocaleCopyCurrent=yes],
738 [gt_cv_func_CFLocaleCopyCurrent=no])
739 LIBS="$gt_save_LIBS"])
740 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
741 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
742 [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
745 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
746 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
748 AC_SUBST([INTL_MACOSX_LIBS])
752 dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc.
753 dnl This file is free software; the Free Software Foundation
754 dnl gives unlimited permission to copy and/or distribute it,
755 dnl with or without modifications, as long as this notice is preserved.
757 dnl Subroutines of libtool.m4,
758 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
759 dnl collision with libtool.m4.
761 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
762 AC_DEFUN([AC_LIB_PROG_LD_GNU],
763 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
764 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
765 case `$LD -v 2>&1 </dev/null` in
766 *GNU* | *'with BFD'*)
767 acl_cv_prog_gnu_ld=yes
770 acl_cv_prog_gnu_ld=no
773 with_gnu_ld=$acl_cv_prog_gnu_ld
776 dnl From libtool-2.4. Sets the variable LD.
777 AC_DEFUN([AC_LIB_PROG_LD],
778 [AC_REQUIRE([AC_PROG_CC])dnl
779 AC_REQUIRE([AC_CANONICAL_HOST])dnl
781 AC_ARG_WITH([gnu-ld],
782 [AS_HELP_STRING([--with-gnu-ld],
783 [assume the C compiler uses GNU ld [default=no]])],
784 [test "$withval" = no || with_gnu_ld=yes],
787 # Prepare PATH_SEPARATOR.
788 # The user is always right.
789 if test "${PATH_SEPARATOR+set}" != set; then
790 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
791 # contains only /bin. Note that ksh looks also at the FPATH variable,
792 # so we have to set that as well for the test.
794 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
795 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
796 || PATH_SEPARATOR=';'
801 if test "$GCC" = yes; then
802 # Check if gcc -print-prog-name=ld gives a path.
803 AC_MSG_CHECKING([for ld used by $CC])
806 # gcc leaves a trailing carriage return which upsets mingw
807 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
809 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
812 # Accept absolute paths.
813 [[\\/]]* | ?:[[\\/]]*)
814 re_direlt='/[[^/]][[^/]]*/\.\./'
815 # Canonicalize the pathname of ld
816 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
817 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
818 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
820 test -z "$LD" && LD="$ac_prog"
823 # If it fails, then pretend we aren't using GCC.
827 # If it is relative, then search for the first ld in PATH.
831 elif test "$with_gnu_ld" = yes; then
832 AC_MSG_CHECKING([for GNU ld])
834 AC_MSG_CHECKING([for non-GNU ld])
836 AC_CACHE_VAL([acl_cv_path_LD],
837 [if test -z "$LD"; then
838 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
839 for ac_dir in $PATH; do
841 test -z "$ac_dir" && ac_dir=.
842 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
843 acl_cv_path_LD="$ac_dir/$ac_prog"
844 # Check to see if the program is GNU ld. I'd rather use --version,
845 # but apparently some variants of GNU ld only accept -v.
846 # Break only if it was the GNU/non-GNU ld that we prefer.
847 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
848 *GNU* | *'with BFD'*)
849 test "$with_gnu_ld" != no && break
852 test "$with_gnu_ld" != yes && break
859 acl_cv_path_LD="$LD" # Let the user override the test with a path.
862 if test -n "$LD"; then
867 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
871 # lib-link.m4 serial 26 (gettext-0.18.2)
872 dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
873 dnl This file is free software; the Free Software Foundation
874 dnl gives unlimited permission to copy and/or distribute it,
875 dnl with or without modifications, as long as this notice is preserved.
877 dnl From Bruno Haible.
881 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
882 dnl the libraries corresponding to explicit and implicit dependencies.
883 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
884 dnl augments the CPPFLAGS variable.
885 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
886 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
887 AC_DEFUN([AC_LIB_LINKFLAGS],
889 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
890 AC_REQUIRE([AC_LIB_RPATH])
891 pushdef([Name],[m4_translit([$1],[./+-], [____])])
892 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
893 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
894 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
895 AC_LIB_LINKFLAGS_BODY([$1], [$2])
896 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
897 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
898 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
899 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
901 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
902 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
903 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
904 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
905 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
907 AC_SUBST([LTLIB]NAME)
908 AC_SUBST([LIB]NAME[_PREFIX])
909 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
910 dnl results of this search when this library appears as a dependency.
916 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
917 dnl searches for libname and the libraries corresponding to explicit and
918 dnl implicit dependencies, together with the specified include files and
919 dnl the ability to compile and link the specified testcode. The missing-message
920 dnl defaults to 'no' and may contain additional hints for the user.
921 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
922 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
923 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
924 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
925 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
926 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
927 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
929 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
930 AC_REQUIRE([AC_LIB_RPATH])
931 pushdef([Name],[m4_translit([$1],[./+-], [____])])
932 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
933 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
935 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
937 AC_LIB_LINKFLAGS_BODY([$1], [$2])
939 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
940 dnl because if the user has installed lib[]Name and not disabled its use
941 dnl via --without-lib[]Name-prefix, he wants to use it.
942 ac_save_CPPFLAGS="$CPPFLAGS"
943 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
945 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
947 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
948 dnl because these -l options might require -L options that are present in
949 dnl LIBS. -l options benefit only from the -L options listed before it.
950 dnl Otherwise, add it to the front of LIBS, because it may be a static
951 dnl library that depends on another static library that is present in LIBS.
952 dnl Static libraries benefit only from the static libraries listed after
954 case " $LIB[]NAME" in
955 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
956 *) LIBS="$LIB[]NAME $LIBS" ;;
959 [AC_LANG_PROGRAM([[$3]], [[$4]])],
960 [ac_cv_lib[]Name=yes],
961 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
964 if test "$ac_cv_lib[]Name" = yes; then
966 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
967 AC_MSG_CHECKING([how to link with lib[]$1])
968 AC_MSG_RESULT([$LIB[]NAME])
971 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
972 dnl $INC[]NAME either.
973 CPPFLAGS="$ac_save_CPPFLAGS"
978 AC_SUBST([HAVE_LIB]NAME)
980 AC_SUBST([LTLIB]NAME)
981 AC_SUBST([LIB]NAME[_PREFIX])
986 dnl Determine the platform dependent parameters needed to use rpath:
989 dnl acl_libname_spec,
990 dnl acl_library_names_spec,
991 dnl acl_hardcode_libdir_flag_spec,
992 dnl acl_hardcode_libdir_separator,
993 dnl acl_hardcode_direct,
994 dnl acl_hardcode_minus_L.
995 AC_DEFUN([AC_LIB_RPATH],
997 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
998 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
999 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1000 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1001 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1002 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1003 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1004 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1005 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1011 acl_libext="$acl_cv_libext"
1012 acl_shlibext="$acl_cv_shlibext"
1013 acl_libname_spec="$acl_cv_libname_spec"
1014 acl_library_names_spec="$acl_cv_library_names_spec"
1015 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1016 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1017 acl_hardcode_direct="$acl_cv_hardcode_direct"
1018 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1019 dnl Determine whether the user wants rpath handling at all.
1020 AC_ARG_ENABLE([rpath],
1021 [ --disable-rpath do not hardcode runtime library paths],
1022 :, enable_rpath=yes)
1025 dnl AC_LIB_FROMPACKAGE(name, package)
1026 dnl declares that libname comes from the given package. The configure file
1027 dnl will then not have a --with-libname-prefix option but a
1028 dnl --with-package-prefix option. Several libraries can come from the same
1029 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1030 dnl macro call that searches for libname.
1031 AC_DEFUN([AC_LIB_FROMPACKAGE],
1033 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1034 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1035 define([acl_frompackage_]NAME, [$2])
1037 pushdef([PACK],[$2])
1038 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1039 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1040 define([acl_libsinpackage_]PACKUP,
1041 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
1046 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1047 dnl the libraries corresponding to explicit and implicit dependencies.
1048 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1049 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1050 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1051 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1053 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1054 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1055 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1056 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1057 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1058 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1059 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1060 dnl Autoconf >= 2.61 supports dots in --with options.
1061 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
1062 dnl By default, look in $includedir and $libdir.
1064 AC_LIB_WITH_FINAL_PREFIX([
1065 eval additional_includedir=\"$includedir\"
1066 eval additional_libdir=\"$libdir\"
1068 AC_ARG_WITH(P_A_C_K[-prefix],
1069 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1070 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1072 if test "X$withval" = "Xno"; then
1075 if test "X$withval" = "X"; then
1076 AC_LIB_WITH_FINAL_PREFIX([
1077 eval additional_includedir=\"$includedir\"
1078 eval additional_libdir=\"$libdir\"
1081 additional_includedir="$withval/include"
1082 additional_libdir="$withval/$acl_libdirstem"
1083 if test "$acl_libdirstem2" != "$acl_libdirstem" \
1084 && ! test -d "$withval/$acl_libdirstem"; then
1085 additional_libdir="$withval/$acl_libdirstem2"
1090 dnl Search the library and its dependencies in $additional_libdir and
1091 dnl $LDFLAGS. Using breadth-first-seach.
1096 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1097 dnl computed. So it has to be reset here.
1101 names_already_handled=
1102 names_next_round='$1 $2'
1103 while test -n "$names_next_round"; do
1104 names_this_round="$names_next_round"
1106 for name in $names_this_round; do
1108 for n in $names_already_handled; do
1109 if test "$n" = "$name"; then
1114 if test -z "$already_handled"; then
1115 names_already_handled="$names_already_handled $name"
1116 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1117 dnl or AC_LIB_HAVE_LINKFLAGS call.
1118 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
1119 eval value=\"\$HAVE_LIB$uppername\"
1120 if test -n "$value"; then
1121 if test "$value" = yes; then
1122 eval value=\"\$LIB$uppername\"
1123 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1124 eval value=\"\$LTLIB$uppername\"
1125 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1127 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1128 dnl that this library doesn't exist. So just drop it.
1132 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1133 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1138 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1139 if test -n "$acl_shlibext"; then
1140 shrext=".$acl_shlibext" # typically: shrext=.so
1144 if test $use_additional = yes; then
1145 dir="$additional_libdir"
1146 dnl The same code as in the loop below:
1147 dnl First look for a shared library.
1148 if test -n "$acl_shlibext"; then
1149 if test -f "$dir/$libname$shrext"; then
1151 found_so="$dir/$libname$shrext"
1153 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1154 ver=`(cd "$dir" && \
1155 for f in "$libname$shrext".*; do echo "$f"; done \
1156 | sed -e "s,^$libname$shrext\\\\.,," \
1157 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1158 | sed 1q ) 2>/dev/null`
1159 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1161 found_so="$dir/$libname$shrext.$ver"
1164 eval library_names=\"$acl_library_names_spec\"
1165 for f in $library_names; do
1166 if test -f "$dir/$f"; then
1175 dnl Then look for a static library.
1176 if test "X$found_dir" = "X"; then
1177 if test -f "$dir/$libname.$acl_libext"; then
1179 found_a="$dir/$libname.$acl_libext"
1182 if test "X$found_dir" != "X"; then
1183 if test -f "$dir/$libname.la"; then
1184 found_la="$dir/$libname.la"
1188 if test "X$found_dir" = "X"; then
1189 for x in $LDFLAGS $LTLIB[]NAME; do
1190 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1193 dir=`echo "X$x" | sed -e 's/^X-L//'`
1194 dnl First look for a shared library.
1195 if test -n "$acl_shlibext"; then
1196 if test -f "$dir/$libname$shrext"; then
1198 found_so="$dir/$libname$shrext"
1200 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1201 ver=`(cd "$dir" && \
1202 for f in "$libname$shrext".*; do echo "$f"; done \
1203 | sed -e "s,^$libname$shrext\\\\.,," \
1204 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1205 | sed 1q ) 2>/dev/null`
1206 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1208 found_so="$dir/$libname$shrext.$ver"
1211 eval library_names=\"$acl_library_names_spec\"
1212 for f in $library_names; do
1213 if test -f "$dir/$f"; then
1222 dnl Then look for a static library.
1223 if test "X$found_dir" = "X"; then
1224 if test -f "$dir/$libname.$acl_libext"; then
1226 found_a="$dir/$libname.$acl_libext"
1229 if test "X$found_dir" != "X"; then
1230 if test -f "$dir/$libname.la"; then
1231 found_la="$dir/$libname.la"
1236 if test "X$found_dir" != "X"; then
1241 if test "X$found_dir" != "X"; then
1242 dnl Found the library.
1243 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1244 if test "X$found_so" != "X"; then
1245 dnl Linking with a shared library. We attempt to hardcode its
1246 dnl directory into the executable's runpath, unless it's the
1247 dnl standard /usr/lib.
1248 if test "$enable_rpath" = no \
1249 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1250 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1251 dnl No hardcoding is needed.
1252 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1254 dnl Use an explicit option to hardcode DIR into the resulting
1256 dnl Potentially add DIR to ltrpathdirs.
1257 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1259 for x in $ltrpathdirs; do
1260 if test "X$x" = "X$found_dir"; then
1265 if test -z "$haveit"; then
1266 ltrpathdirs="$ltrpathdirs $found_dir"
1268 dnl The hardcoding into $LIBNAME is system dependent.
1269 if test "$acl_hardcode_direct" = yes; then
1270 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1271 dnl resulting binary.
1272 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1274 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1275 dnl Use an explicit option to hardcode DIR into the resulting
1277 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1278 dnl Potentially add DIR to rpathdirs.
1279 dnl The rpathdirs will be appended to $LIBNAME at the end.
1281 for x in $rpathdirs; do
1282 if test "X$x" = "X$found_dir"; then
1287 if test -z "$haveit"; then
1288 rpathdirs="$rpathdirs $found_dir"
1291 dnl Rely on "-L$found_dir".
1292 dnl But don't add it if it's already contained in the LDFLAGS
1293 dnl or the already constructed $LIBNAME
1295 for x in $LDFLAGS $LIB[]NAME; do
1296 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1297 if test "X$x" = "X-L$found_dir"; then
1302 if test -z "$haveit"; then
1303 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1305 if test "$acl_hardcode_minus_L" != no; then
1306 dnl FIXME: Not sure whether we should use
1307 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1309 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1311 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1312 dnl here, because this doesn't fit in flags passed to the
1313 dnl compiler. So give up. No hardcoding. This affects only
1314 dnl very old systems.
1315 dnl FIXME: Not sure whether we should use
1316 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1318 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1324 if test "X$found_a" != "X"; then
1325 dnl Linking with a static library.
1326 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1328 dnl We shouldn't come here, but anyway it's good to have a
1330 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1333 dnl Assume the include files are nearby.
1334 additional_includedir=
1335 case "$found_dir" in
1336 */$acl_libdirstem | */$acl_libdirstem/)
1337 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1338 if test "$name" = '$1'; then
1339 LIB[]NAME[]_PREFIX="$basedir"
1341 additional_includedir="$basedir/include"
1343 */$acl_libdirstem2 | */$acl_libdirstem2/)
1344 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1345 if test "$name" = '$1'; then
1346 LIB[]NAME[]_PREFIX="$basedir"
1348 additional_includedir="$basedir/include"
1351 if test "X$additional_includedir" != "X"; then
1352 dnl Potentially add $additional_includedir to $INCNAME.
1353 dnl But don't add it
1354 dnl 1. if it's the standard /usr/include,
1355 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1356 dnl 3. if it's already present in $CPPFLAGS or the already
1357 dnl constructed $INCNAME,
1358 dnl 4. if it doesn't exist as a directory.
1359 if test "X$additional_includedir" != "X/usr/include"; then
1361 if test "X$additional_includedir" = "X/usr/local/include"; then
1362 if test -n "$GCC"; then
1364 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1368 if test -z "$haveit"; then
1369 for x in $CPPFLAGS $INC[]NAME; do
1370 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1371 if test "X$x" = "X-I$additional_includedir"; then
1376 if test -z "$haveit"; then
1377 if test -d "$additional_includedir"; then
1378 dnl Really add $additional_includedir to $INCNAME.
1379 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1385 dnl Look for dependencies.
1386 if test -n "$found_la"; then
1387 dnl Read the .la file. It defines the variables
1388 dnl dlname, library_names, old_library, dependency_libs, current,
1389 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1390 save_libdir="$libdir"
1392 */* | *\\*) . "$found_la" ;;
1393 *) . "./$found_la" ;;
1395 libdir="$save_libdir"
1396 dnl We use only dependency_libs.
1397 for dep in $dependency_libs; do
1400 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1401 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1402 dnl But don't add it
1403 dnl 1. if it's the standard /usr/lib,
1404 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1405 dnl 3. if it's already present in $LDFLAGS or the already
1406 dnl constructed $LIBNAME,
1407 dnl 4. if it doesn't exist as a directory.
1408 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1409 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1411 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1412 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1413 if test -n "$GCC"; then
1415 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1419 if test -z "$haveit"; then
1421 for x in $LDFLAGS $LIB[]NAME; do
1422 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1423 if test "X$x" = "X-L$additional_libdir"; then
1428 if test -z "$haveit"; then
1429 if test -d "$additional_libdir"; then
1430 dnl Really add $additional_libdir to $LIBNAME.
1431 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1435 for x in $LDFLAGS $LTLIB[]NAME; do
1436 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1437 if test "X$x" = "X-L$additional_libdir"; then
1442 if test -z "$haveit"; then
1443 if test -d "$additional_libdir"; then
1444 dnl Really add $additional_libdir to $LTLIBNAME.
1445 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1452 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1453 if test "$enable_rpath" != no; then
1454 dnl Potentially add DIR to rpathdirs.
1455 dnl The rpathdirs will be appended to $LIBNAME at the end.
1457 for x in $rpathdirs; do
1458 if test "X$x" = "X$dir"; then
1463 if test -z "$haveit"; then
1464 rpathdirs="$rpathdirs $dir"
1466 dnl Potentially add DIR to ltrpathdirs.
1467 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1469 for x in $ltrpathdirs; do
1470 if test "X$x" = "X$dir"; then
1475 if test -z "$haveit"; then
1476 ltrpathdirs="$ltrpathdirs $dir"
1481 dnl Handle this in the next round.
1482 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1485 dnl Handle this in the next round. Throw away the .la's
1486 dnl directory; it is already contained in a preceding -L
1488 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1491 dnl Most likely an immediate library name.
1492 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1493 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1499 dnl Didn't find the library; assume it is in the system directories
1500 dnl known to the linker and runtime loader. (All the system
1501 dnl directories known to the linker should also be known to the
1502 dnl runtime loader, otherwise the system is severely misconfigured.)
1503 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1504 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1510 if test "X$rpathdirs" != "X"; then
1511 if test -n "$acl_hardcode_libdir_separator"; then
1512 dnl Weird platform: only the last -rpath option counts, the user must
1513 dnl pass all path elements in one option. We can arrange that for a
1514 dnl single library, but not when more than one $LIBNAMEs are used.
1516 for found_dir in $rpathdirs; do
1517 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1519 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1520 acl_save_libdir="$libdir"
1522 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1523 libdir="$acl_save_libdir"
1524 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1526 dnl The -rpath options are cumulative.
1527 for found_dir in $rpathdirs; do
1528 acl_save_libdir="$libdir"
1530 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1531 libdir="$acl_save_libdir"
1532 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1536 if test "X$ltrpathdirs" != "X"; then
1537 dnl When using libtool, the option that works for both libraries and
1538 dnl executables is -R. The -R options are cumulative.
1539 for found_dir in $ltrpathdirs; do
1540 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1550 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1551 dnl unless already present in VAR.
1552 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1553 dnl contains two or three consecutive elements that belong together.
1554 AC_DEFUN([AC_LIB_APPENDTOVAR],
1556 for element in [$2]; do
1559 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1560 if test "X$x" = "X$element"; then
1565 if test -z "$haveit"; then
1566 [$1]="${[$1]}${[$1]:+ }$element"
1571 dnl For those cases where a variable contains several -L and -l options
1572 dnl referring to unknown libraries and directories, this macro determines the
1573 dnl necessary additional linker options for the runtime path.
1574 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1575 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1576 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1577 dnl otherwise linking without libtool is assumed.
1578 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1580 AC_REQUIRE([AC_LIB_RPATH])
1581 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1583 if test "$enable_rpath" != no; then
1584 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1585 dnl Use an explicit option to hardcode directories into the resulting
1590 if test -n "$next"; then
1592 dnl No need to hardcode the standard /usr/lib.
1593 if test "X$dir" != "X/usr/$acl_libdirstem" \
1594 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1595 rpathdirs="$rpathdirs $dir"
1601 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1602 dnl No need to hardcode the standard /usr/lib.
1603 if test "X$dir" != "X/usr/$acl_libdirstem" \
1604 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1605 rpathdirs="$rpathdirs $dir"
1612 if test "X$rpathdirs" != "X"; then
1613 if test -n ""$3""; then
1614 dnl libtool is used for linking. Use -R options.
1615 for dir in $rpathdirs; do
1616 $1="${$1}${$1:+ }-R$dir"
1619 dnl The linker is used for linking directly.
1620 if test -n "$acl_hardcode_libdir_separator"; then
1621 dnl Weird platform: only the last -rpath option counts, the user
1622 dnl must pass all path elements in one option.
1624 for dir in $rpathdirs; do
1625 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1627 acl_save_libdir="$libdir"
1629 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1630 libdir="$acl_save_libdir"
1633 dnl The -rpath options are cumulative.
1634 for dir in $rpathdirs; do
1635 acl_save_libdir="$libdir"
1637 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1638 libdir="$acl_save_libdir"
1639 $1="${$1}${$1:+ }$flag"
1649 # lib-prefix.m4 serial 7 (gettext-0.18)
1650 dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc.
1651 dnl This file is free software; the Free Software Foundation
1652 dnl gives unlimited permission to copy and/or distribute it,
1653 dnl with or without modifications, as long as this notice is preserved.
1655 dnl From Bruno Haible.
1657 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1658 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1659 dnl require excessive bracketing.
1660 ifdef([AC_HELP_STRING],
1661 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1662 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1664 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1665 dnl to access previously installed libraries. The basic assumption is that
1666 dnl a user will want packages to use other packages he previously installed
1667 dnl with the same --prefix option.
1668 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1669 dnl libraries, but is otherwise very convenient.
1670 AC_DEFUN([AC_LIB_PREFIX],
1672 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1673 AC_REQUIRE([AC_PROG_CC])
1674 AC_REQUIRE([AC_CANONICAL_HOST])
1675 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1676 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1677 dnl By default, look in $includedir and $libdir.
1679 AC_LIB_WITH_FINAL_PREFIX([
1680 eval additional_includedir=\"$includedir\"
1681 eval additional_libdir=\"$libdir\"
1683 AC_LIB_ARG_WITH([lib-prefix],
1684 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1685 --without-lib-prefix don't search for libraries in includedir and libdir],
1687 if test "X$withval" = "Xno"; then
1690 if test "X$withval" = "X"; then
1691 AC_LIB_WITH_FINAL_PREFIX([
1692 eval additional_includedir=\"$includedir\"
1693 eval additional_libdir=\"$libdir\"
1696 additional_includedir="$withval/include"
1697 additional_libdir="$withval/$acl_libdirstem"
1701 if test $use_additional = yes; then
1702 dnl Potentially add $additional_includedir to $CPPFLAGS.
1703 dnl But don't add it
1704 dnl 1. if it's the standard /usr/include,
1705 dnl 2. if it's already present in $CPPFLAGS,
1706 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1707 dnl 4. if it doesn't exist as a directory.
1708 if test "X$additional_includedir" != "X/usr/include"; then
1710 for x in $CPPFLAGS; do
1711 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1712 if test "X$x" = "X-I$additional_includedir"; then
1717 if test -z "$haveit"; then
1718 if test "X$additional_includedir" = "X/usr/local/include"; then
1719 if test -n "$GCC"; then
1721 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1725 if test -z "$haveit"; then
1726 if test -d "$additional_includedir"; then
1727 dnl Really add $additional_includedir to $CPPFLAGS.
1728 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1733 dnl Potentially add $additional_libdir to $LDFLAGS.
1734 dnl But don't add it
1735 dnl 1. if it's the standard /usr/lib,
1736 dnl 2. if it's already present in $LDFLAGS,
1737 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1738 dnl 4. if it doesn't exist as a directory.
1739 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1741 for x in $LDFLAGS; do
1742 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1743 if test "X$x" = "X-L$additional_libdir"; then
1748 if test -z "$haveit"; then
1749 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1750 if test -n "$GCC"; then
1752 linux*) haveit=yes;;
1756 if test -z "$haveit"; then
1757 if test -d "$additional_libdir"; then
1758 dnl Really add $additional_libdir to $LDFLAGS.
1759 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1767 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1768 dnl acl_final_exec_prefix, containing the values to which $prefix and
1769 dnl $exec_prefix will expand at the end of the configure script.
1770 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1772 dnl Unfortunately, prefix and exec_prefix get only finally determined
1773 dnl at the end of configure.
1774 if test "X$prefix" = "XNONE"; then
1775 acl_final_prefix="$ac_default_prefix"
1777 acl_final_prefix="$prefix"
1779 if test "X$exec_prefix" = "XNONE"; then
1780 acl_final_exec_prefix='${prefix}'
1782 acl_final_exec_prefix="$exec_prefix"
1784 acl_save_prefix="$prefix"
1785 prefix="$acl_final_prefix"
1786 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1787 prefix="$acl_save_prefix"
1790 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1791 dnl variables prefix and exec_prefix bound to the values they will have
1792 dnl at the end of the configure script.
1793 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1795 acl_save_prefix="$prefix"
1796 prefix="$acl_final_prefix"
1797 acl_save_exec_prefix="$exec_prefix"
1798 exec_prefix="$acl_final_exec_prefix"
1800 exec_prefix="$acl_save_exec_prefix"
1801 prefix="$acl_save_prefix"
1804 dnl AC_LIB_PREPARE_MULTILIB creates
1805 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1806 dnl "lib" or "lib64" or "lib/64",
1807 dnl - a variable acl_libdirstem2, as a secondary possible value for
1808 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1810 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1812 dnl There is no formal standard regarding lib and lib64.
1813 dnl On glibc systems, the current practice is that on a system supporting
1814 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1815 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1816 dnl the compiler's default mode by looking at the compiler's library search
1817 dnl path. If at least one of its elements ends in /lib64 or points to a
1818 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1819 dnl Otherwise we use the default, namely "lib".
1820 dnl On Solaris systems, the current practice is that on a system supporting
1821 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1822 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1823 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1824 AC_REQUIRE([AC_CANONICAL_HOST])
1829 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1830 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1831 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1832 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1833 dnl symlink is missing, so we set acl_libdirstem2 too.
1834 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1835 [AC_EGREP_CPP([sixtyfour bits], [
1839 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1841 if test $gl_cv_solaris_64bit = yes; then
1842 acl_libdirstem=lib/64
1844 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1845 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1850 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1851 if test -n "$searchpath"; then
1852 acl_save_IFS="${IFS= }"; IFS=":"
1853 for searchdir in $searchpath; do
1854 if test -d "$searchdir"; then
1855 case "$searchdir" in
1856 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1858 # Better ignore directories of this form. They are misleading.
1860 *) searchdir=`cd "$searchdir" && pwd`
1861 case "$searchdir" in
1862 */lib64 ) acl_libdirstem=lib64 ;;
1871 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1874 # nls.m4 serial 5 (gettext-0.18)
1875 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
1877 dnl This file is free software; the Free Software Foundation
1878 dnl gives unlimited permission to copy and/or distribute it,
1879 dnl with or without modifications, as long as this notice is preserved.
1881 dnl This file can can be used in projects which are not available under
1882 dnl the GNU General Public License or the GNU Library General Public
1883 dnl License but which still want to provide support for the GNU gettext
1885 dnl Please note that the actual code of the GNU gettext library is covered
1886 dnl by the GNU Library General Public License, and the rest of the GNU
1887 dnl gettext package package is covered by the GNU General Public License.
1888 dnl They are *not* in the public domain.
1891 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1892 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1898 AC_MSG_CHECKING([whether NLS is requested])
1899 dnl Default is enabled NLS
1900 AC_ARG_ENABLE([nls],
1901 [ --disable-nls do not use Native Language Support],
1902 USE_NLS=$enableval, USE_NLS=yes)
1903 AC_MSG_RESULT([$USE_NLS])
1907 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1908 # serial 1 (pkg-config-0.24)
1910 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1912 # This program is free software; you can redistribute it and/or modify
1913 # it under the terms of the GNU General Public License as published by
1914 # the Free Software Foundation; either version 2 of the License, or
1915 # (at your option) any later version.
1917 # This program is distributed in the hope that it will be useful, but
1918 # WITHOUT ANY WARRANTY; without even the implied warranty of
1919 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1920 # General Public License for more details.
1922 # You should have received a copy of the GNU General Public License
1923 # along with this program; if not, write to the Free Software
1924 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1926 # As a special exception to the GNU General Public License, if you
1927 # distribute this file as part of a program that contains a
1928 # configuration script generated by Autoconf, you may include it under
1929 # the same distribution terms that you use for the rest of that program.
1931 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1932 # ----------------------------------
1933 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1934 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1935 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1936 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1937 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1938 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1939 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1941 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1942 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1944 if test -n "$PKG_CONFIG"; then
1945 _pkg_min_version=m4_default([$1], [0.9.0])
1946 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1947 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1948 AC_MSG_RESULT([yes])
1954 ])# PKG_PROG_PKG_CONFIG
1956 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1958 # Check to see whether a particular set of modules exists. Similar
1959 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1961 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1962 # only at the first occurence in configure.ac, so if the first place
1963 # it's called might be skipped (such as if it is within an "if", you
1964 # have to call PKG_CHECK_EXISTS manually
1965 # --------------------------------------------------------------
1966 AC_DEFUN([PKG_CHECK_EXISTS],
1967 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1968 if test -n "$PKG_CONFIG" && \
1969 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1970 m4_default([$2], [:])
1971 m4_ifvaln([$3], [else
1975 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1976 # ---------------------------------------------
1977 m4_define([_PKG_CONFIG],
1978 [if test -n "$$1"; then
1980 elif test -n "$PKG_CONFIG"; then
1981 PKG_CHECK_EXISTS([$3],
1982 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1983 test "x$?" != "x0" && pkg_failed=yes ],
1990 # _PKG_SHORT_ERRORS_SUPPORTED
1991 # -----------------------------
1992 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1993 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1994 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1995 _pkg_short_errors_supported=yes
1997 _pkg_short_errors_supported=no
1999 ])# _PKG_SHORT_ERRORS_SUPPORTED
2002 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2003 # [ACTION-IF-NOT-FOUND])
2006 # Note that if there is a possibility the first call to
2007 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2008 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2011 # --------------------------------------------------------------
2012 AC_DEFUN([PKG_CHECK_MODULES],
2013 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2014 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2015 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2018 AC_MSG_CHECKING([for $1])
2020 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2021 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2023 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2024 and $1[]_LIBS to avoid the need to call pkg-config.
2025 See the pkg-config man page for more details.])
2027 if test $pkg_failed = yes; then
2029 _PKG_SHORT_ERRORS_SUPPORTED
2030 if test $_pkg_short_errors_supported = yes; then
2031 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
2033 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
2035 # Put the nasty error message in config.log where it belongs
2036 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2038 m4_default([$4], [AC_MSG_ERROR(
2039 [Package requirements ($2) were not met:
2043 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2044 installed software in a non-standard prefix.
2048 elif test $pkg_failed = untried; then
2050 m4_default([$4], [AC_MSG_FAILURE(
2051 [The pkg-config script could not be found or is too old. Make sure it
2052 is in your PATH or set the PKG_CONFIG environment variable to the full
2057 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
2060 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2061 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2062 AC_MSG_RESULT([yes])
2065 ])# PKG_CHECK_MODULES
2067 # po.m4 serial 21 (gettext-0.18.3)
2068 dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
2069 dnl This file is free software; the Free Software Foundation
2070 dnl gives unlimited permission to copy and/or distribute it,
2071 dnl with or without modifications, as long as this notice is preserved.
2073 dnl This file can can be used in projects which are not available under
2074 dnl the GNU General Public License or the GNU Library General Public
2075 dnl License but which still want to provide support for the GNU gettext
2077 dnl Please note that the actual code of the GNU gettext library is covered
2078 dnl by the GNU Library General Public License, and the rest of the GNU
2079 dnl gettext package package is covered by the GNU General Public License.
2080 dnl They are *not* in the public domain.
2083 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2084 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2088 dnl Checks for all prerequisites of the po subdirectory.
2089 AC_DEFUN([AM_PO_SUBDIRS],
2091 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2092 AC_REQUIRE([AC_PROG_INSTALL])dnl
2093 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2094 AC_REQUIRE([AC_PROG_SED])dnl
2095 AC_REQUIRE([AM_NLS])dnl
2097 dnl Release version of the gettext macros. This is used to ensure that
2098 dnl the gettext macros and po/Makefile.in.in are in sync.
2099 AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
2101 dnl Perform the following tests also if --disable-nls has been given,
2102 dnl because they are needed for "make dist" to work.
2104 dnl Search for GNU msgfmt in the PATH.
2105 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2106 dnl The second test excludes FreeBSD msgfmt.
2107 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2108 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2109 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2111 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2113 dnl Test whether it is GNU msgfmt >= 0.15.
2115 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2116 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2117 *) MSGFMT_015=$MSGFMT ;;
2120 AC_SUBST([MSGFMT_015])
2122 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2123 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2124 *) GMSGFMT_015=$GMSGFMT ;;
2127 AC_SUBST([GMSGFMT_015])
2129 dnl Search for GNU xgettext 0.12 or newer in the PATH.
2130 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2131 dnl The second test excludes FreeBSD xgettext.
2132 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2133 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2134 (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)],
2136 dnl Remove leftover from FreeBSD xgettext call.
2139 dnl Test whether it is GNU xgettext >= 0.15.
2141 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2142 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2143 *) XGETTEXT_015=$XGETTEXT ;;
2146 AC_SUBST([XGETTEXT_015])
2148 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2149 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2150 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2152 dnl Installation directories.
2153 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2154 dnl have to define it here, so that it can be used in po/Makefile.
2155 test -n "$localedir" || localedir='${datadir}/locale'
2156 AC_SUBST([localedir])
2158 dnl Support for AM_XGETTEXT_OPTION.
2159 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2160 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2162 AC_CONFIG_COMMANDS([po-directories], [[
2163 for ac_file in $CONFIG_FILES; do
2164 # Support "outfile[:infile[:infile...]]"
2166 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2168 # PO directories have a Makefile.in generated from Makefile.in.in.
2169 case "$ac_file" in */Makefile.in)
2170 # Adjust a relative srcdir.
2171 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2172 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2173 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2174 # In autoconf-2.13 it is called $ac_given_srcdir.
2175 # In autoconf-2.50 it is called $srcdir.
2176 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2177 case "$ac_given_srcdir" in
2178 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2179 /*) top_srcdir="$ac_given_srcdir" ;;
2180 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2182 # Treat a directory as a PO directory if and only if it has a
2183 # POTFILES.in file. This allows packages to have multiple PO
2184 # directories under different names or in different locations.
2185 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2186 rm -f "$ac_dir/POTFILES"
2187 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2188 gt_tab=`printf '\t'`
2189 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"
2190 POMAKEFILEDEPS="POTFILES.in"
2191 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2192 # on $ac_dir but don't depend on user-specified configuration
2194 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2195 # The LINGUAS file contains the set of available languages.
2196 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2197 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2199 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2200 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2201 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2202 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2204 # The set of available languages was given in configure.in.
2205 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2206 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2209 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2210 # Compute UPDATEPOFILES
2211 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2212 # Compute DUMMYPOFILES
2213 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2215 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2216 case "$ac_given_srcdir" in
2218 *) srcdirpre='$(srcdir)/' ;;
2224 for lang in $ALL_LINGUAS; do
2225 POFILES="$POFILES $srcdirpre$lang.po"
2226 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2227 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2228 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2230 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2231 # environment variable.
2233 if test -n "$ALL_LINGUAS"; then
2234 for presentlang in $ALL_LINGUAS; do
2236 if test "%UNSET%" != "$LINGUAS"; then
2237 desiredlanguages="$LINGUAS"
2239 desiredlanguages="$ALL_LINGUAS"
2241 for desiredlang in $desiredlanguages; do
2242 # Use the presentlang catalog if desiredlang is
2243 # a. equal to presentlang, or
2244 # b. a variant of presentlang (because in this case,
2245 # presentlang can be used as a fallback for messages
2246 # which are not translated in the desiredlang catalog).
2247 case "$desiredlang" in
2248 "$presentlang"*) useit=yes;;
2251 if test $useit = yes; then
2252 INST_LINGUAS="$INST_LINGUAS $presentlang"
2257 if test -n "$INST_LINGUAS"; then
2258 for lang in $INST_LINGUAS; do
2259 CATALOGS="$CATALOGS $lang.gmo"
2262 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2263 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"
2264 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2265 if test -f "$f"; then
2267 *.orig | *.bak | *~) ;;
2268 *) cat "$f" >> "$ac_dir/Makefile" ;;
2276 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2277 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2278 # from automake < 1.5.
2279 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2280 # Capture the value of LINGUAS because we need it to compute CATALOGS.
2281 LINGUAS="${LINGUAS-%UNSET%}"
2285 dnl Postprocesses a Makefile in a directory containing PO files.
2286 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2288 # When this code is run, in config.status, two variables have already been
2290 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2291 # - LINGUAS is the value of the environment variable LINGUAS at configure
2295 # Adjust a relative srcdir.
2296 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2297 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2298 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2299 # In autoconf-2.13 it is called $ac_given_srcdir.
2300 # In autoconf-2.50 it is called $srcdir.
2301 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2302 case "$ac_given_srcdir" in
2303 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2304 /*) top_srcdir="$ac_given_srcdir" ;;
2305 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2308 # Find a way to echo strings without interpreting backslash.
2309 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2312 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2313 gt_echo='printf %s\n'
2324 # A sed script that extracts the value of VARIABLE from a Makefile.
2327 # Test if the hold space is empty.
2332 # Yes it was empty. Look if we have the expected variable definition.
2333 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
2334 # Seen the first line of the variable definition.
2335 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
2340 # Here we are processing a line from the variable definition.
2341 # Remove comment, more precisely replace it with a space.
2343 # See if the line ends in a backslash.
2347 # Print the line, without the trailing backslash.
2350 # There was no trailing backslash. The end of the variable definition is
2351 # reached. Clear the hold space.
2356 # A trailing backslash means that the variable definition continues in the
2357 # next line. Put a nonempty string into the hold space to indicate this.
2364 # Set POTFILES to the value of the Makefile variable POTFILES.
2365 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2366 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2367 # Compute POTFILES_DEPS as
2368 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2370 for file in $POTFILES; do
2371 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2375 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2376 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2378 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2379 # The LINGUAS file contains the set of available languages.
2380 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2381 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2383 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2384 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2385 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2387 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2388 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2390 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2391 # Compute UPDATEPOFILES
2392 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2393 # Compute DUMMYPOFILES
2394 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2396 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2397 # Compute PROPERTIESFILES
2398 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2399 # Compute CLASSFILES
2400 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2402 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2404 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2405 # Compute RESOURCESDLLFILES
2406 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2407 case "$ac_given_srcdir" in
2409 *) srcdirpre='$(srcdir)/' ;;
2420 for lang in $ALL_LINGUAS; do
2421 POFILES="$POFILES $srcdirpre$lang.po"
2422 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2423 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2424 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2425 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2426 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2427 QMFILES="$QMFILES $srcdirpre$lang.qm"
2428 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2429 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2430 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/'`
2431 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2433 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2434 # environment variable.
2436 if test -n "$ALL_LINGUAS"; then
2437 for presentlang in $ALL_LINGUAS; do
2439 if test "%UNSET%" != "$LINGUAS"; then
2440 desiredlanguages="$LINGUAS"
2442 desiredlanguages="$ALL_LINGUAS"
2444 for desiredlang in $desiredlanguages; do
2445 # Use the presentlang catalog if desiredlang is
2446 # a. equal to presentlang, or
2447 # b. a variant of presentlang (because in this case,
2448 # presentlang can be used as a fallback for messages
2449 # which are not translated in the desiredlang catalog).
2450 case "$desiredlang" in
2451 "$presentlang"*) useit=yes;;
2454 if test $useit = yes; then
2455 INST_LINGUAS="$INST_LINGUAS $presentlang"
2464 if test -n "$INST_LINGUAS"; then
2465 for lang in $INST_LINGUAS; do
2466 CATALOGS="$CATALOGS $lang.gmo"
2467 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2468 QTCATALOGS="$QTCATALOGS $lang.qm"
2469 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2470 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2471 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/'`
2472 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2476 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"
2478 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2479 # Add dependencies that cannot be formulated as a simple suffix rule.
2480 for lang in $ALL_LINGUAS; do
2481 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2482 cat >> "$ac_file.tmp" <<EOF
2483 $frobbedlang.msg: $lang.po
2484 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2485 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2489 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2490 # Add dependencies that cannot be formulated as a simple suffix rule.
2491 for lang in $ALL_LINGUAS; do
2492 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/'`
2493 cat >> "$ac_file.tmp" <<EOF
2494 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2495 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2496 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2500 if test -n "$POMAKEFILEDEPS"; then
2501 cat >> "$ac_file.tmp" <<EOF
2502 Makefile: $POMAKEFILEDEPS
2505 mv "$ac_file.tmp" "$ac_file"
2508 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2509 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2511 XGETTEXT_EXTRA_OPTIONS=
2514 dnl Registers an option to be passed to xgettext in the po subdirectory.
2515 AC_DEFUN([AM_XGETTEXT_OPTION],
2517 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2518 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2521 # progtest.m4 serial 7 (gettext-0.18.2)
2522 dnl Copyright (C) 1996-2003, 2005, 2008-2013 Free Software Foundation, Inc.
2523 dnl This file is free software; the Free Software Foundation
2524 dnl gives unlimited permission to copy and/or distribute it,
2525 dnl with or without modifications, as long as this notice is preserved.
2527 dnl This file can can be used in projects which are not available under
2528 dnl the GNU General Public License or the GNU Library General Public
2529 dnl License but which still want to provide support for the GNU gettext
2531 dnl Please note that the actual code of the GNU gettext library is covered
2532 dnl by the GNU Library General Public License, and the rest of the GNU
2533 dnl gettext package package is covered by the GNU General Public License.
2534 dnl They are *not* in the public domain.
2537 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2541 # Search path for a program which passes the given test.
2543 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2544 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2545 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2547 # Prepare PATH_SEPARATOR.
2548 # The user is always right.
2549 if test "${PATH_SEPARATOR+set}" != set; then
2550 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
2551 # contains only /bin. Note that ksh looks also at the FPATH variable,
2552 # so we have to set that as well for the test.
2554 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2555 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2556 || PATH_SEPARATOR=';'
2560 # Find out how to test for executable files. Don't use a zero-byte file,
2561 # as systems may use methods other than mode bits to determine executability.
2562 cat >conf$$.file <<_ASEOF
2566 chmod +x conf$$.file
2567 if test -x conf$$.file >/dev/null 2>&1; then
2568 ac_executable_p="test -x"
2570 ac_executable_p="test -f"
2574 # Extract the first word of "$2", so it can be a program name with args.
2575 set dummy $2; ac_word=[$]2
2576 AC_MSG_CHECKING([for $ac_word])
2577 AC_CACHE_VAL([ac_cv_path_$1],
2579 [[\\/]]* | ?:[[\\/]]*)
2580 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2583 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2584 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2586 test -z "$ac_dir" && ac_dir=.
2587 for ac_exec_ext in '' $ac_executable_extensions; do
2588 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2589 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2591 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2598 dnl If no 4th arg is given, leave the cache variable unset,
2599 dnl so AC_PATH_PROGS will keep looking.
2600 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2605 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2606 AC_MSG_RESULT([$][$1])
2613 # Configure paths for SDL
2614 # Sam Lantinga 9/21/99
2615 # stolen from Manish Singh
2616 # stolen back from Frank Belew
2617 # stolen from Manish Singh
2618 # Shamelessly stolen from Owen Taylor
2622 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
2623 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
2625 AC_DEFUN([AM_PATH_SDL],
2627 dnl Get the cflags and libraries from the sdl-config script
2629 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
2630 sdl_prefix="$withval", sdl_prefix="")
2631 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
2632 sdl_exec_prefix="$withval", sdl_exec_prefix="")
2633 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
2634 , enable_sdltest=yes)
2636 if test x$sdl_exec_prefix != x ; then
2637 sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
2638 if test x${SDL_CONFIG+set} != xset ; then
2639 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
2642 if test x$sdl_prefix != x ; then
2643 sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
2644 if test x${SDL_CONFIG+set} != xset ; then
2645 SDL_CONFIG=$sdl_prefix/bin/sdl-config
2649 as_save_PATH="$PATH"
2650 if test "x$prefix" != xNONE; then
2651 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
2653 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
2654 PATH="$as_save_PATH"
2655 min_sdl_version=ifelse([$1], ,0.11.0,$1)
2656 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
2658 if test "$SDL_CONFIG" = "no" ; then
2661 SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
2662 SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
2664 sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
2665 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
2666 sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
2667 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
2668 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
2669 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
2670 if test "x$enable_sdltest" = "xyes" ; then
2671 ac_save_CFLAGS="$CFLAGS"
2672 ac_save_CXXFLAGS="$CXXFLAGS"
2673 ac_save_LIBS="$LIBS"
2674 CFLAGS="$CFLAGS $SDL_CFLAGS"
2675 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
2676 LIBS="$LIBS $SDL_LIBS"
2678 dnl Now check if the installed SDL is sufficiently new. (Also sanity
2679 dnl checks the results of sdl-config to some extent
2689 my_strdup (char *str)
2695 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
2696 strcpy (new_str, str);
2704 int main (int argc, char *argv[])
2706 int major, minor, micro;
2709 /* This hangs on some systems (?)
2710 system ("touch conf.sdltest");
2712 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
2714 /* HP/UX 9 (%@#!) writes to sscanf strings */
2715 tmp_version = my_strdup("$min_sdl_version");
2716 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
2717 printf("%s, bad version string\n", "$min_sdl_version");
2721 if (($sdl_major_version > major) ||
2722 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
2723 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
2729 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
2730 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
2731 printf("*** best to upgrade to the required version.\n");
2732 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
2733 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
2734 printf("*** config.cache before re-running configure\n");
2739 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2740 CFLAGS="$ac_save_CFLAGS"
2741 CXXFLAGS="$ac_save_CXXFLAGS"
2742 LIBS="$ac_save_LIBS"
2745 if test "x$no_sdl" = x ; then
2747 ifelse([$2], , :, [$2])
2750 if test "$SDL_CONFIG" = "no" ; then
2751 echo "*** The sdl-config script installed by SDL could not be found"
2752 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
2753 echo "*** your path, or set the SDL_CONFIG environment variable to the"
2754 echo "*** full path to sdl-config."
2756 if test -f conf.sdltest ; then
2759 echo "*** Could not run SDL test program, checking why..."
2760 CFLAGS="$CFLAGS $SDL_CFLAGS"
2761 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
2762 LIBS="$LIBS $SDL_LIBS"
2767 int main(int argc, char *argv[])
2770 #define main K_and_R_C_main
2772 [ echo "*** The test program compiled, but did not run. This usually means"
2773 echo "*** that the run-time linker is not finding SDL or finding the wrong"
2774 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
2775 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2776 echo "*** to the installed location Also, make sure you have run ldconfig if that"
2777 echo "*** is required on your system"
2779 echo "*** If you have an old version installed, it is best to remove it, although"
2780 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
2781 [ echo "*** The test program failed to compile or link. See the file config.log for the"
2782 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
2783 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
2784 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
2785 CFLAGS="$ac_save_CFLAGS"
2786 CXXFLAGS="$ac_save_CXXFLAGS"
2787 LIBS="$ac_save_LIBS"
2792 ifelse([$3], , :, [$3])
2794 AC_SUBST(SDL_CFLAGS)
2799 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
2801 # This file is free software; the Free Software Foundation
2802 # gives unlimited permission to copy and/or distribute it,
2803 # with or without modifications, as long as this notice is preserved.
2805 # AM_AUTOMAKE_VERSION(VERSION)
2806 # ----------------------------
2807 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2808 # generated from the m4 files accompanying Automake X.Y.
2809 # (This private macro should not be called outside this file.)
2810 AC_DEFUN([AM_AUTOMAKE_VERSION],
2811 [am__api_version='1.14'
2812 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2813 dnl require some minimum version. Point them to the right macro.
2814 m4_if([$1], [1.14.1], [],
2815 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2818 # _AM_AUTOCONF_VERSION(VERSION)
2819 # -----------------------------
2820 # aclocal traces this macro to find the Autoconf version.
2821 # This is a private macro too. Using m4_define simplifies
2822 # the logic in aclocal, which can simply ignore this definition.
2823 m4_define([_AM_AUTOCONF_VERSION], [])
2825 # AM_SET_CURRENT_AUTOMAKE_VERSION
2826 # -------------------------------
2827 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2828 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2829 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2830 [AM_AUTOMAKE_VERSION([1.14.1])dnl
2831 m4_ifndef([AC_AUTOCONF_VERSION],
2832 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2833 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2835 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
2837 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
2839 # This file is free software; the Free Software Foundation
2840 # gives unlimited permission to copy and/or distribute it,
2841 # with or without modifications, as long as this notice is preserved.
2843 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2844 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
2845 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
2847 # Of course, Automake must honor this variable whenever it calls a
2848 # tool from the auxiliary directory. The problem is that $srcdir (and
2849 # therefore $ac_aux_dir as well) can be either absolute or relative,
2850 # depending on how configure is run. This is pretty annoying, since
2851 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2852 # source directory, any form will work fine, but in subdirectories a
2853 # relative path needs to be adjusted first.
2855 # $ac_aux_dir/missing
2856 # fails when called from a subdirectory if $ac_aux_dir is relative
2857 # $top_srcdir/$ac_aux_dir/missing
2858 # fails if $ac_aux_dir is absolute,
2859 # fails when called from a subdirectory in a VPATH build with
2860 # a relative $ac_aux_dir
2862 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2863 # are both prefixed by $srcdir. In an in-source build this is usually
2864 # harmless because $srcdir is '.', but things will broke when you
2865 # start a VPATH build or use an absolute $srcdir.
2867 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2868 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2869 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2870 # and then we would define $MISSING as
2871 # MISSING="\${SHELL} $am_aux_dir/missing"
2872 # This will work as long as MISSING is not called from configure, because
2873 # unfortunately $(top_srcdir) has no meaning in configure.
2874 # However there are other variables, like CC, which are often used in
2875 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2877 # Another solution, used here, is to always expand $ac_aux_dir to an
2878 # absolute PATH. The drawback is that using absolute paths prevent a
2879 # configured tree to be moved without reconfiguration.
2881 AC_DEFUN([AM_AUX_DIR_EXPAND],
2882 [dnl Rely on autoconf to set up CDPATH properly.
2883 AC_PREREQ([2.50])dnl
2884 # expand $ac_aux_dir to an absolute path
2885 am_aux_dir=`cd $ac_aux_dir && pwd`
2888 # AM_CONDITIONAL -*- Autoconf -*-
2890 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
2892 # This file is free software; the Free Software Foundation
2893 # gives unlimited permission to copy and/or distribute it,
2894 # with or without modifications, as long as this notice is preserved.
2896 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2897 # -------------------------------------
2898 # Define a conditional.
2899 AC_DEFUN([AM_CONDITIONAL],
2900 [AC_PREREQ([2.52])dnl
2901 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
2902 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2903 AC_SUBST([$1_TRUE])dnl
2904 AC_SUBST([$1_FALSE])dnl
2905 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
2906 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
2907 m4_define([_AM_COND_VALUE_$1], [$2])dnl
2915 AC_CONFIG_COMMANDS_PRE(
2916 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2917 AC_MSG_ERROR([[conditional "$1" was never defined.
2918 Usually this means the macro was only invoked conditionally.]])
2921 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
2923 # This file is free software; the Free Software Foundation
2924 # gives unlimited permission to copy and/or distribute it,
2925 # with or without modifications, as long as this notice is preserved.
2928 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
2929 # written in clear, in which case automake, when reading aclocal.m4,
2930 # will think it sees a *use*, and therefore will trigger all it's
2931 # C support machinery. Also note that it means that autoscan, seeing
2932 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2935 # _AM_DEPENDENCIES(NAME)
2936 # ----------------------
2937 # See how the compiler implements dependency checking.
2938 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
2939 # We try a few techniques and use that to set a single cache variable.
2941 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2942 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2943 # dependency, and given that the user is not expected to run this macro,
2944 # just rely on AC_PROG_CC.
2945 AC_DEFUN([_AM_DEPENDENCIES],
2946 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2947 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2948 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2949 AC_REQUIRE([AM_DEP_TRACK])dnl
2951 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
2952 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
2953 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2954 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
2955 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
2956 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2957 [depcc="$$1" am_compiler_list=])
2959 AC_CACHE_CHECK([dependency style of $depcc],
2960 [am_cv_$1_dependencies_compiler_type],
2961 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2962 # We make a subdir and do the tests there. Otherwise we can end up
2963 # making bogus files that we don't know about and never remove. For
2964 # instance it was reported that on HP-UX the gcc test will end up
2965 # making a dummy file named 'D' -- because '-MD' means "put the output
2969 # Copy depcomp to subdir because otherwise we won't find it if we're
2970 # using a relative directory.
2971 cp "$am_depcomp" conftest.dir
2973 # We will build objects and dependencies in a subdirectory because
2974 # it helps to detect inapplicable dependency modes. For instance
2975 # both Tru64's cc and ICC support -MD to output dependencies as a
2976 # side effect of compilation, but ICC will put the dependencies in
2977 # the current directory while Tru64 will put them in the object
2981 am_cv_$1_dependencies_compiler_type=none
2982 if test "$am_compiler_list" = ""; then
2983 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2987 [case " $depcc " in #(
2988 *\ -arch\ *\ -arch\ *) am__universal=true ;;
2991 [case " $depcc " in #(
2992 *\ -arch\ *\ -arch\ *) am__universal=true ;;
2995 for depmode in $am_compiler_list; do
2996 # Setup a source with many dependencies, because some compilers
2997 # like to wrap large dependency lists on column 80 (with \), and
2998 # we should not choose a depcomp mode which is confused by this.
3000 # We need to recreate these files for each test, as the compiler may
3001 # overwrite some of them when testing with obscure command lines.
3002 # This happens at least with the AIX C compiler.
3004 for i in 1 2 3 4 5 6; do
3005 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3006 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3007 # Solaris 10 /bin/sh.
3008 echo '/* dummy */' > sub/conftst$i.h
3010 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3012 # We check with '-c' and '-o' for the sake of the "dashmstdout"
3013 # mode. It turns out that the SunPro C++ compiler does not properly
3014 # handle '-M -o', and we need to detect this. Also, some Intel
3015 # versions had trouble with output in subdirs.
3016 am__obj=sub/conftest.${OBJEXT-o}
3017 am__minus_obj="-o $am__obj"
3020 # This depmode causes a compiler race in universal mode.
3021 test "$am__universal" = false || continue
3024 # After this tag, mechanisms are not by side-effect, so they'll
3025 # only be used when explicitly requested.
3026 if test "x$enable_dependency_tracking" = xyes; then
3032 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3033 # This compiler won't grok '-c -o', but also, the minuso test has
3034 # not run yet. These depmodes are late enough in the game, and
3035 # so weak that their functioning should not be impacted.
3036 am__obj=conftest.${OBJEXT-o}
3041 if depmode=$depmode \
3042 source=sub/conftest.c object=$am__obj \
3043 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3044 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3045 >/dev/null 2>conftest.err &&
3046 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3047 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3048 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3049 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3050 # icc doesn't choke on unknown options, it will just issue warnings
3051 # or remarks (even with -Werror). So we grep stderr for any message
3052 # that says an option was ignored or not supported.
3053 # When given -MP, icc 7.0 and 7.1 complain thusly:
3054 # icc: Command line warning: ignoring option '-M'; no argument required
3055 # The diagnosis changed in icc 8.0:
3056 # icc: Command line remark: option '-MP' not supported
3057 if (grep 'ignoring option' conftest.err ||
3058 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3059 am_cv_$1_dependencies_compiler_type=$depmode
3068 am_cv_$1_dependencies_compiler_type=none
3071 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3072 AM_CONDITIONAL([am__fastdep$1], [
3073 test "x$enable_dependency_tracking" != xno \
3074 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3080 # Choose a directory name for dependency files.
3081 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3082 AC_DEFUN([AM_SET_DEPDIR],
3083 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3084 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3090 AC_DEFUN([AM_DEP_TRACK],
3091 [AC_ARG_ENABLE([dependency-tracking], [dnl
3093 [--enable-dependency-tracking],
3094 [do not reject slow dependency extractors])
3096 [--disable-dependency-tracking],
3097 [speeds up one-time build])])
3098 if test "x$enable_dependency_tracking" != xno; then
3099 am_depcomp="$ac_aux_dir/depcomp"
3103 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3104 AC_SUBST([AMDEPBACKSLASH])dnl
3105 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3106 AC_SUBST([am__nodep])dnl
3107 _AM_SUBST_NOTMAKE([am__nodep])dnl
3110 # Generate code to set up dependency tracking. -*- Autoconf -*-
3112 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
3114 # This file is free software; the Free Software Foundation
3115 # gives unlimited permission to copy and/or distribute it,
3116 # with or without modifications, as long as this notice is preserved.
3119 # _AM_OUTPUT_DEPENDENCY_COMMANDS
3120 # ------------------------------
3121 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3123 # Older Autoconf quotes --file arguments for eval, but not when files
3124 # are listed without --file. Let's play safe and only enable the eval
3125 # if we detect the quoting.
3126 case $CONFIG_FILES in
3127 *\'*) eval set x "$CONFIG_FILES" ;;
3128 *) set x $CONFIG_FILES ;;
3133 # Strip MF so we end up with the name of the file.
3134 mf=`echo "$mf" | sed -e 's/:.*$//'`
3135 # Check whether this is an Automake generated Makefile or not.
3136 # We used to match only the files named 'Makefile.in', but
3137 # some people rename them; so instead we look at the file content.
3138 # Grep'ing the first line is not enough: some people post-process
3139 # each Makefile.in and add a new line on top of each file to say so.
3140 # Grep'ing the whole file is not good either: AIX grep has a line
3141 # limit of 2048, but all sed's we know have understand at least 4000.
3142 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3143 dirpart=`AS_DIRNAME("$mf")`
3147 # Extract the definition of DEPDIR, am__include, and am__quote
3148 # from the Makefile without running 'make'.
3149 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3150 test -z "$DEPDIR" && continue
3151 am__include=`sed -n 's/^am__include = //p' < "$mf"`
3152 test -z "$am__include" && continue
3153 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3154 # Find all dependency output files, they are included files with
3155 # $(DEPDIR) in their names. We invoke sed twice because it is the
3156 # simplest approach to changing $(DEPDIR) to its actual value in the
3158 for file in `sed -n "
3159 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3160 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
3161 # Make sure the directory exists.
3162 test -f "$dirpart/$file" && continue
3163 fdir=`AS_DIRNAME(["$file"])`
3164 AS_MKDIR_P([$dirpart/$fdir])
3165 # echo "creating $dirpart/$file"
3166 echo '# dummy' > "$dirpart/$file"
3170 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3173 # AM_OUTPUT_DEPENDENCY_COMMANDS
3174 # -----------------------------
3175 # This macro should only be invoked once -- use via AC_REQUIRE.
3177 # This code is only required when automatic dependency tracking
3178 # is enabled. FIXME. This creates each '.P' file that we will
3179 # need in order to bootstrap the dependency handling code.
3180 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3181 [AC_CONFIG_COMMANDS([depfiles],
3182 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3183 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3186 # Do all the work for Automake. -*- Autoconf -*-
3188 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3190 # This file is free software; the Free Software Foundation
3191 # gives unlimited permission to copy and/or distribute it,
3192 # with or without modifications, as long as this notice is preserved.
3194 # This macro actually does too much. Some checks are only needed if
3195 # your package does certain things. But this isn't really a big deal.
3197 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
3198 m4_define([AC_PROG_CC],
3199 m4_defn([AC_PROG_CC])
3203 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3204 # AM_INIT_AUTOMAKE([OPTIONS])
3205 # -----------------------------------------------
3206 # The call with PACKAGE and VERSION arguments is the old style
3207 # call (pre autoconf-2.50), which is being phased out. PACKAGE
3208 # and VERSION should now be passed to AC_INIT and removed from
3209 # the call to AM_INIT_AUTOMAKE.
3210 # We support both call styles for the transition. After
3211 # the next Automake release, Autoconf can make the AC_INIT
3212 # arguments mandatory, and then we can depend on a new Autoconf
3213 # release and drop the old call support.
3214 AC_DEFUN([AM_INIT_AUTOMAKE],
3215 [AC_PREREQ([2.65])dnl
3216 dnl Autoconf wants to disallow AM_ names. We explicitly allow
3217 dnl the ones we care about.
3218 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3219 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3220 AC_REQUIRE([AC_PROG_INSTALL])dnl
3221 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3222 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3223 # is not polluted with repeated "-I."
3224 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3225 # test to see if srcdir already configured
3226 if test -f $srcdir/config.status; then
3227 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3231 # test whether we have cygpath
3232 if test -z "$CYGPATH_W"; then
3233 if (cygpath --version) >/dev/null 2>/dev/null; then
3234 CYGPATH_W='cygpath -w'
3239 AC_SUBST([CYGPATH_W])
3241 # Define the identity of the package.
3242 dnl Distinguish between old-style and new-style calls.
3244 [AC_DIAGNOSE([obsolete],
3245 [$0: two- and three-arguments forms are deprecated.])
3246 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3247 AC_SUBST([PACKAGE], [$1])dnl
3248 AC_SUBST([VERSION], [$2])],
3249 [_AM_SET_OPTIONS([$1])dnl
3250 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3252 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
3254 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3255 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3256 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3258 _AM_IF_OPTION([no-define],,
3259 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
3260 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
3262 # Some tools Automake needs.
3263 AC_REQUIRE([AM_SANITY_CHECK])dnl
3264 AC_REQUIRE([AC_ARG_PROGRAM])dnl
3265 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
3266 AM_MISSING_PROG([AUTOCONF], [autoconf])
3267 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
3268 AM_MISSING_PROG([AUTOHEADER], [autoheader])
3269 AM_MISSING_PROG([MAKEINFO], [makeinfo])
3270 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3271 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3272 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3273 # For better backward compatibility. To be removed once Automake 1.9.x
3274 # dies out for good. For more background, see:
3275 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3276 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3277 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
3278 # We need awk for the "check" target. The system "awk" is bad on
3280 AC_REQUIRE([AC_PROG_AWK])dnl
3281 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3282 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3283 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3284 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3285 [_AM_PROG_TAR([v7])])])
3286 _AM_IF_OPTION([no-dependencies],,
3287 [AC_PROVIDE_IFELSE([AC_PROG_CC],
3288 [_AM_DEPENDENCIES([CC])],
3289 [m4_define([AC_PROG_CC],
3290 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
3291 AC_PROVIDE_IFELSE([AC_PROG_CXX],
3292 [_AM_DEPENDENCIES([CXX])],
3293 [m4_define([AC_PROG_CXX],
3294 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
3295 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3296 [_AM_DEPENDENCIES([OBJC])],
3297 [m4_define([AC_PROG_OBJC],
3298 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
3299 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
3300 [_AM_DEPENDENCIES([OBJCXX])],
3301 [m4_define([AC_PROG_OBJCXX],
3302 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
3304 AC_REQUIRE([AM_SILENT_RULES])dnl
3305 dnl The testsuite driver may need to know about EXEEXT, so add the
3306 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
3307 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
3308 AC_CONFIG_COMMANDS_PRE(dnl
3309 [m4_provide_if([_AM_COMPILER_EXEEXT],
3310 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3312 # POSIX will say in a future version that running "rm -f" with no argument
3313 # is OK; and we want to be able to make that assumption in our Makefile
3314 # recipes. So use an aggressive probe to check that the usage we want is
3315 # actually supported "in the wild" to an acceptable degree.
3316 # See automake bug#10828.
3317 # To make any issue more visible, cause the running configure to be aborted
3318 # by default if the 'rm' program in use doesn't match our expectations; the
3319 # user can still override this though.
3320 if rm -f && rm -fr && rm -rf; then : OK; else
3324 Your 'rm' program seems unable to run without file operands specified
3325 on the command line, even when the '-f' option is present. This is contrary
3326 to the behaviour of most rm programs out there, and not conforming with
3327 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3329 Please tell bug-automake@gnu.org about your system, including the value
3330 of your $PATH and any error possibly output before this message. This
3331 can help us improve future automake versions.
3334 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3335 echo 'Configuration will proceed anyway, since you have set the' >&2
3336 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3340 Aborting the configuration process, to ensure you take notice of the issue.
3342 You can download and install GNU coreutils to get an 'rm' implementation
3343 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3345 If you want to complete the configuration process using your problematic
3346 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3347 to "yes", and re-run configure.
3350 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
3354 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
3355 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3356 dnl mangled by Autoconf and run in a shell conditional statement.
3357 m4_define([_AC_COMPILER_EXEEXT],
3358 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3360 # When config.status generates a header, we must update the stamp-h file.
3361 # This file resides in the same directory as the config header
3362 # that is generated. The stamp files are numbered to have different names.
3364 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3365 # loop where config.status creates the headers, so we can generate
3366 # our stamp files there.
3367 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3368 [# Compute $1's index in $config_headers.
3371 for _am_header in $config_headers :; do
3373 $_am_arg | $_am_arg:* )
3376 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3379 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3381 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3383 # This file is free software; the Free Software Foundation
3384 # gives unlimited permission to copy and/or distribute it,
3385 # with or without modifications, as long as this notice is preserved.
3387 # AM_PROG_INSTALL_SH
3388 # ------------------
3389 # Define $install_sh.
3390 AC_DEFUN([AM_PROG_INSTALL_SH],
3391 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3392 if test x"${install_sh}" != xset; then
3395 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3397 install_sh="\${SHELL} $am_aux_dir/install-sh"
3400 AC_SUBST([install_sh])])
3402 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
3404 # This file is free software; the Free Software Foundation
3405 # gives unlimited permission to copy and/or distribute it,
3406 # with or without modifications, as long as this notice is preserved.
3408 # Check whether the underlying file-system supports filenames
3409 # with a leading dot. For instance MS-DOS doesn't.
3410 AC_DEFUN([AM_SET_LEADING_DOT],
3411 [rm -rf .tst 2>/dev/null
3412 mkdir .tst 2>/dev/null
3413 if test -d .tst; then
3418 rmdir .tst 2>/dev/null
3419 AC_SUBST([am__leading_dot])])
3421 # Check to see how 'make' treats includes. -*- Autoconf -*-
3423 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3425 # This file is free software; the Free Software Foundation
3426 # gives unlimited permission to copy and/or distribute it,
3427 # with or without modifications, as long as this notice is preserved.
3431 # Check to see how make treats includes.
3432 AC_DEFUN([AM_MAKE_INCLUDE],
3433 [am_make=${MAKE-make}
3434 cat > confinc << 'END'
3436 @echo this is the am__doit target
3439 # If we don't find an include directive, just comment out the code.
3440 AC_MSG_CHECKING([for style of include used by $am_make])
3444 # First try GNU make style include.
3445 echo "include confinc" > confmf
3446 # Ignore all kinds of additional output from 'make'.
3447 case `$am_make -s -f confmf 2> /dev/null` in #(
3448 *the\ am__doit\ target*)
3454 # Now try BSD make style include.
3455 if test "$am__include" = "#"; then
3456 echo '.include "confinc"' > confmf
3457 case `$am_make -s -f confmf 2> /dev/null` in #(
3458 *the\ am__doit\ target*)
3459 am__include=.include
3465 AC_SUBST([am__include])
3466 AC_SUBST([am__quote])
3467 AC_MSG_RESULT([$_am_result])
3468 rm -f confinc confmf
3471 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3473 # Copyright (C) 1997-2013 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.
3479 # AM_MISSING_PROG(NAME, PROGRAM)
3480 # ------------------------------
3481 AC_DEFUN([AM_MISSING_PROG],
3482 [AC_REQUIRE([AM_MISSING_HAS_RUN])
3483 $1=${$1-"${am_missing_run}$2"}
3486 # AM_MISSING_HAS_RUN
3487 # ------------------
3488 # Define MISSING if not defined so far and test if it is modern enough.
3489 # If it is, set am_missing_run to use it, otherwise, to nothing.
3490 AC_DEFUN([AM_MISSING_HAS_RUN],
3491 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3492 AC_REQUIRE_AUX_FILE([missing])dnl
3493 if test x"${MISSING+set}" != xset; then
3496 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3498 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3501 # Use eval to expand $SHELL
3502 if eval "$MISSING --is-lightweight"; then
3503 am_missing_run="$MISSING "
3506 AC_MSG_WARN(['missing' script is too old or missing])
3511 # Obsolete and "removed" macros, that must however still report explicit
3512 # error messages when used, to smooth transition.
3514 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
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.
3520 AC_DEFUN([AM_CONFIG_HEADER],
3521 [AC_DIAGNOSE([obsolete],
3522 ['$0': this macro is obsolete.
3523 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
3524 AC_CONFIG_HEADERS($@)])
3526 AC_DEFUN([AM_PROG_CC_STDC],
3528 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
3529 AC_DIAGNOSE([obsolete],
3530 ['$0': this macro is obsolete.
3531 You should simply use the 'AC][_PROG_CC' macro instead.
3532 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
3533 but upon 'ac_cv_prog_cc_stdc'.])])
3535 AC_DEFUN([AM_C_PROTOTYPES],
3536 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
3537 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
3539 # Helper functions for option handling. -*- Autoconf -*-
3541 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3543 # This file is free software; the Free Software Foundation
3544 # gives unlimited permission to copy and/or distribute it,
3545 # with or without modifications, as long as this notice is preserved.
3547 # _AM_MANGLE_OPTION(NAME)
3548 # -----------------------
3549 AC_DEFUN([_AM_MANGLE_OPTION],
3550 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3552 # _AM_SET_OPTION(NAME)
3553 # --------------------
3554 # Set option NAME. Presently that only means defining a flag for this option.
3555 AC_DEFUN([_AM_SET_OPTION],
3556 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
3558 # _AM_SET_OPTIONS(OPTIONS)
3559 # ------------------------
3560 # OPTIONS is a space-separated list of Automake options.
3561 AC_DEFUN([_AM_SET_OPTIONS],
3562 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3564 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3565 # -------------------------------------------
3566 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3567 AC_DEFUN([_AM_IF_OPTION],
3568 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3570 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
3572 # This file is free software; the Free Software Foundation
3573 # gives unlimited permission to copy and/or distribute it,
3574 # with or without modifications, as long as this notice is preserved.
3578 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
3579 # to automatically call this.
3580 AC_DEFUN([_AM_PROG_CC_C_O],
3581 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3582 AC_REQUIRE_AUX_FILE([compile])dnl
3583 AC_LANG_PUSH([C])dnl
3585 [whether $CC understands -c and -o together],
3586 [am_cv_prog_cc_c_o],
3587 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
3588 # Make sure it works both with $CC and with simple cc.
3589 # Following AC_PROG_CC_C_O, we do the test twice because some
3590 # compilers refuse to overwrite an existing .o file with -o,
3591 # though they will create one.
3592 am_cv_prog_cc_c_o=yes
3594 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
3595 && test -f conftest2.$ac_objext; then
3598 am_cv_prog_cc_c_o=no
3602 rm -f core conftest*
3604 if test "$am_cv_prog_cc_c_o" != yes; then
3605 # Losing compiler, so override with the script.
3606 # FIXME: It is wrong to rewrite CC.
3607 # But if we don't then we get into trouble of one sort or another.
3608 # A longer-term fix would be to have automake use am__CC in this case,
3609 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3610 CC="$am_aux_dir/compile $CC"
3614 # For backward compatibility.
3615 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
3617 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3619 # This file is free software; the Free Software Foundation
3620 # gives unlimited permission to copy and/or distribute it,
3621 # with or without modifications, as long as this notice is preserved.
3623 # AM_RUN_LOG(COMMAND)
3624 # -------------------
3625 # Run COMMAND, save the exit status in ac_status, and log it.
3626 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
3627 AC_DEFUN([AM_RUN_LOG],
3628 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
3629 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
3631 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3632 (exit $ac_status); }])
3634 # Check to make sure that the build environment is sane. -*- Autoconf -*-
3636 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3638 # This file is free software; the Free Software Foundation
3639 # gives unlimited permission to copy and/or distribute it,
3640 # with or without modifications, as long as this notice is preserved.
3644 AC_DEFUN([AM_SANITY_CHECK],
3645 [AC_MSG_CHECKING([whether build environment is sane])
3646 # Reject unsafe characters in $srcdir or the absolute working directory
3647 # name. Accept space and tab only in the latter.
3651 *[[\\\"\#\$\&\'\`$am_lf]]*)
3652 AC_MSG_ERROR([unsafe absolute working directory name]);;
3655 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
3656 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
3659 # Do 'set' in a subshell so we don't clobber the current shell's
3660 # arguments. Must try -L first in case configure is actually a
3661 # symlink; some systems play weird games with the mod time of symlinks
3662 # (eg FreeBSD returns the mod time of the symlink's containing
3666 for am_try in 1 2; do
3667 echo "timestamp, slept: $am_has_slept" > conftest.file
3668 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3669 if test "$[*]" = "X"; then
3671 set X `ls -t "$srcdir/configure" conftest.file`
3673 if test "$[*]" != "X $srcdir/configure conftest.file" \
3674 && test "$[*]" != "X conftest.file $srcdir/configure"; then
3676 # If neither matched, then we have a broken ls. This can happen
3677 # if, for instance, CONFIG_SHELL is bash and it inherits a
3678 # broken ls alias from the environment. This has actually
3679 # happened. Such a system could not be considered "sane".
3680 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
3681 alias in your environment])
3683 if test "$[2]" = conftest.file || test $am_try -eq 2; then
3690 test "$[2]" = conftest.file
3696 AC_MSG_ERROR([newly created file is older than distributed files!
3697 Check your system clock])
3699 AC_MSG_RESULT([yes])
3700 # If we didn't sleep, we still need to ensure time stamps of config.status and
3701 # generated files are strictly newer.
3703 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3707 AC_CONFIG_COMMANDS_PRE(
3708 [AC_MSG_CHECKING([that generated files are newer than configure])
3709 if test -n "$am_sleep_pid"; then
3710 # Hide warnings about reused PIDs.
3711 wait $am_sleep_pid 2>/dev/null
3713 AC_MSG_RESULT([done])])
3717 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
3719 # This file is free software; the Free Software Foundation
3720 # gives unlimited permission to copy and/or distribute it,
3721 # with or without modifications, as long as this notice is preserved.
3723 # AM_SILENT_RULES([DEFAULT])
3724 # --------------------------
3725 # Enable less verbose build rules; with the default set to DEFAULT
3726 # ("yes" being less verbose, "no" or empty being verbose).
3727 AC_DEFUN([AM_SILENT_RULES],
3728 [AC_ARG_ENABLE([silent-rules], [dnl
3730 [--enable-silent-rules],
3731 [less verbose build output (undo: "make V=1")])
3733 [--disable-silent-rules],
3734 [verbose build output (undo: "make V=0")])dnl
3736 case $enable_silent_rules in @%:@ (((
3737 yes) AM_DEFAULT_VERBOSITY=0;;
3738 no) AM_DEFAULT_VERBOSITY=1;;
3739 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
3742 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
3743 dnl do not support nested variable expansions.
3744 dnl See automake bug#9928 and bug#10237.
3745 am_make=${MAKE-make}
3746 AC_CACHE_CHECK([whether $am_make supports nested variables],
3747 [am_cv_make_support_nested_variables],
3748 [if AS_ECHO([['TRUE=$(BAR$(V))
3754 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
3755 am_cv_make_support_nested_variables=yes
3757 am_cv_make_support_nested_variables=no
3759 if test $am_cv_make_support_nested_variables = yes; then
3760 dnl Using '$V' instead of '$(V)' breaks IRIX make.
3762 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3764 AM_V=$AM_DEFAULT_VERBOSITY
3765 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3768 AM_SUBST_NOTMAKE([AM_V])dnl
3769 AC_SUBST([AM_DEFAULT_V])dnl
3770 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
3771 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
3773 AC_SUBST([AM_BACKSLASH])dnl
3774 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
3777 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
3779 # This file is free software; the Free Software Foundation
3780 # gives unlimited permission to copy and/or distribute it,
3781 # with or without modifications, as long as this notice is preserved.
3783 # AM_PROG_INSTALL_STRIP
3784 # ---------------------
3785 # One issue with vendor 'install' (even GNU) is that you can't
3786 # specify the program used to strip binaries. This is especially
3787 # annoying in cross-compiling environments, where the build's strip
3788 # is unlikely to handle the host's binaries.
3789 # Fortunately install-sh will honor a STRIPPROG variable, so we
3790 # always use install-sh in "make install-strip", and initialize
3791 # STRIPPROG with the value of the STRIP variable (set by the user).
3792 AC_DEFUN([AM_PROG_INSTALL_STRIP],
3793 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3794 # Installed binaries are usually stripped using 'strip' when the user
3795 # run "make install-strip". However 'strip' might not be the right
3796 # tool to use in cross-compilation environments, therefore Automake
3797 # will honor the 'STRIP' environment variable to overrule this program.
3798 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
3799 if test "$cross_compiling" != no; then
3800 AC_CHECK_TOOL([STRIP], [strip], :)
3802 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3803 AC_SUBST([INSTALL_STRIP_PROGRAM])])
3805 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
3807 # This file is free software; the Free Software Foundation
3808 # gives unlimited permission to copy and/or distribute it,
3809 # with or without modifications, as long as this notice is preserved.
3811 # _AM_SUBST_NOTMAKE(VARIABLE)
3812 # ---------------------------
3813 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
3814 # This macro is traced by Automake.
3815 AC_DEFUN([_AM_SUBST_NOTMAKE])
3817 # AM_SUBST_NOTMAKE(VARIABLE)
3818 # --------------------------
3819 # Public sister of _AM_SUBST_NOTMAKE.
3820 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
3822 # Check how to create a tarball. -*- Autoconf -*-
3824 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
3826 # This file is free software; the Free Software Foundation
3827 # gives unlimited permission to copy and/or distribute it,
3828 # with or without modifications, as long as this notice is preserved.
3830 # _AM_PROG_TAR(FORMAT)
3831 # --------------------
3832 # Check how to create a tarball in format FORMAT.
3833 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
3835 # Substitute a variable $(am__tar) that is a command
3836 # writing to stdout a FORMAT-tarball containing the directory
3838 # tardir=directory && $(am__tar) > result.tar
3840 # Substitute a variable $(am__untar) that extract such
3841 # a tarball read from stdin.
3842 # $(am__untar) < result.tar
3844 AC_DEFUN([_AM_PROG_TAR],
3845 [# Always define AMTAR for backward compatibility. Yes, it's still used
3846 # in the wild :-( We should find a proper way to deprecate it ...
3847 AC_SUBST([AMTAR], ['$${TAR-tar}'])
3849 # We'll loop over all known methods to create a tar archive until one works.
3850 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
3853 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
3857 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
3858 # There is notably a 21 bits limit for the UID and the GID. In fact,
3859 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
3861 am_max_uid=2097151 # 2^21 - 1
3862 am_max_gid=$am_max_uid
3863 # The $UID and $GID variables are not portable, so we need to resort
3864 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
3865 # below are definitely unexpected, so allow the users to see them
3866 # (that is, avoid stderr redirection).
3867 am_uid=`id -u || echo unknown`
3868 am_gid=`id -g || echo unknown`
3869 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
3870 if test $am_uid -le $am_max_uid; then
3871 AC_MSG_RESULT([yes])
3876 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
3877 if test $am_gid -le $am_max_gid; then
3878 AC_MSG_RESULT([yes])
3887 [m4_fatal([Unknown tar format])])
3889 AC_MSG_CHECKING([how to create a $1 tar archive])
3891 # Go ahead even if we have the value already cached. We do so because we
3892 # need to set the values for the 'am__tar' and 'am__untar' variables.
3893 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
3895 for _am_tool in $_am_tools; do
3898 for _am_tar in tar gnutar gtar; do
3899 AM_RUN_LOG([$_am_tar --version]) && break
3901 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
3902 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
3903 am__untar="$_am_tar -xf -"
3906 # Must skip GNU tar: if it does not support --format= it doesn't create
3907 # ustar tarball either.
3908 (tar --version) >/dev/null 2>&1 && continue
3909 am__tar='tar chf - "$$tardir"'
3910 am__tar_='tar chf - "$tardir"'
3911 am__untar='tar xf -'
3914 am__tar='pax -L -x $1 -w "$$tardir"'
3915 am__tar_='pax -L -x $1 -w "$tardir"'
3919 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3920 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3921 am__untar='cpio -i -H $1 -d'
3930 # If the value was cached, stop now. We just wanted to have am__tar
3931 # and am__untar set.
3932 test -n "${am_cv_prog_tar_$1}" && break
3934 # tar/untar a dummy directory, and stop if the command works.
3937 echo GrepMe > conftest.dir/file
3938 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
3940 if test -s conftest.tar; then
3941 AM_RUN_LOG([$am__untar <conftest.tar])
3942 AM_RUN_LOG([cat conftest.dir/file])
3943 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3948 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
3949 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
3952 AC_SUBST([am__untar])
3955 m4_include([m4/ax_check_gl.m4])
3956 m4_include([m4/ax_lang_compiler_ms.m4])