1 # generated automatically by aclocal 1.13.3 -*- 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 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
24 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
26 # This file is free software, distributed under the terms of the GNU
27 # General Public License. As a special exception to the GNU General
28 # Public License, this file may be distributed as part of a program
29 # that contains a configuration script generated by Autoconf, under
30 # the same distribution terms as the rest of that program.
32 # This file can be copied and used freely without restrictions. It can
33 # be used in projects which are not available under the GNU Public License
34 # but which still want to provide support for the GNU gettext functionality.
36 # Macro to add for using GNU gettext.
37 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
39 # Modified to never use included libintl.
40 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
42 # Major rework to remove unused code
43 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
45 # Added better handling of ALL_LINGUAS from GNU gettext version
46 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
48 # Modified to require ngettext
49 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
51 # We need this here as well, since someone might use autoconf-2.5x
52 # to configure GLib then an older version to configure a package
53 # using AM_GLIB_GNU_GETTEXT
57 dnl We go to great lengths to make sure that aclocal won't
58 dnl try to pull in the installed version of these macros
59 dnl when running aclocal in the glib directory.
61 m4_copy([AC_DEFUN],[glib_DEFUN])
62 m4_copy([AC_REQUIRE],[glib_REQUIRE])
64 dnl At the end, if we're not within glib, we'll define the public
65 dnl definitions in terms of our private definitions.
70 glib_DEFUN([GLIB_LC_MESSAGES],
71 [AC_CHECK_HEADERS([locale.h])
72 if test $ac_cv_header_locale_h = yes; then
73 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76 if test $am_cv_val_LC_MESSAGES = yes; then
77 AC_DEFINE(HAVE_LC_MESSAGES, 1,
78 [Define if your <locale.h> file defines LC_MESSAGES.])
82 # GLIB_PATH_PROG_WITH_TEST
83 #----------------------------
84 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87 [# Extract the first word of "$2", so it can be a program name with args.
88 set dummy $2; ac_word=[$]2
89 AC_MSG_CHECKING([for $ac_word])
90 AC_CACHE_VAL(ac_cv_path_$1,
93 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
96 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97 for ac_dir in ifelse([$5], , $PATH, [$5]); do
98 test -z "$ac_dir" && ac_dir=.
99 if test -f $ac_dir/$ac_word; then
101 ac_cv_path_$1="$ac_dir/$ac_word"
107 dnl If no 4th arg is given, leave the cache variable unset,
108 dnl so AC_PATH_PROGS will keep looking.
109 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
114 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
124 glib_DEFUN([GLIB_WITH_NLS],
125 dnl NLS is obligatory
129 gt_cv_have_gettext=no
135 AC_CHECK_HEADER(libintl.h,
136 [gt_cv_func_dgettext_libintl="no"
137 libintl_extra_libs=""
140 # First check in libc
142 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
146 [return !ngettext ("","", 1)],
147 gt_cv_func_ngettext_libc=yes,
148 gt_cv_func_ngettext_libc=no)
151 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
156 [return !dgettext ("","")],
157 gt_cv_func_dgettext_libc=yes,
158 gt_cv_func_dgettext_libc=no)
162 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163 AC_CHECK_FUNCS(bind_textdomain_codeset)
167 # If we don't have everything we want, check in libintl
169 if test "$gt_cv_func_dgettext_libc" != "yes" \
170 || test "$gt_cv_func_ngettext_libc" != "yes" \
171 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
173 AC_CHECK_LIB(intl, bindtextdomain,
174 [AC_CHECK_LIB(intl, ngettext,
175 [AC_CHECK_LIB(intl, dgettext,
176 gt_cv_func_dgettext_libintl=yes)])])
178 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179 AC_MSG_CHECKING([if -liconv is needed to use gettext])
181 AC_CHECK_LIB(intl, ngettext,
182 [AC_CHECK_LIB(intl, dcgettext,
183 [gt_cv_func_dgettext_libintl=yes
184 libintl_extra_libs=-liconv],
190 # If we found libintl, then check in it for bind_textdomain_codeset();
191 # we'll prefer libc if neither have bind_textdomain_codeset(),
192 # and both have dgettext and ngettext
194 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195 glib_save_LIBS="$LIBS"
196 LIBS="$LIBS -lintl $libintl_extra_libs"
197 unset ac_cv_func_bind_textdomain_codeset
198 AC_CHECK_FUNCS(bind_textdomain_codeset)
199 LIBS="$glib_save_LIBS"
201 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202 gt_cv_func_dgettext_libc=no
204 if test "$gt_cv_func_dgettext_libc" = "yes" \
205 && test "$gt_cv_func_ngettext_libc" = "yes"; then
206 gt_cv_func_dgettext_libintl=no
212 if test "$gt_cv_func_dgettext_libc" = "yes" \
213 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
214 gt_cv_have_gettext=yes
217 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218 INTLLIBS="-lintl $libintl_extra_libs"
221 if test "$gt_cv_have_gettext" = "yes"; then
222 AC_DEFINE(HAVE_GETTEXT,1,
223 [Define if the GNU gettext() function is already present or preinstalled.])
224 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226 if test "$MSGFMT" != "no"; then
227 glib_save_LIBS="$LIBS"
228 LIBS="$LIBS $INTLLIBS"
229 AC_CHECK_FUNCS(dcgettext)
231 AC_MSG_CHECKING([if msgfmt accepts -c])
232 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
235 "Content-Type: text/plain; charset=UTF-8\n"
236 "Project-Id-Version: test 1.0\n"
237 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
238 "Last-Translator: test <foo@bar.xx>\n"
239 "Language-Team: C <LL@li.org>\n"
240 "MIME-Version: 1.0\n"
241 "Content-Transfer-Encoding: 8bit\n"
242 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243 AC_SUBST(MSGFMT_OPTS)
244 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248 return _nl_msg_cat_cntr],
253 dnl On Solaris, if bind_textdomain_codeset is in libc,
254 dnl GNU format message catalog is always supported,
255 dnl since both are added to the libc all together.
256 dnl Hence, we'd like to go with DATADIRNAME=share and
257 dnl and CATOBJEXT=.gmo in this case.
258 AC_CHECK_FUNC(bind_textdomain_codeset,
273 LIBS="$glib_save_LIBS"
276 gt_cv_have_gettext=no
281 if test "$gt_cv_have_gettext" = "yes" ; then
282 AC_DEFINE(ENABLE_NLS, 1,
283 [always defined to indicate that i18n is enabled])
286 dnl Test whether we really found GNU xgettext.
287 if test "$XGETTEXT" != ":"; then
288 dnl If it is not GNU xgettext we define it as : so that the
289 dnl Makefiles still can work.
290 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
294 [found xgettext program is not GNU xgettext; ignore it])
299 # We need to process the po/ directory.
303 [case "$CONFIG_FILES" in *po/Makefile.in*)
304 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
307 dnl These rules are solely for the distribution goal. While doing this
308 dnl we only have to keep exactly one list of the available catalogs
310 for lang in $ALL_LINGUAS; do
311 GMOFILES="$GMOFILES $lang.gmo"
312 POFILES="$POFILES $lang.po"
315 dnl Make all variables we use known to autoconf.
318 AC_SUBST(DATADIRNAME)
322 AC_SUBST(PO_IN_DATADIR_TRUE)
323 AC_SUBST(PO_IN_DATADIR_FALSE)
328 # AM_GLIB_GNU_GETTEXT
329 # -------------------
330 # Do checks necessary for use of gettext. If a suitable implementation
331 # of gettext is found in either in libintl or in the C library,
332 # it will set INTLLIBS to the libraries needed for use of gettext
333 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335 # on various variables needed by the Makefile.in.in installed by
338 glib_DEFUN([GLIB_GNU_GETTEXT],
339 [AC_REQUIRE([AC_PROG_CC])dnl
344 if test "$gt_cv_have_gettext" = "yes"; then
345 if test "x$ALL_LINGUAS" = "x"; then
348 AC_MSG_CHECKING(for catalogs to be installed)
350 for presentlang in $ALL_LINGUAS; do
352 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353 desiredlanguages="$LINGUAS"
355 desiredlanguages="$ALL_LINGUAS"
357 for desiredlang in $desiredlanguages; do
358 # Use the presentlang catalog if desiredlang is
359 # a. equal to presentlang, or
360 # b. a variant of presentlang (because in this case,
361 # presentlang can be used as a fallback for messages
362 # which are not translated in the desiredlang catalog).
363 case "$desiredlang" in
364 "$presentlang"*) useit=yes;;
367 if test $useit = yes; then
368 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
372 AC_MSG_RESULT($LINGUAS)
375 dnl Construct list of names of catalog files to be constructed.
376 if test -n "$LINGUAS"; then
377 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
381 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383 dnl Try to locate is.
385 if test -n "$ac_aux_dir"; then
386 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
388 if test -z "$MKINSTALLDIRS"; then
389 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
391 AC_SUBST(MKINSTALLDIRS)
393 dnl Generate list of files to be processed by xgettext which will
394 dnl be included in po/Makefile.
395 test -d po || mkdir po
396 if test "x$srcdir" != "x."; then
397 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398 posrcprefix="$srcdir/"
400 posrcprefix="../$srcdir/"
406 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407 < $srcdir/po/POTFILES.in > po/POTFILES
410 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
411 # -------------------------------
412 # Define VARIABLE to the location where catalog files will
413 # be installed by po/Makefile.
414 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
415 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
416 glib_save_prefix="$prefix"
417 glib_save_exec_prefix="$exec_prefix"
418 glib_save_datarootdir="$datarootdir"
419 test "x$prefix" = xNONE && prefix=$ac_default_prefix
420 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
421 datarootdir=`eval echo "${datarootdir}"`
422 if test "x$CATOBJEXT" = "x.mo" ; then
423 localedir=`eval echo "${libdir}/locale"`
425 localedir=`eval echo "${datadir}/locale"`
427 prefix="$glib_save_prefix"
428 exec_prefix="$glib_save_exec_prefix"
429 datarootdir="$glib_save_datarootdir"
430 AC_DEFINE_UNQUOTED($1, "$localedir",
431 [Define the location where the catalogs will be installed])
435 dnl Now the definitions that aclocal will find
437 ifdef(glib_configure_ac,[],[
438 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
439 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
442 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
444 # Create a temporary file with TEST-FILE as its contents and pass the
445 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
446 # 0 and perform ACTION-IF-FAIL for any other exit status.
447 AC_DEFUN([GLIB_RUN_PROG],
448 [cat >conftest.foo <<_ACEOF
451 if AC_RUN_LOG([$1 conftest.foo]); then
452 m4_ifval([$3], [$3], [:])
453 m4_ifvaln([$4], [else $4])dnl
454 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
455 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
459 # nls.m4 serial 5 (gettext-0.18)
460 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
462 dnl This file is free software; the Free Software Foundation
463 dnl gives unlimited permission to copy and/or distribute it,
464 dnl with or without modifications, as long as this notice is preserved.
466 dnl This file can can be used in projects which are not available under
467 dnl the GNU General Public License or the GNU Library General Public
468 dnl License but which still want to provide support for the GNU gettext
470 dnl Please note that the actual code of the GNU gettext library is covered
471 dnl by the GNU Library General Public License, and the rest of the GNU
472 dnl gettext package package is covered by the GNU General Public License.
473 dnl They are *not* in the public domain.
476 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
477 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
483 AC_MSG_CHECKING([whether NLS is requested])
484 dnl Default is enabled NLS
486 [ --disable-nls do not use Native Language Support],
487 USE_NLS=$enableval, USE_NLS=yes)
488 AC_MSG_RESULT([$USE_NLS])
492 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
493 # serial 1 (pkg-config-0.24)
495 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
497 # This program is free software; you can redistribute it and/or modify
498 # it under the terms of the GNU General Public License as published by
499 # the Free Software Foundation; either version 2 of the License, or
500 # (at your option) any later version.
502 # This program is distributed in the hope that it will be useful, but
503 # WITHOUT ANY WARRANTY; without even the implied warranty of
504 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
505 # General Public License for more details.
507 # You should have received a copy of the GNU General Public License
508 # along with this program; if not, write to the Free Software
509 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
511 # As a special exception to the GNU General Public License, if you
512 # distribute this file as part of a program that contains a
513 # configuration script generated by Autoconf, you may include it under
514 # the same distribution terms that you use for the rest of that program.
516 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
517 # ----------------------------------
518 AC_DEFUN([PKG_PROG_PKG_CONFIG],
519 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
520 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
521 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
522 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
523 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
524 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
526 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
527 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
529 if test -n "$PKG_CONFIG"; then
530 _pkg_min_version=m4_default([$1], [0.9.0])
531 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
532 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
539 ])# PKG_PROG_PKG_CONFIG
541 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
543 # Check to see whether a particular set of modules exists. Similar
544 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
546 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
547 # only at the first occurence in configure.ac, so if the first place
548 # it's called might be skipped (such as if it is within an "if", you
549 # have to call PKG_CHECK_EXISTS manually
550 # --------------------------------------------------------------
551 AC_DEFUN([PKG_CHECK_EXISTS],
552 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
553 if test -n "$PKG_CONFIG" && \
554 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
555 m4_default([$2], [:])
556 m4_ifvaln([$3], [else
560 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
561 # ---------------------------------------------
562 m4_define([_PKG_CONFIG],
563 [if test -n "$$1"; then
565 elif test -n "$PKG_CONFIG"; then
566 PKG_CHECK_EXISTS([$3],
567 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
568 test "x$?" != "x0" && pkg_failed=yes ],
575 # _PKG_SHORT_ERRORS_SUPPORTED
576 # -----------------------------
577 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
578 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
579 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
580 _pkg_short_errors_supported=yes
582 _pkg_short_errors_supported=no
584 ])# _PKG_SHORT_ERRORS_SUPPORTED
587 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
588 # [ACTION-IF-NOT-FOUND])
591 # Note that if there is a possibility the first call to
592 # PKG_CHECK_MODULES might not happen, you should be sure to include an
593 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
596 # --------------------------------------------------------------
597 AC_DEFUN([PKG_CHECK_MODULES],
598 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
599 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
600 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
603 AC_MSG_CHECKING([for $1])
605 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
606 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
608 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
609 and $1[]_LIBS to avoid the need to call pkg-config.
610 See the pkg-config man page for more details.])
612 if test $pkg_failed = yes; then
614 _PKG_SHORT_ERRORS_SUPPORTED
615 if test $_pkg_short_errors_supported = yes; then
616 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
618 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
620 # Put the nasty error message in config.log where it belongs
621 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
623 m4_default([$4], [AC_MSG_ERROR(
624 [Package requirements ($2) were not met:
628 Consider adjusting the PKG_CONFIG_PATH environment variable if you
629 installed software in a non-standard prefix.
633 elif test $pkg_failed = untried; then
635 m4_default([$4], [AC_MSG_FAILURE(
636 [The pkg-config script could not be found or is too old. Make sure it
637 is in your PATH or set the PKG_CONFIG environment variable to the full
642 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
645 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
646 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
650 ])# PKG_CHECK_MODULES
652 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
654 # This file is free software; the Free Software Foundation
655 # gives unlimited permission to copy and/or distribute it,
656 # with or without modifications, as long as this notice is preserved.
658 # AM_AUTOMAKE_VERSION(VERSION)
659 # ----------------------------
660 # Automake X.Y traces this macro to ensure aclocal.m4 has been
661 # generated from the m4 files accompanying Automake X.Y.
662 # (This private macro should not be called outside this file.)
663 AC_DEFUN([AM_AUTOMAKE_VERSION],
664 [am__api_version='1.13'
665 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
666 dnl require some minimum version. Point them to the right macro.
667 m4_if([$1], [1.13.3], [],
668 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
671 # _AM_AUTOCONF_VERSION(VERSION)
672 # -----------------------------
673 # aclocal traces this macro to find the Autoconf version.
674 # This is a private macro too. Using m4_define simplifies
675 # the logic in aclocal, which can simply ignore this definition.
676 m4_define([_AM_AUTOCONF_VERSION], [])
678 # AM_SET_CURRENT_AUTOMAKE_VERSION
679 # -------------------------------
680 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
681 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
682 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
683 [AM_AUTOMAKE_VERSION([1.13.3])dnl
684 m4_ifndef([AC_AUTOCONF_VERSION],
685 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
686 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
688 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
690 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
692 # This file is free software; the Free Software Foundation
693 # gives unlimited permission to copy and/or distribute it,
694 # with or without modifications, as long as this notice is preserved.
696 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
697 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
698 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
700 # Of course, Automake must honor this variable whenever it calls a
701 # tool from the auxiliary directory. The problem is that $srcdir (and
702 # therefore $ac_aux_dir as well) can be either absolute or relative,
703 # depending on how configure is run. This is pretty annoying, since
704 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
705 # source directory, any form will work fine, but in subdirectories a
706 # relative path needs to be adjusted first.
708 # $ac_aux_dir/missing
709 # fails when called from a subdirectory if $ac_aux_dir is relative
710 # $top_srcdir/$ac_aux_dir/missing
711 # fails if $ac_aux_dir is absolute,
712 # fails when called from a subdirectory in a VPATH build with
713 # a relative $ac_aux_dir
715 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
716 # are both prefixed by $srcdir. In an in-source build this is usually
717 # harmless because $srcdir is '.', but things will broke when you
718 # start a VPATH build or use an absolute $srcdir.
720 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
721 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
722 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
723 # and then we would define $MISSING as
724 # MISSING="\${SHELL} $am_aux_dir/missing"
725 # This will work as long as MISSING is not called from configure, because
726 # unfortunately $(top_srcdir) has no meaning in configure.
727 # However there are other variables, like CC, which are often used in
728 # configure, and could therefore not use this "fixed" $ac_aux_dir.
730 # Another solution, used here, is to always expand $ac_aux_dir to an
731 # absolute PATH. The drawback is that using absolute paths prevent a
732 # configured tree to be moved without reconfiguration.
734 AC_DEFUN([AM_AUX_DIR_EXPAND],
735 [dnl Rely on autoconf to set up CDPATH properly.
737 # expand $ac_aux_dir to an absolute path
738 am_aux_dir=`cd $ac_aux_dir && pwd`
741 # AM_CONDITIONAL -*- Autoconf -*-
743 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
745 # This file is free software; the Free Software Foundation
746 # gives unlimited permission to copy and/or distribute it,
747 # with or without modifications, as long as this notice is preserved.
749 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
750 # -------------------------------------
751 # Define a conditional.
752 AC_DEFUN([AM_CONDITIONAL],
753 [AC_PREREQ([2.52])dnl
754 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
755 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
756 AC_SUBST([$1_TRUE])dnl
757 AC_SUBST([$1_FALSE])dnl
758 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
759 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
760 m4_define([_AM_COND_VALUE_$1], [$2])dnl
768 AC_CONFIG_COMMANDS_PRE(
769 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
770 AC_MSG_ERROR([[conditional "$1" was never defined.
771 Usually this means the macro was only invoked conditionally.]])
774 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
776 # This file is free software; the Free Software Foundation
777 # gives unlimited permission to copy and/or distribute it,
778 # with or without modifications, as long as this notice is preserved.
781 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
782 # written in clear, in which case automake, when reading aclocal.m4,
783 # will think it sees a *use*, and therefore will trigger all it's
784 # C support machinery. Also note that it means that autoscan, seeing
785 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
788 # _AM_DEPENDENCIES(NAME)
789 # ----------------------
790 # See how the compiler implements dependency checking.
791 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
792 # We try a few techniques and use that to set a single cache variable.
794 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
795 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
796 # dependency, and given that the user is not expected to run this macro,
797 # just rely on AC_PROG_CC.
798 AC_DEFUN([_AM_DEPENDENCIES],
799 [AC_REQUIRE([AM_SET_DEPDIR])dnl
800 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
801 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
802 AC_REQUIRE([AM_DEP_TRACK])dnl
804 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
805 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
806 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
807 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
808 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
809 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
810 [depcc="$$1" am_compiler_list=])
812 AC_CACHE_CHECK([dependency style of $depcc],
813 [am_cv_$1_dependencies_compiler_type],
814 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
815 # We make a subdir and do the tests there. Otherwise we can end up
816 # making bogus files that we don't know about and never remove. For
817 # instance it was reported that on HP-UX the gcc test will end up
818 # making a dummy file named 'D' -- because '-MD' means "put the output
822 # Copy depcomp to subdir because otherwise we won't find it if we're
823 # using a relative directory.
824 cp "$am_depcomp" conftest.dir
826 # We will build objects and dependencies in a subdirectory because
827 # it helps to detect inapplicable dependency modes. For instance
828 # both Tru64's cc and ICC support -MD to output dependencies as a
829 # side effect of compilation, but ICC will put the dependencies in
830 # the current directory while Tru64 will put them in the object
834 am_cv_$1_dependencies_compiler_type=none
835 if test "$am_compiler_list" = ""; then
836 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
840 [case " $depcc " in #(
841 *\ -arch\ *\ -arch\ *) am__universal=true ;;
844 [case " $depcc " in #(
845 *\ -arch\ *\ -arch\ *) am__universal=true ;;
848 for depmode in $am_compiler_list; do
849 # Setup a source with many dependencies, because some compilers
850 # like to wrap large dependency lists on column 80 (with \), and
851 # we should not choose a depcomp mode which is confused by this.
853 # We need to recreate these files for each test, as the compiler may
854 # overwrite some of them when testing with obscure command lines.
855 # This happens at least with the AIX C compiler.
857 for i in 1 2 3 4 5 6; do
858 echo '#include "conftst'$i'.h"' >> sub/conftest.c
859 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
860 # Solaris 10 /bin/sh.
861 echo '/* dummy */' > sub/conftst$i.h
863 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
865 # We check with '-c' and '-o' for the sake of the "dashmstdout"
866 # mode. It turns out that the SunPro C++ compiler does not properly
867 # handle '-M -o', and we need to detect this. Also, some Intel
868 # versions had trouble with output in subdirs.
869 am__obj=sub/conftest.${OBJEXT-o}
870 am__minus_obj="-o $am__obj"
873 # This depmode causes a compiler race in universal mode.
874 test "$am__universal" = false || continue
877 # After this tag, mechanisms are not by side-effect, so they'll
878 # only be used when explicitly requested.
879 if test "x$enable_dependency_tracking" = xyes; then
885 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
886 # This compiler won't grok '-c -o', but also, the minuso test has
887 # not run yet. These depmodes are late enough in the game, and
888 # so weak that their functioning should not be impacted.
889 am__obj=conftest.${OBJEXT-o}
894 if depmode=$depmode \
895 source=sub/conftest.c object=$am__obj \
896 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
897 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
898 >/dev/null 2>conftest.err &&
899 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
900 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
901 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
902 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
903 # icc doesn't choke on unknown options, it will just issue warnings
904 # or remarks (even with -Werror). So we grep stderr for any message
905 # that says an option was ignored or not supported.
906 # When given -MP, icc 7.0 and 7.1 complain thusly:
907 # icc: Command line warning: ignoring option '-M'; no argument required
908 # The diagnosis changed in icc 8.0:
909 # icc: Command line remark: option '-MP' not supported
910 if (grep 'ignoring option' conftest.err ||
911 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
912 am_cv_$1_dependencies_compiler_type=$depmode
921 am_cv_$1_dependencies_compiler_type=none
924 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
925 AM_CONDITIONAL([am__fastdep$1], [
926 test "x$enable_dependency_tracking" != xno \
927 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
933 # Choose a directory name for dependency files.
934 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
935 AC_DEFUN([AM_SET_DEPDIR],
936 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
937 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
943 AC_DEFUN([AM_DEP_TRACK],
944 [AC_ARG_ENABLE([dependency-tracking], [dnl
946 [--enable-dependency-tracking],
947 [do not reject slow dependency extractors])
949 [--disable-dependency-tracking],
950 [speeds up one-time build])])
951 if test "x$enable_dependency_tracking" != xno; then
952 am_depcomp="$ac_aux_dir/depcomp"
956 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
957 AC_SUBST([AMDEPBACKSLASH])dnl
958 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
959 AC_SUBST([am__nodep])dnl
960 _AM_SUBST_NOTMAKE([am__nodep])dnl
963 # Generate code to set up dependency tracking. -*- Autoconf -*-
965 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
967 # This file is free software; the Free Software Foundation
968 # gives unlimited permission to copy and/or distribute it,
969 # with or without modifications, as long as this notice is preserved.
972 # _AM_OUTPUT_DEPENDENCY_COMMANDS
973 # ------------------------------
974 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
976 # Older Autoconf quotes --file arguments for eval, but not when files
977 # are listed without --file. Let's play safe and only enable the eval
978 # if we detect the quoting.
979 case $CONFIG_FILES in
980 *\'*) eval set x "$CONFIG_FILES" ;;
981 *) set x $CONFIG_FILES ;;
986 # Strip MF so we end up with the name of the file.
987 mf=`echo "$mf" | sed -e 's/:.*$//'`
988 # Check whether this is an Automake generated Makefile or not.
989 # We used to match only the files named 'Makefile.in', but
990 # some people rename them; so instead we look at the file content.
991 # Grep'ing the first line is not enough: some people post-process
992 # each Makefile.in and add a new line on top of each file to say so.
993 # Grep'ing the whole file is not good either: AIX grep has a line
994 # limit of 2048, but all sed's we know have understand at least 4000.
995 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
996 dirpart=`AS_DIRNAME("$mf")`
1000 # Extract the definition of DEPDIR, am__include, and am__quote
1001 # from the Makefile without running 'make'.
1002 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1003 test -z "$DEPDIR" && continue
1004 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1005 test -z "$am__include" && continue
1006 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1007 # Find all dependency output files, they are included files with
1008 # $(DEPDIR) in their names. We invoke sed twice because it is the
1009 # simplest approach to changing $(DEPDIR) to its actual value in the
1011 for file in `sed -n "
1012 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1013 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1014 # Make sure the directory exists.
1015 test -f "$dirpart/$file" && continue
1016 fdir=`AS_DIRNAME(["$file"])`
1017 AS_MKDIR_P([$dirpart/$fdir])
1018 # echo "creating $dirpart/$file"
1019 echo '# dummy' > "$dirpart/$file"
1023 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1026 # AM_OUTPUT_DEPENDENCY_COMMANDS
1027 # -----------------------------
1028 # This macro should only be invoked once -- use via AC_REQUIRE.
1030 # This code is only required when automatic dependency tracking
1031 # is enabled. FIXME. This creates each '.P' file that we will
1032 # need in order to bootstrap the dependency handling code.
1033 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1034 [AC_CONFIG_COMMANDS([depfiles],
1035 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1036 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1039 # Do all the work for Automake. -*- Autoconf -*-
1041 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1043 # This file is free software; the Free Software Foundation
1044 # gives unlimited permission to copy and/or distribute it,
1045 # with or without modifications, as long as this notice is preserved.
1047 # This macro actually does too much. Some checks are only needed if
1048 # your package does certain things. But this isn't really a big deal.
1050 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1051 # AM_INIT_AUTOMAKE([OPTIONS])
1052 # -----------------------------------------------
1053 # The call with PACKAGE and VERSION arguments is the old style
1054 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1055 # and VERSION should now be passed to AC_INIT and removed from
1056 # the call to AM_INIT_AUTOMAKE.
1057 # We support both call styles for the transition. After
1058 # the next Automake release, Autoconf can make the AC_INIT
1059 # arguments mandatory, and then we can depend on a new Autoconf
1060 # release and drop the old call support.
1061 AC_DEFUN([AM_INIT_AUTOMAKE],
1062 [AC_PREREQ([2.65])dnl
1063 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1064 dnl the ones we care about.
1065 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1066 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1067 AC_REQUIRE([AC_PROG_INSTALL])dnl
1068 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1069 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1070 # is not polluted with repeated "-I."
1071 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1072 # test to see if srcdir already configured
1073 if test -f $srcdir/config.status; then
1074 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1078 # test whether we have cygpath
1079 if test -z "$CYGPATH_W"; then
1080 if (cygpath --version) >/dev/null 2>/dev/null; then
1081 CYGPATH_W='cygpath -w'
1086 AC_SUBST([CYGPATH_W])
1088 # Define the identity of the package.
1089 dnl Distinguish between old-style and new-style calls.
1091 [AC_DIAGNOSE([obsolete],
1092 [$0: two- and three-arguments forms are deprecated.])
1093 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1094 AC_SUBST([PACKAGE], [$1])dnl
1095 AC_SUBST([VERSION], [$2])],
1096 [_AM_SET_OPTIONS([$1])dnl
1097 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1099 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1101 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1102 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1103 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1105 _AM_IF_OPTION([no-define],,
1106 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1107 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1109 # Some tools Automake needs.
1110 AC_REQUIRE([AM_SANITY_CHECK])dnl
1111 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1112 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1113 AM_MISSING_PROG([AUTOCONF], [autoconf])
1114 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1115 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1116 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1117 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1118 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1119 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1120 # For better backward compatibility. To be removed once Automake 1.9.x
1121 # dies out for good. For more background, see:
1122 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1123 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1124 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1125 # We need awk for the "check" target. The system "awk" is bad on
1127 AC_REQUIRE([AC_PROG_AWK])dnl
1128 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1129 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1130 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1131 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1132 [_AM_PROG_TAR([v7])])])
1133 _AM_IF_OPTION([no-dependencies],,
1134 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1135 [_AM_DEPENDENCIES([CC])],
1136 [m4_define([AC_PROG_CC],
1137 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1138 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1139 [_AM_DEPENDENCIES([CXX])],
1140 [m4_define([AC_PROG_CXX],
1141 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1142 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1143 [_AM_DEPENDENCIES([OBJC])],
1144 [m4_define([AC_PROG_OBJC],
1145 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1146 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1147 [_AM_DEPENDENCIES([OBJCXX])],
1148 [m4_define([AC_PROG_OBJCXX],
1149 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1151 AC_REQUIRE([AM_SILENT_RULES])dnl
1152 dnl The testsuite driver may need to know about EXEEXT, so add the
1153 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1154 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1155 AC_CONFIG_COMMANDS_PRE(dnl
1156 [m4_provide_if([_AM_COMPILER_EXEEXT],
1157 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1160 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1161 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1162 dnl mangled by Autoconf and run in a shell conditional statement.
1163 m4_define([_AC_COMPILER_EXEEXT],
1164 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1167 # When config.status generates a header, we must update the stamp-h file.
1168 # This file resides in the same directory as the config header
1169 # that is generated. The stamp files are numbered to have different names.
1171 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1172 # loop where config.status creates the headers, so we can generate
1173 # our stamp files there.
1174 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1175 [# Compute $1's index in $config_headers.
1178 for _am_header in $config_headers :; do
1180 $_am_arg | $_am_arg:* )
1183 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1186 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1188 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1190 # This file is free software; the Free Software Foundation
1191 # gives unlimited permission to copy and/or distribute it,
1192 # with or without modifications, as long as this notice is preserved.
1194 # AM_PROG_INSTALL_SH
1195 # ------------------
1196 # Define $install_sh.
1197 AC_DEFUN([AM_PROG_INSTALL_SH],
1198 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1199 if test x"${install_sh}" != xset; then
1202 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1204 install_sh="\${SHELL} $am_aux_dir/install-sh"
1207 AC_SUBST([install_sh])])
1209 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1211 # This file is free software; the Free Software Foundation
1212 # gives unlimited permission to copy and/or distribute it,
1213 # with or without modifications, as long as this notice is preserved.
1215 # Check whether the underlying file-system supports filenames
1216 # with a leading dot. For instance MS-DOS doesn't.
1217 AC_DEFUN([AM_SET_LEADING_DOT],
1218 [rm -rf .tst 2>/dev/null
1219 mkdir .tst 2>/dev/null
1220 if test -d .tst; then
1225 rmdir .tst 2>/dev/null
1226 AC_SUBST([am__leading_dot])])
1228 # Check to see how 'make' treats includes. -*- Autoconf -*-
1230 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1232 # This file is free software; the Free Software Foundation
1233 # gives unlimited permission to copy and/or distribute it,
1234 # with or without modifications, as long as this notice is preserved.
1238 # Check to see how make treats includes.
1239 AC_DEFUN([AM_MAKE_INCLUDE],
1240 [am_make=${MAKE-make}
1241 cat > confinc << 'END'
1243 @echo this is the am__doit target
1246 # If we don't find an include directive, just comment out the code.
1247 AC_MSG_CHECKING([for style of include used by $am_make])
1251 # First try GNU make style include.
1252 echo "include confinc" > confmf
1253 # Ignore all kinds of additional output from 'make'.
1254 case `$am_make -s -f confmf 2> /dev/null` in #(
1255 *the\ am__doit\ target*)
1261 # Now try BSD make style include.
1262 if test "$am__include" = "#"; then
1263 echo '.include "confinc"' > confmf
1264 case `$am_make -s -f confmf 2> /dev/null` in #(
1265 *the\ am__doit\ target*)
1266 am__include=.include
1272 AC_SUBST([am__include])
1273 AC_SUBST([am__quote])
1274 AC_MSG_RESULT([$_am_result])
1275 rm -f confinc confmf
1278 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1280 # This file is free software; the Free Software Foundation
1281 # gives unlimited permission to copy and/or distribute it,
1282 # with or without modifications, as long as this notice is preserved.
1286 # Like AC_PROG_CC_C_O, but changed for automake.
1287 AC_DEFUN([AM_PROG_CC_C_O],
1288 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1289 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1290 AC_REQUIRE_AUX_FILE([compile])dnl
1291 # FIXME: we rely on the cache variable name because
1292 # there is no other way.
1294 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1295 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1296 if test "$am_t" != yes; then
1297 # Losing compiler, so override with the script.
1298 # FIXME: It is wrong to rewrite CC.
1299 # But if we don't then we get into trouble of one sort or another.
1300 # A longer-term fix would be to have automake use am__CC in this case,
1301 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1302 CC="$am_aux_dir/compile $CC"
1304 dnl Make sure AC_PROG_CC is never called again, or it will override our
1306 m4_define([AC_PROG_CC],
1307 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1310 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1312 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1314 # This file is free software; the Free Software Foundation
1315 # gives unlimited permission to copy and/or distribute it,
1316 # with or without modifications, as long as this notice is preserved.
1318 # AM_MISSING_PROG(NAME, PROGRAM)
1319 # ------------------------------
1320 AC_DEFUN([AM_MISSING_PROG],
1321 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1322 $1=${$1-"${am_missing_run}$2"}
1325 # AM_MISSING_HAS_RUN
1326 # ------------------
1327 # Define MISSING if not defined so far and test if it is modern enough.
1328 # If it is, set am_missing_run to use it, otherwise, to nothing.
1329 AC_DEFUN([AM_MISSING_HAS_RUN],
1330 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1331 AC_REQUIRE_AUX_FILE([missing])dnl
1332 if test x"${MISSING+set}" != xset; then
1335 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1337 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1340 # Use eval to expand $SHELL
1341 if eval "$MISSING --is-lightweight"; then
1342 am_missing_run="$MISSING "
1345 AC_MSG_WARN(['missing' script is too old or missing])
1349 # Helper functions for option handling. -*- Autoconf -*-
1351 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1353 # This file is free software; the Free Software Foundation
1354 # gives unlimited permission to copy and/or distribute it,
1355 # with or without modifications, as long as this notice is preserved.
1357 # _AM_MANGLE_OPTION(NAME)
1358 # -----------------------
1359 AC_DEFUN([_AM_MANGLE_OPTION],
1360 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1362 # _AM_SET_OPTION(NAME)
1363 # --------------------
1364 # Set option NAME. Presently that only means defining a flag for this option.
1365 AC_DEFUN([_AM_SET_OPTION],
1366 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1368 # _AM_SET_OPTIONS(OPTIONS)
1369 # ------------------------
1370 # OPTIONS is a space-separated list of Automake options.
1371 AC_DEFUN([_AM_SET_OPTIONS],
1372 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1374 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1375 # -------------------------------------------
1376 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1377 AC_DEFUN([_AM_IF_OPTION],
1378 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1380 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1382 # This file is free software; the Free Software Foundation
1383 # gives unlimited permission to copy and/or distribute it,
1384 # with or without modifications, as long as this notice is preserved.
1387 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1388 # ---------------------------------------------------------------------------
1389 # Adds support for distributing Python modules and packages. To
1390 # install modules, copy them to $(pythondir), using the python_PYTHON
1391 # automake variable. To install a package with the same name as the
1392 # automake package, install to $(pkgpythondir), or use the
1393 # pkgpython_PYTHON automake variable.
1395 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1396 # locations to install python extension modules (shared libraries).
1397 # Another macro is required to find the appropriate flags to compile
1398 # extension modules.
1400 # If your package is configured with a different prefix to python,
1401 # users will have to add the install directory to the PYTHONPATH
1402 # environment variable, or create a .pth file (see the python
1403 # documentation for details).
1405 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1406 # cause an error if the version of python installed on the system
1407 # doesn't meet the requirement. MINIMUM-VERSION should consist of
1408 # numbers and dots only.
1409 AC_DEFUN([AM_PATH_PYTHON],
1411 dnl Find a Python interpreter. Python versions prior to 2.0 are not
1412 dnl supported. (2.0 was released on October 16, 2000).
1413 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1414 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
1415 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1417 AC_ARG_VAR([PYTHON], [the Python interpreter])
1420 dnl No version check is needed.
1421 # Find any Python interpreter.
1422 if test -z "$PYTHON"; then
1423 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1425 am_display_PYTHON=python
1427 dnl A version check is needed.
1428 if test -n "$PYTHON"; then
1429 # If the user set $PYTHON, use it and don't search something else.
1430 AC_MSG_CHECKING([whether $PYTHON version is >= $1])
1431 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1432 [AC_MSG_RESULT([yes])],
1433 [AC_MSG_RESULT([no])
1434 AC_MSG_ERROR([Python interpreter is too old])])
1435 am_display_PYTHON=$PYTHON
1437 # Otherwise, try each interpreter until we find one that satisfies
1439 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1440 [am_cv_pathless_PYTHON],[
1441 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1442 test "$am_cv_pathless_PYTHON" = none && break
1443 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1445 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1446 if test "$am_cv_pathless_PYTHON" = none; then
1449 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1451 am_display_PYTHON=$am_cv_pathless_PYTHON
1455 if test "$PYTHON" = :; then
1456 dnl Run any user-specified action, or abort.
1457 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1460 dnl Query Python for its version number. Getting [:3] seems to be
1461 dnl the best way to do this; it's what "site.py" does in the standard
1464 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1465 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1466 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1468 dnl Use the values of $prefix and $exec_prefix for the corresponding
1469 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
1470 dnl distinct variables so they can be overridden if need be. However,
1471 dnl general consensus is that you shouldn't need this ability.
1473 AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1474 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1476 dnl At times (like when building shared libraries) you may want
1477 dnl to know which OS platform Python thinks this is.
1479 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1480 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1481 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1483 # Just factor out some code duplication.
1484 am_python_setup_sysconfig="\
1486 # Prefer sysconfig over distutils.sysconfig, for better compatibility
1487 # with python 3.x. See automake bug#10227.
1491 can_use_sysconfig = 0
1493 can_use_sysconfig = 1
1494 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1495 # <https://github.com/pypa/virtualenv/issues/118>
1497 from platform import python_implementation
1498 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1499 can_use_sysconfig = 0
1503 dnl Set up 4 directories:
1505 dnl pythondir -- where to install python scripts. This is the
1506 dnl site-packages directory, not the python standard library
1507 dnl directory like in previous automake betas. This behavior
1508 dnl is more consistent with lispdir.m4 for example.
1509 dnl Query distutils for this directory.
1510 AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1511 [am_cv_python_pythondir],
1512 [if test "x$prefix" = xNONE
1514 am_py_prefix=$ac_default_prefix
1516 am_py_prefix=$prefix
1518 am_cv_python_pythondir=`$PYTHON -c "
1519 $am_python_setup_sysconfig
1520 if can_use_sysconfig:
1521 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1523 from distutils import sysconfig
1524 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1525 sys.stdout.write(sitedir)"`
1526 case $am_cv_python_pythondir in
1528 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1529 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1532 case $am_py_prefix in
1535 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1541 AC_SUBST([pythondir], [$am_cv_python_pythondir])
1543 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
1544 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
1545 dnl more consistent with the rest of automake.
1547 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1549 dnl pyexecdir -- directory for installing python extension modules
1550 dnl (shared libraries)
1551 dnl Query distutils for this directory.
1552 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1553 [am_cv_python_pyexecdir],
1554 [if test "x$exec_prefix" = xNONE
1556 am_py_exec_prefix=$am_py_prefix
1558 am_py_exec_prefix=$exec_prefix
1560 am_cv_python_pyexecdir=`$PYTHON -c "
1561 $am_python_setup_sysconfig
1562 if can_use_sysconfig:
1563 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
1565 from distutils import sysconfig
1566 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
1567 sys.stdout.write(sitedir)"`
1568 case $am_cv_python_pyexecdir in
1569 $am_py_exec_prefix*)
1570 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1571 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1574 case $am_py_exec_prefix in
1577 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1583 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1585 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1587 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1589 dnl Run any user-specified action.
1596 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1597 # ---------------------------------------------------------------------------
1598 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1599 # Run ACTION-IF-FALSE otherwise.
1600 # This test uses sys.hexversion instead of the string equivalent (first
1601 # word of sys.version), in order to cope with versions such as 2.2c1.
1602 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1603 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1605 # split strings by '.' and convert to numeric. Append some zeros
1606 # because we need at least 4 digits for the hex conversion.
1607 # map returns an iterator in Python 3.0 and a list in 2.x
1608 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1610 # xrange is not present in Python 3.0 and range returns an iterator
1611 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1612 sys.exit(sys.hexversion < minverhex)"
1613 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1615 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1617 # This file is free software; the Free Software Foundation
1618 # gives unlimited permission to copy and/or distribute it,
1619 # with or without modifications, as long as this notice is preserved.
1621 # AM_RUN_LOG(COMMAND)
1622 # -------------------
1623 # Run COMMAND, save the exit status in ac_status, and log it.
1624 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1625 AC_DEFUN([AM_RUN_LOG],
1626 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1627 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1629 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1630 (exit $ac_status); }])
1632 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1634 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1636 # This file is free software; the Free Software Foundation
1637 # gives unlimited permission to copy and/or distribute it,
1638 # with or without modifications, as long as this notice is preserved.
1642 AC_DEFUN([AM_SANITY_CHECK],
1643 [AC_MSG_CHECKING([whether build environment is sane])
1644 # Reject unsafe characters in $srcdir or the absolute working directory
1645 # name. Accept space and tab only in the latter.
1649 *[[\\\"\#\$\&\'\`$am_lf]]*)
1650 AC_MSG_ERROR([unsafe absolute working directory name]);;
1653 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1654 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1657 # Do 'set' in a subshell so we don't clobber the current shell's
1658 # arguments. Must try -L first in case configure is actually a
1659 # symlink; some systems play weird games with the mod time of symlinks
1660 # (eg FreeBSD returns the mod time of the symlink's containing
1664 for am_try in 1 2; do
1665 echo "timestamp, slept: $am_has_slept" > conftest.file
1666 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1667 if test "$[*]" = "X"; then
1669 set X `ls -t "$srcdir/configure" conftest.file`
1671 if test "$[*]" != "X $srcdir/configure conftest.file" \
1672 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1674 # If neither matched, then we have a broken ls. This can happen
1675 # if, for instance, CONFIG_SHELL is bash and it inherits a
1676 # broken ls alias from the environment. This has actually
1677 # happened. Such a system could not be considered "sane".
1678 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1679 alias in your environment])
1681 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1688 test "$[2]" = conftest.file
1694 AC_MSG_ERROR([newly created file is older than distributed files!
1695 Check your system clock])
1697 AC_MSG_RESULT([yes])
1698 # If we didn't sleep, we still need to ensure time stamps of config.status and
1699 # generated files are strictly newer.
1701 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1705 AC_CONFIG_COMMANDS_PRE(
1706 [AC_MSG_CHECKING([that generated files are newer than configure])
1707 if test -n "$am_sleep_pid"; then
1708 # Hide warnings about reused PIDs.
1709 wait $am_sleep_pid 2>/dev/null
1711 AC_MSG_RESULT([done])])
1715 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1717 # This file is free software; the Free Software Foundation
1718 # gives unlimited permission to copy and/or distribute it,
1719 # with or without modifications, as long as this notice is preserved.
1721 # AM_SILENT_RULES([DEFAULT])
1722 # --------------------------
1723 # Enable less verbose build rules; with the default set to DEFAULT
1724 # ("yes" being less verbose, "no" or empty being verbose).
1725 AC_DEFUN([AM_SILENT_RULES],
1726 [AC_ARG_ENABLE([silent-rules], [dnl
1728 [--enable-silent-rules],
1729 [less verbose build output (undo: "make V=1")])
1731 [--disable-silent-rules],
1732 [verbose build output (undo: "make V=0")])dnl
1734 case $enable_silent_rules in @%:@ (((
1735 yes) AM_DEFAULT_VERBOSITY=0;;
1736 no) AM_DEFAULT_VERBOSITY=1;;
1737 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1740 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1741 dnl do not support nested variable expansions.
1742 dnl See automake bug#9928 and bug#10237.
1743 am_make=${MAKE-make}
1744 AC_CACHE_CHECK([whether $am_make supports nested variables],
1745 [am_cv_make_support_nested_variables],
1746 [if AS_ECHO([['TRUE=$(BAR$(V))
1752 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1753 am_cv_make_support_nested_variables=yes
1755 am_cv_make_support_nested_variables=no
1757 if test $am_cv_make_support_nested_variables = yes; then
1758 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1760 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1762 AM_V=$AM_DEFAULT_VERBOSITY
1763 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1766 AM_SUBST_NOTMAKE([AM_V])dnl
1767 AC_SUBST([AM_DEFAULT_V])dnl
1768 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1769 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1771 AC_SUBST([AM_BACKSLASH])dnl
1772 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1775 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1777 # This file is free software; the Free Software Foundation
1778 # gives unlimited permission to copy and/or distribute it,
1779 # with or without modifications, as long as this notice is preserved.
1781 # AM_PROG_INSTALL_STRIP
1782 # ---------------------
1783 # One issue with vendor 'install' (even GNU) is that you can't
1784 # specify the program used to strip binaries. This is especially
1785 # annoying in cross-compiling environments, where the build's strip
1786 # is unlikely to handle the host's binaries.
1787 # Fortunately install-sh will honor a STRIPPROG variable, so we
1788 # always use install-sh in "make install-strip", and initialize
1789 # STRIPPROG with the value of the STRIP variable (set by the user).
1790 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1791 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1792 # Installed binaries are usually stripped using 'strip' when the user
1793 # run "make install-strip". However 'strip' might not be the right
1794 # tool to use in cross-compilation environments, therefore Automake
1795 # will honor the 'STRIP' environment variable to overrule this program.
1796 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1797 if test "$cross_compiling" != no; then
1798 AC_CHECK_TOOL([STRIP], [strip], :)
1800 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1801 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1803 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1805 # This file is free software; the Free Software Foundation
1806 # gives unlimited permission to copy and/or distribute it,
1807 # with or without modifications, as long as this notice is preserved.
1809 # _AM_SUBST_NOTMAKE(VARIABLE)
1810 # ---------------------------
1811 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1812 # This macro is traced by Automake.
1813 AC_DEFUN([_AM_SUBST_NOTMAKE])
1815 # AM_SUBST_NOTMAKE(VARIABLE)
1816 # --------------------------
1817 # Public sister of _AM_SUBST_NOTMAKE.
1818 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1820 # Check how to create a tarball. -*- Autoconf -*-
1822 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1824 # This file is free software; the Free Software Foundation
1825 # gives unlimited permission to copy and/or distribute it,
1826 # with or without modifications, as long as this notice is preserved.
1828 # _AM_PROG_TAR(FORMAT)
1829 # --------------------
1830 # Check how to create a tarball in format FORMAT.
1831 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1833 # Substitute a variable $(am__tar) that is a command
1834 # writing to stdout a FORMAT-tarball containing the directory
1836 # tardir=directory && $(am__tar) > result.tar
1838 # Substitute a variable $(am__untar) that extract such
1839 # a tarball read from stdin.
1840 # $(am__untar) < result.tar
1842 AC_DEFUN([_AM_PROG_TAR],
1843 [# Always define AMTAR for backward compatibility. Yes, it's still used
1844 # in the wild :-( We should find a proper way to deprecate it ...
1845 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1847 # We'll loop over all known methods to create a tar archive until one works.
1848 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1851 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1855 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1856 # There is notably a 21 bits limit for the UID and the GID. In fact,
1857 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1859 am_max_uid=2097151 # 2^21 - 1
1860 am_max_gid=$am_max_uid
1861 # The $UID and $GID variables are not portable, so we need to resort
1862 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1863 # below are definitely unexpected, so allow the users to see them
1864 # (that is, avoid stderr redirection).
1865 am_uid=`id -u || echo unknown`
1866 am_gid=`id -g || echo unknown`
1867 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1868 if test $am_uid -le $am_max_uid; then
1869 AC_MSG_RESULT([yes])
1874 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1875 if test $am_gid -le $am_max_gid; then
1876 AC_MSG_RESULT([yes])
1885 [m4_fatal([Unknown tar format])])
1887 AC_MSG_CHECKING([how to create a $1 tar archive])
1889 # Go ahead even if we have the value already cached. We do so because we
1890 # need to set the values for the 'am__tar' and 'am__untar' variables.
1891 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1893 for _am_tool in $_am_tools; do
1896 for _am_tar in tar gnutar gtar; do
1897 AM_RUN_LOG([$_am_tar --version]) && break
1899 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1900 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1901 am__untar="$_am_tar -xf -"
1904 # Must skip GNU tar: if it does not support --format= it doesn't create
1905 # ustar tarball either.
1906 (tar --version) >/dev/null 2>&1 && continue
1907 am__tar='tar chf - "$$tardir"'
1908 am__tar_='tar chf - "$tardir"'
1909 am__untar='tar xf -'
1912 am__tar='pax -L -x $1 -w "$$tardir"'
1913 am__tar_='pax -L -x $1 -w "$tardir"'
1917 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1918 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1919 am__untar='cpio -i -H $1 -d'
1928 # If the value was cached, stop now. We just wanted to have am__tar
1929 # and am__untar set.
1930 test -n "${am_cv_prog_tar_$1}" && break
1932 # tar/untar a dummy directory, and stop if the command works.
1935 echo GrepMe > conftest.dir/file
1936 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1938 if test -s conftest.tar; then
1939 AM_RUN_LOG([$am__untar <conftest.tar])
1940 AM_RUN_LOG([cat conftest.dir/file])
1941 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1946 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1947 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1950 AC_SUBST([am__untar])
1953 m4_include([m4/ac_pkg_swig.m4])
1954 m4_include([m4/ac_python_devel.m4])
1955 m4_include([m4/intltool.m4])
1956 m4_include([m4/libtool.m4])
1957 m4_include([m4/ltoptions.m4])
1958 m4_include([m4/ltsugar.m4])
1959 m4_include([m4/ltversion.m4])
1960 m4_include([m4/lt~obsolete.m4])
1961 m4_include([m4/swig_python.m4])