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 # 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
460 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
461 # serial 42 IT_PROG_INTLTOOL
462 AC_DEFUN([IT_PROG_INTLTOOL], [
464 AC_REQUIRE([AM_NLS])dnl
466 case "$am__api_version" in
468 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
474 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
475 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
476 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
477 if test -n "$1"; then
478 AC_MSG_CHECKING([for intltool >= $1])
479 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
480 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
481 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
484 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
485 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
486 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
487 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
488 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
491 if test -z "$AM_DEFAULT_VERBOSITY"; then
492 AM_DEFAULT_VERBOSITY=1
494 AC_SUBST([AM_DEFAULT_VERBOSITY])
496 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
497 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
498 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
499 AC_SUBST(INTLTOOL_V_MERGE)
500 AC_SUBST(INTLTOOL__v_MERGE_)
501 AC_SUBST(INTLTOOL__v_MERGE_0)
503 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
504 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
505 intltool__v_merge_options_0='-q'
506 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
507 AC_SUBST(intltool__v_merge_options_)
508 AC_SUBST(intltool__v_merge_options_0)
510 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
511 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
512 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
513 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
514 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
515 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
516 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
517 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
518 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
519 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
520 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
521 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
522 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
524 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
526 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
527 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
528 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
529 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
530 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
531 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
532 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
534 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
535 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
536 _IT_SUBST(INTLTOOL_KEYS_RULE)
537 _IT_SUBST(INTLTOOL_PROP_RULE)
538 _IT_SUBST(INTLTOOL_OAF_RULE)
539 _IT_SUBST(INTLTOOL_PONG_RULE)
540 _IT_SUBST(INTLTOOL_SERVER_RULE)
541 _IT_SUBST(INTLTOOL_SHEET_RULE)
542 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
543 _IT_SUBST(INTLTOOL_UI_RULE)
544 _IT_SUBST(INTLTOOL_XAM_RULE)
545 _IT_SUBST(INTLTOOL_KBD_RULE)
546 _IT_SUBST(INTLTOOL_XML_RULE)
547 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
548 _IT_SUBST(INTLTOOL_CAVES_RULE)
549 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
550 _IT_SUBST(INTLTOOL_THEME_RULE)
551 _IT_SUBST(INTLTOOL_SERVICE_RULE)
552 _IT_SUBST(INTLTOOL_POLICY_RULE)
554 # Check the gettext tools to make sure they are GNU
555 AC_PATH_PROG(XGETTEXT, xgettext)
556 AC_PATH_PROG(MSGMERGE, msgmerge)
557 AC_PATH_PROG(MSGFMT, msgfmt)
558 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
559 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
560 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
562 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
563 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
564 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
565 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
566 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
569 AC_PATH_PROG(INTLTOOL_PERL, perl)
570 if test -z "$INTLTOOL_PERL"; then
571 AC_MSG_ERROR([perl not found])
573 AC_MSG_CHECKING([for perl >= 5.8.1])
574 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
575 if test $? -ne 0; then
576 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
578 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
579 AC_MSG_RESULT([$IT_PERL_VERSION])
581 if test "x$2" != "xno-xml"; then
582 AC_MSG_CHECKING([for XML::Parser])
583 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
586 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
590 # Substitute ALL_LINGUAS so we can use it in po/Makefile
591 AC_SUBST(ALL_LINGUAS)
593 # Set DATADIRNAME correctly if it is not set yet
594 # (copied from glib-gettext.m4)
595 if test -z "$DATADIRNAME"; then
597 [AC_LANG_PROGRAM([[]],
598 [[extern int _nl_msg_cat_cntr;
599 return _nl_msg_cat_cntr]])],
603 dnl On Solaris, if bind_textdomain_codeset is in libc,
604 dnl GNU format message catalog is always supported,
605 dnl since both are added to the libc all together.
606 dnl Hence, we'd like to go with DATADIRNAME=share
608 AC_CHECK_FUNC(bind_textdomain_codeset,
609 [DATADIRNAME=share], [DATADIRNAME=lib])
616 AC_SUBST(DATADIRNAME)
623 # IT_PO_SUBDIR(DIRNAME)
624 # ---------------------
625 # All po subdirs have to be declared with this macro; the subdir "po" is
626 # declared by IT_PROG_INTLTOOL.
628 AC_DEFUN([IT_PO_SUBDIR],
629 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
631 dnl The following CONFIG_COMMANDS should be executed at the very end
632 dnl of config.status.
633 AC_CONFIG_COMMANDS_PRE([
634 AC_CONFIG_COMMANDS([$1/stamp-it], [
635 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
636 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
638 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
643 '"s|^| $ac_top_srcdir/|" \
644 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
646 [sed '/^POTFILES =/,/[^\\]$/ {
650 ' "$1/Makefile.in" >"$1/Makefile"]
651 rm -f "$1/Makefile.tmp"
652 mv "$1/stamp-it.tmp" "$1/stamp-it"
657 # _IT_SUBST(VARIABLE)
658 # -------------------
659 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
661 AC_DEFUN([_IT_SUBST],
664 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
669 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
670 # A hint is needed for aclocal from Automake <= 1.9.4:
671 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
674 # nls.m4 serial 5 (gettext-0.18)
675 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
677 dnl This file is free software; the Free Software Foundation
678 dnl gives unlimited permission to copy and/or distribute it,
679 dnl with or without modifications, as long as this notice is preserved.
681 dnl This file can can be used in projects which are not available under
682 dnl the GNU General Public License or the GNU Library General Public
683 dnl License but which still want to provide support for the GNU gettext
685 dnl Please note that the actual code of the GNU gettext library is covered
686 dnl by the GNU Library General Public License, and the rest of the GNU
687 dnl gettext package package is covered by the GNU General Public License.
688 dnl They are *not* in the public domain.
691 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
692 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
698 AC_MSG_CHECKING([whether NLS is requested])
699 dnl Default is enabled NLS
701 [ --disable-nls do not use Native Language Support],
702 USE_NLS=$enableval, USE_NLS=yes)
703 AC_MSG_RESULT([$USE_NLS])
707 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
708 # serial 1 (pkg-config-0.24)
710 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
712 # This program is free software; you can redistribute it and/or modify
713 # it under the terms of the GNU General Public License as published by
714 # the Free Software Foundation; either version 2 of the License, or
715 # (at your option) any later version.
717 # This program is distributed in the hope that it will be useful, but
718 # WITHOUT ANY WARRANTY; without even the implied warranty of
719 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
720 # General Public License for more details.
722 # You should have received a copy of the GNU General Public License
723 # along with this program; if not, write to the Free Software
724 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
726 # As a special exception to the GNU General Public License, if you
727 # distribute this file as part of a program that contains a
728 # configuration script generated by Autoconf, you may include it under
729 # the same distribution terms that you use for the rest of that program.
731 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
732 # ----------------------------------
733 AC_DEFUN([PKG_PROG_PKG_CONFIG],
734 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
735 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
736 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
737 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
738 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
739 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
741 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
742 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
744 if test -n "$PKG_CONFIG"; then
745 _pkg_min_version=m4_default([$1], [0.9.0])
746 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
747 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
754 ])# PKG_PROG_PKG_CONFIG
756 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
758 # Check to see whether a particular set of modules exists. Similar
759 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
761 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
762 # only at the first occurence in configure.ac, so if the first place
763 # it's called might be skipped (such as if it is within an "if", you
764 # have to call PKG_CHECK_EXISTS manually
765 # --------------------------------------------------------------
766 AC_DEFUN([PKG_CHECK_EXISTS],
767 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
768 if test -n "$PKG_CONFIG" && \
769 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
770 m4_default([$2], [:])
771 m4_ifvaln([$3], [else
775 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
776 # ---------------------------------------------
777 m4_define([_PKG_CONFIG],
778 [if test -n "$$1"; then
780 elif test -n "$PKG_CONFIG"; then
781 PKG_CHECK_EXISTS([$3],
782 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
783 test "x$?" != "x0" && pkg_failed=yes ],
790 # _PKG_SHORT_ERRORS_SUPPORTED
791 # -----------------------------
792 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
793 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
794 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
795 _pkg_short_errors_supported=yes
797 _pkg_short_errors_supported=no
799 ])# _PKG_SHORT_ERRORS_SUPPORTED
802 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
803 # [ACTION-IF-NOT-FOUND])
806 # Note that if there is a possibility the first call to
807 # PKG_CHECK_MODULES might not happen, you should be sure to include an
808 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
811 # --------------------------------------------------------------
812 AC_DEFUN([PKG_CHECK_MODULES],
813 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
814 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
815 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
818 AC_MSG_CHECKING([for $1])
820 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
821 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
823 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
824 and $1[]_LIBS to avoid the need to call pkg-config.
825 See the pkg-config man page for more details.])
827 if test $pkg_failed = yes; then
829 _PKG_SHORT_ERRORS_SUPPORTED
830 if test $_pkg_short_errors_supported = yes; then
831 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
833 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
835 # Put the nasty error message in config.log where it belongs
836 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
838 m4_default([$4], [AC_MSG_ERROR(
839 [Package requirements ($2) were not met:
843 Consider adjusting the PKG_CONFIG_PATH environment variable if you
844 installed software in a non-standard prefix.
848 elif test $pkg_failed = untried; then
850 m4_default([$4], [AC_MSG_FAILURE(
851 [The pkg-config script could not be found or is too old. Make sure it
852 is in your PATH or set the PKG_CONFIG environment variable to the full
857 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
860 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
861 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
865 ])# PKG_CHECK_MODULES
868 # PKG_INSTALLDIR(DIRECTORY)
869 # -------------------------
870 # Substitutes the variable pkgconfigdir as the location where a module
871 # should install pkg-config .pc files. By default the directory is
872 # $libdir/pkgconfig, but the default can be changed by passing
873 # DIRECTORY. The user can override through the --with-pkgconfigdir
875 AC_DEFUN([PKG_INSTALLDIR],
876 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
877 m4_pushdef([pkg_description],
878 [pkg-config installation directory @<:@]pkg_default[@:>@])
879 AC_ARG_WITH([pkgconfigdir],
880 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
881 [with_pkgconfigdir=]pkg_default)
882 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
883 m4_popdef([pkg_default])
884 m4_popdef([pkg_description])
885 ]) dnl PKG_INSTALLDIR
888 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
889 # -------------------------
890 # Substitutes the variable noarch_pkgconfigdir as the location where a
891 # module should install arch-independent pkg-config .pc files. By
892 # default the directory is $datadir/pkgconfig, but the default can be
893 # changed by passing DIRECTORY. The user can override through the
894 # --with-noarch-pkgconfigdir parameter.
895 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
896 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
897 m4_pushdef([pkg_description],
898 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
899 AC_ARG_WITH([noarch-pkgconfigdir],
900 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
901 [with_noarch_pkgconfigdir=]pkg_default)
902 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
903 m4_popdef([pkg_default])
904 m4_popdef([pkg_description])
905 ]) dnl PKG_NOARCH_INSTALLDIR
908 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
909 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
910 # -------------------------------------------
911 # Retrieves the value of the pkg-config variable for the given module.
912 AC_DEFUN([PKG_CHECK_VAR],
913 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
914 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
916 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
917 AS_VAR_COPY([$1], [pkg_cv_][$1])
919 AS_VAR_IF([$1], [""], [$5], [$4])dnl
922 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
924 # This file is free software; the Free Software Foundation
925 # gives unlimited permission to copy and/or distribute it,
926 # with or without modifications, as long as this notice is preserved.
928 # AM_AUTOMAKE_VERSION(VERSION)
929 # ----------------------------
930 # Automake X.Y traces this macro to ensure aclocal.m4 has been
931 # generated from the m4 files accompanying Automake X.Y.
932 # (This private macro should not be called outside this file.)
933 AC_DEFUN([AM_AUTOMAKE_VERSION],
934 [am__api_version='1.14'
935 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
936 dnl require some minimum version. Point them to the right macro.
937 m4_if([$1], [1.14.1], [],
938 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
941 # _AM_AUTOCONF_VERSION(VERSION)
942 # -----------------------------
943 # aclocal traces this macro to find the Autoconf version.
944 # This is a private macro too. Using m4_define simplifies
945 # the logic in aclocal, which can simply ignore this definition.
946 m4_define([_AM_AUTOCONF_VERSION], [])
948 # AM_SET_CURRENT_AUTOMAKE_VERSION
949 # -------------------------------
950 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
951 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
952 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
953 [AM_AUTOMAKE_VERSION([1.14.1])dnl
954 m4_ifndef([AC_AUTOCONF_VERSION],
955 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
956 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
958 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
960 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
962 # This file is free software; the Free Software Foundation
963 # gives unlimited permission to copy and/or distribute it,
964 # with or without modifications, as long as this notice is preserved.
966 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
967 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
968 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
970 # Of course, Automake must honor this variable whenever it calls a
971 # tool from the auxiliary directory. The problem is that $srcdir (and
972 # therefore $ac_aux_dir as well) can be either absolute or relative,
973 # depending on how configure is run. This is pretty annoying, since
974 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
975 # source directory, any form will work fine, but in subdirectories a
976 # relative path needs to be adjusted first.
978 # $ac_aux_dir/missing
979 # fails when called from a subdirectory if $ac_aux_dir is relative
980 # $top_srcdir/$ac_aux_dir/missing
981 # fails if $ac_aux_dir is absolute,
982 # fails when called from a subdirectory in a VPATH build with
983 # a relative $ac_aux_dir
985 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
986 # are both prefixed by $srcdir. In an in-source build this is usually
987 # harmless because $srcdir is '.', but things will broke when you
988 # start a VPATH build or use an absolute $srcdir.
990 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
991 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
992 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
993 # and then we would define $MISSING as
994 # MISSING="\${SHELL} $am_aux_dir/missing"
995 # This will work as long as MISSING is not called from configure, because
996 # unfortunately $(top_srcdir) has no meaning in configure.
997 # However there are other variables, like CC, which are often used in
998 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1000 # Another solution, used here, is to always expand $ac_aux_dir to an
1001 # absolute PATH. The drawback is that using absolute paths prevent a
1002 # configured tree to be moved without reconfiguration.
1004 AC_DEFUN([AM_AUX_DIR_EXPAND],
1005 [dnl Rely on autoconf to set up CDPATH properly.
1006 AC_PREREQ([2.50])dnl
1007 # expand $ac_aux_dir to an absolute path
1008 am_aux_dir=`cd $ac_aux_dir && pwd`
1011 # AM_CONDITIONAL -*- Autoconf -*-
1013 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1015 # This file is free software; the Free Software Foundation
1016 # gives unlimited permission to copy and/or distribute it,
1017 # with or without modifications, as long as this notice is preserved.
1019 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1020 # -------------------------------------
1021 # Define a conditional.
1022 AC_DEFUN([AM_CONDITIONAL],
1023 [AC_PREREQ([2.52])dnl
1024 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1025 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1026 AC_SUBST([$1_TRUE])dnl
1027 AC_SUBST([$1_FALSE])dnl
1028 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1029 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1030 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1038 AC_CONFIG_COMMANDS_PRE(
1039 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1040 AC_MSG_ERROR([[conditional "$1" was never defined.
1041 Usually this means the macro was only invoked conditionally.]])
1044 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1046 # This file is free software; the Free Software Foundation
1047 # gives unlimited permission to copy and/or distribute it,
1048 # with or without modifications, as long as this notice is preserved.
1051 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1052 # written in clear, in which case automake, when reading aclocal.m4,
1053 # will think it sees a *use*, and therefore will trigger all it's
1054 # C support machinery. Also note that it means that autoscan, seeing
1055 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1058 # _AM_DEPENDENCIES(NAME)
1059 # ----------------------
1060 # See how the compiler implements dependency checking.
1061 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1062 # We try a few techniques and use that to set a single cache variable.
1064 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1065 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1066 # dependency, and given that the user is not expected to run this macro,
1067 # just rely on AC_PROG_CC.
1068 AC_DEFUN([_AM_DEPENDENCIES],
1069 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1070 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1071 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1072 AC_REQUIRE([AM_DEP_TRACK])dnl
1074 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
1075 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
1076 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1077 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1078 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
1079 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1080 [depcc="$$1" am_compiler_list=])
1082 AC_CACHE_CHECK([dependency style of $depcc],
1083 [am_cv_$1_dependencies_compiler_type],
1084 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1085 # We make a subdir and do the tests there. Otherwise we can end up
1086 # making bogus files that we don't know about and never remove. For
1087 # instance it was reported that on HP-UX the gcc test will end up
1088 # making a dummy file named 'D' -- because '-MD' means "put the output
1092 # Copy depcomp to subdir because otherwise we won't find it if we're
1093 # using a relative directory.
1094 cp "$am_depcomp" conftest.dir
1096 # We will build objects and dependencies in a subdirectory because
1097 # it helps to detect inapplicable dependency modes. For instance
1098 # both Tru64's cc and ICC support -MD to output dependencies as a
1099 # side effect of compilation, but ICC will put the dependencies in
1100 # the current directory while Tru64 will put them in the object
1104 am_cv_$1_dependencies_compiler_type=none
1105 if test "$am_compiler_list" = ""; then
1106 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1110 [case " $depcc " in #(
1111 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1114 [case " $depcc " in #(
1115 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1118 for depmode in $am_compiler_list; do
1119 # Setup a source with many dependencies, because some compilers
1120 # like to wrap large dependency lists on column 80 (with \), and
1121 # we should not choose a depcomp mode which is confused by this.
1123 # We need to recreate these files for each test, as the compiler may
1124 # overwrite some of them when testing with obscure command lines.
1125 # This happens at least with the AIX C compiler.
1127 for i in 1 2 3 4 5 6; do
1128 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1129 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
1130 # Solaris 10 /bin/sh.
1131 echo '/* dummy */' > sub/conftst$i.h
1133 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1135 # We check with '-c' and '-o' for the sake of the "dashmstdout"
1136 # mode. It turns out that the SunPro C++ compiler does not properly
1137 # handle '-M -o', and we need to detect this. Also, some Intel
1138 # versions had trouble with output in subdirs.
1139 am__obj=sub/conftest.${OBJEXT-o}
1140 am__minus_obj="-o $am__obj"
1143 # This depmode causes a compiler race in universal mode.
1144 test "$am__universal" = false || continue
1147 # After this tag, mechanisms are not by side-effect, so they'll
1148 # only be used when explicitly requested.
1149 if test "x$enable_dependency_tracking" = xyes; then
1155 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1156 # This compiler won't grok '-c -o', but also, the minuso test has
1157 # not run yet. These depmodes are late enough in the game, and
1158 # so weak that their functioning should not be impacted.
1159 am__obj=conftest.${OBJEXT-o}
1164 if depmode=$depmode \
1165 source=sub/conftest.c object=$am__obj \
1166 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1167 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1168 >/dev/null 2>conftest.err &&
1169 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1170 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1171 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1172 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1173 # icc doesn't choke on unknown options, it will just issue warnings
1174 # or remarks (even with -Werror). So we grep stderr for any message
1175 # that says an option was ignored or not supported.
1176 # When given -MP, icc 7.0 and 7.1 complain thusly:
1177 # icc: Command line warning: ignoring option '-M'; no argument required
1178 # The diagnosis changed in icc 8.0:
1179 # icc: Command line remark: option '-MP' not supported
1180 if (grep 'ignoring option' conftest.err ||
1181 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1182 am_cv_$1_dependencies_compiler_type=$depmode
1191 am_cv_$1_dependencies_compiler_type=none
1194 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1195 AM_CONDITIONAL([am__fastdep$1], [
1196 test "x$enable_dependency_tracking" != xno \
1197 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1203 # Choose a directory name for dependency files.
1204 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
1205 AC_DEFUN([AM_SET_DEPDIR],
1206 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1207 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1213 AC_DEFUN([AM_DEP_TRACK],
1214 [AC_ARG_ENABLE([dependency-tracking], [dnl
1216 [--enable-dependency-tracking],
1217 [do not reject slow dependency extractors])
1219 [--disable-dependency-tracking],
1220 [speeds up one-time build])])
1221 if test "x$enable_dependency_tracking" != xno; then
1222 am_depcomp="$ac_aux_dir/depcomp"
1226 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1227 AC_SUBST([AMDEPBACKSLASH])dnl
1228 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1229 AC_SUBST([am__nodep])dnl
1230 _AM_SUBST_NOTMAKE([am__nodep])dnl
1233 # Generate code to set up dependency tracking. -*- Autoconf -*-
1235 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1237 # This file is free software; the Free Software Foundation
1238 # gives unlimited permission to copy and/or distribute it,
1239 # with or without modifications, as long as this notice is preserved.
1242 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1243 # ------------------------------
1244 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1246 # Older Autoconf quotes --file arguments for eval, but not when files
1247 # are listed without --file. Let's play safe and only enable the eval
1248 # if we detect the quoting.
1249 case $CONFIG_FILES in
1250 *\'*) eval set x "$CONFIG_FILES" ;;
1251 *) set x $CONFIG_FILES ;;
1256 # Strip MF so we end up with the name of the file.
1257 mf=`echo "$mf" | sed -e 's/:.*$//'`
1258 # Check whether this is an Automake generated Makefile or not.
1259 # We used to match only the files named 'Makefile.in', but
1260 # some people rename them; so instead we look at the file content.
1261 # Grep'ing the first line is not enough: some people post-process
1262 # each Makefile.in and add a new line on top of each file to say so.
1263 # Grep'ing the whole file is not good either: AIX grep has a line
1264 # limit of 2048, but all sed's we know have understand at least 4000.
1265 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1266 dirpart=`AS_DIRNAME("$mf")`
1270 # Extract the definition of DEPDIR, am__include, and am__quote
1271 # from the Makefile without running 'make'.
1272 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1273 test -z "$DEPDIR" && continue
1274 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1275 test -z "$am__include" && continue
1276 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1277 # Find all dependency output files, they are included files with
1278 # $(DEPDIR) in their names. We invoke sed twice because it is the
1279 # simplest approach to changing $(DEPDIR) to its actual value in the
1281 for file in `sed -n "
1282 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1283 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1284 # Make sure the directory exists.
1285 test -f "$dirpart/$file" && continue
1286 fdir=`AS_DIRNAME(["$file"])`
1287 AS_MKDIR_P([$dirpart/$fdir])
1288 # echo "creating $dirpart/$file"
1289 echo '# dummy' > "$dirpart/$file"
1293 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1296 # AM_OUTPUT_DEPENDENCY_COMMANDS
1297 # -----------------------------
1298 # This macro should only be invoked once -- use via AC_REQUIRE.
1300 # This code is only required when automatic dependency tracking
1301 # is enabled. FIXME. This creates each '.P' file that we will
1302 # need in order to bootstrap the dependency handling code.
1303 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1304 [AC_CONFIG_COMMANDS([depfiles],
1305 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1306 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1309 # Do all the work for Automake. -*- Autoconf -*-
1311 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1313 # This file is free software; the Free Software Foundation
1314 # gives unlimited permission to copy and/or distribute it,
1315 # with or without modifications, as long as this notice is preserved.
1317 # This macro actually does too much. Some checks are only needed if
1318 # your package does certain things. But this isn't really a big deal.
1320 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
1321 m4_define([AC_PROG_CC],
1322 m4_defn([AC_PROG_CC])
1326 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1327 # AM_INIT_AUTOMAKE([OPTIONS])
1328 # -----------------------------------------------
1329 # The call with PACKAGE and VERSION arguments is the old style
1330 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1331 # and VERSION should now be passed to AC_INIT and removed from
1332 # the call to AM_INIT_AUTOMAKE.
1333 # We support both call styles for the transition. After
1334 # the next Automake release, Autoconf can make the AC_INIT
1335 # arguments mandatory, and then we can depend on a new Autoconf
1336 # release and drop the old call support.
1337 AC_DEFUN([AM_INIT_AUTOMAKE],
1338 [AC_PREREQ([2.65])dnl
1339 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1340 dnl the ones we care about.
1341 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1342 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1343 AC_REQUIRE([AC_PROG_INSTALL])dnl
1344 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1345 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1346 # is not polluted with repeated "-I."
1347 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1348 # test to see if srcdir already configured
1349 if test -f $srcdir/config.status; then
1350 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1354 # test whether we have cygpath
1355 if test -z "$CYGPATH_W"; then
1356 if (cygpath --version) >/dev/null 2>/dev/null; then
1357 CYGPATH_W='cygpath -w'
1362 AC_SUBST([CYGPATH_W])
1364 # Define the identity of the package.
1365 dnl Distinguish between old-style and new-style calls.
1367 [AC_DIAGNOSE([obsolete],
1368 [$0: two- and three-arguments forms are deprecated.])
1369 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1370 AC_SUBST([PACKAGE], [$1])dnl
1371 AC_SUBST([VERSION], [$2])],
1372 [_AM_SET_OPTIONS([$1])dnl
1373 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1375 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
1377 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1378 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1379 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1381 _AM_IF_OPTION([no-define],,
1382 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
1383 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
1385 # Some tools Automake needs.
1386 AC_REQUIRE([AM_SANITY_CHECK])dnl
1387 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1388 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
1389 AM_MISSING_PROG([AUTOCONF], [autoconf])
1390 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
1391 AM_MISSING_PROG([AUTOHEADER], [autoheader])
1392 AM_MISSING_PROG([MAKEINFO], [makeinfo])
1393 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1394 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1395 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1396 # For better backward compatibility. To be removed once Automake 1.9.x
1397 # dies out for good. For more background, see:
1398 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
1399 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
1400 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
1401 # We need awk for the "check" target. The system "awk" is bad on
1403 AC_REQUIRE([AC_PROG_AWK])dnl
1404 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1405 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1406 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1407 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1408 [_AM_PROG_TAR([v7])])])
1409 _AM_IF_OPTION([no-dependencies],,
1410 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1411 [_AM_DEPENDENCIES([CC])],
1412 [m4_define([AC_PROG_CC],
1413 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
1414 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1415 [_AM_DEPENDENCIES([CXX])],
1416 [m4_define([AC_PROG_CXX],
1417 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
1418 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1419 [_AM_DEPENDENCIES([OBJC])],
1420 [m4_define([AC_PROG_OBJC],
1421 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
1422 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
1423 [_AM_DEPENDENCIES([OBJCXX])],
1424 [m4_define([AC_PROG_OBJCXX],
1425 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
1427 AC_REQUIRE([AM_SILENT_RULES])dnl
1428 dnl The testsuite driver may need to know about EXEEXT, so add the
1429 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1430 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1431 AC_CONFIG_COMMANDS_PRE(dnl
1432 [m4_provide_if([_AM_COMPILER_EXEEXT],
1433 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1435 # POSIX will say in a future version that running "rm -f" with no argument
1436 # is OK; and we want to be able to make that assumption in our Makefile
1437 # recipes. So use an aggressive probe to check that the usage we want is
1438 # actually supported "in the wild" to an acceptable degree.
1439 # See automake bug#10828.
1440 # To make any issue more visible, cause the running configure to be aborted
1441 # by default if the 'rm' program in use doesn't match our expectations; the
1442 # user can still override this though.
1443 if rm -f && rm -fr && rm -rf; then : OK; else
1447 Your 'rm' program seems unable to run without file operands specified
1448 on the command line, even when the '-f' option is present. This is contrary
1449 to the behaviour of most rm programs out there, and not conforming with
1450 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
1452 Please tell bug-automake@gnu.org about your system, including the value
1453 of your $PATH and any error possibly output before this message. This
1454 can help us improve future automake versions.
1457 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
1458 echo 'Configuration will proceed anyway, since you have set the' >&2
1459 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
1463 Aborting the configuration process, to ensure you take notice of the issue.
1465 You can download and install GNU coreutils to get an 'rm' implementation
1466 that behaves properly: <http://www.gnu.org/software/coreutils/>.
1468 If you want to complete the configuration process using your problematic
1469 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
1470 to "yes", and re-run configure.
1473 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
1478 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1479 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1480 dnl mangled by Autoconf and run in a shell conditional statement.
1481 m4_define([_AC_COMPILER_EXEEXT],
1482 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1484 # When config.status generates a header, we must update the stamp-h file.
1485 # This file resides in the same directory as the config header
1486 # that is generated. The stamp files are numbered to have different names.
1488 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1489 # loop where config.status creates the headers, so we can generate
1490 # our stamp files there.
1491 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1492 [# Compute $1's index in $config_headers.
1495 for _am_header in $config_headers :; do
1497 $_am_arg | $_am_arg:* )
1500 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1503 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1505 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1507 # This file is free software; the Free Software Foundation
1508 # gives unlimited permission to copy and/or distribute it,
1509 # with or without modifications, as long as this notice is preserved.
1511 # AM_PROG_INSTALL_SH
1512 # ------------------
1513 # Define $install_sh.
1514 AC_DEFUN([AM_PROG_INSTALL_SH],
1515 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1516 if test x"${install_sh}" != xset; then
1519 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1521 install_sh="\${SHELL} $am_aux_dir/install-sh"
1524 AC_SUBST([install_sh])])
1526 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1528 # This file is free software; the Free Software Foundation
1529 # gives unlimited permission to copy and/or distribute it,
1530 # with or without modifications, as long as this notice is preserved.
1532 # Check whether the underlying file-system supports filenames
1533 # with a leading dot. For instance MS-DOS doesn't.
1534 AC_DEFUN([AM_SET_LEADING_DOT],
1535 [rm -rf .tst 2>/dev/null
1536 mkdir .tst 2>/dev/null
1537 if test -d .tst; then
1542 rmdir .tst 2>/dev/null
1543 AC_SUBST([am__leading_dot])])
1545 # Check to see how 'make' treats includes. -*- Autoconf -*-
1547 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1549 # This file is free software; the Free Software Foundation
1550 # gives unlimited permission to copy and/or distribute it,
1551 # with or without modifications, as long as this notice is preserved.
1555 # Check to see how make treats includes.
1556 AC_DEFUN([AM_MAKE_INCLUDE],
1557 [am_make=${MAKE-make}
1558 cat > confinc << 'END'
1560 @echo this is the am__doit target
1563 # If we don't find an include directive, just comment out the code.
1564 AC_MSG_CHECKING([for style of include used by $am_make])
1568 # First try GNU make style include.
1569 echo "include confinc" > confmf
1570 # Ignore all kinds of additional output from 'make'.
1571 case `$am_make -s -f confmf 2> /dev/null` in #(
1572 *the\ am__doit\ target*)
1578 # Now try BSD make style include.
1579 if test "$am__include" = "#"; then
1580 echo '.include "confinc"' > confmf
1581 case `$am_make -s -f confmf 2> /dev/null` in #(
1582 *the\ am__doit\ target*)
1583 am__include=.include
1589 AC_SUBST([am__include])
1590 AC_SUBST([am__quote])
1591 AC_MSG_RESULT([$_am_result])
1592 rm -f confinc confmf
1595 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1597 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1599 # This file is free software; the Free Software Foundation
1600 # gives unlimited permission to copy and/or distribute it,
1601 # with or without modifications, as long as this notice is preserved.
1603 # AM_MISSING_PROG(NAME, PROGRAM)
1604 # ------------------------------
1605 AC_DEFUN([AM_MISSING_PROG],
1606 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1607 $1=${$1-"${am_missing_run}$2"}
1610 # AM_MISSING_HAS_RUN
1611 # ------------------
1612 # Define MISSING if not defined so far and test if it is modern enough.
1613 # If it is, set am_missing_run to use it, otherwise, to nothing.
1614 AC_DEFUN([AM_MISSING_HAS_RUN],
1615 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1616 AC_REQUIRE_AUX_FILE([missing])dnl
1617 if test x"${MISSING+set}" != xset; then
1620 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1622 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1625 # Use eval to expand $SHELL
1626 if eval "$MISSING --is-lightweight"; then
1627 am_missing_run="$MISSING "
1630 AC_MSG_WARN(['missing' script is too old or missing])
1634 # Helper functions for option handling. -*- Autoconf -*-
1636 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1638 # This file is free software; the Free Software Foundation
1639 # gives unlimited permission to copy and/or distribute it,
1640 # with or without modifications, as long as this notice is preserved.
1642 # _AM_MANGLE_OPTION(NAME)
1643 # -----------------------
1644 AC_DEFUN([_AM_MANGLE_OPTION],
1645 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1647 # _AM_SET_OPTION(NAME)
1648 # --------------------
1649 # Set option NAME. Presently that only means defining a flag for this option.
1650 AC_DEFUN([_AM_SET_OPTION],
1651 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1653 # _AM_SET_OPTIONS(OPTIONS)
1654 # ------------------------
1655 # OPTIONS is a space-separated list of Automake options.
1656 AC_DEFUN([_AM_SET_OPTIONS],
1657 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1659 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1660 # -------------------------------------------
1661 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1662 AC_DEFUN([_AM_IF_OPTION],
1663 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1665 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1667 # This file is free software; the Free Software Foundation
1668 # gives unlimited permission to copy and/or distribute it,
1669 # with or without modifications, as long as this notice is preserved.
1673 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1674 # to automatically call this.
1675 AC_DEFUN([_AM_PROG_CC_C_O],
1676 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1677 AC_REQUIRE_AUX_FILE([compile])dnl
1678 AC_LANG_PUSH([C])dnl
1680 [whether $CC understands -c and -o together],
1681 [am_cv_prog_cc_c_o],
1682 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1683 # Make sure it works both with $CC and with simple cc.
1684 # Following AC_PROG_CC_C_O, we do the test twice because some
1685 # compilers refuse to overwrite an existing .o file with -o,
1686 # though they will create one.
1687 am_cv_prog_cc_c_o=yes
1689 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1690 && test -f conftest2.$ac_objext; then
1693 am_cv_prog_cc_c_o=no
1697 rm -f core conftest*
1699 if test "$am_cv_prog_cc_c_o" != yes; then
1700 # Losing compiler, so override with the script.
1701 # FIXME: It is wrong to rewrite CC.
1702 # But if we don't then we get into trouble of one sort or another.
1703 # A longer-term fix would be to have automake use am__CC in this case,
1704 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1705 CC="$am_aux_dir/compile $CC"
1709 # For backward compatibility.
1710 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1712 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1714 # This file is free software; the Free Software Foundation
1715 # gives unlimited permission to copy and/or distribute it,
1716 # with or without modifications, as long as this notice is preserved.
1719 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1720 # ---------------------------------------------------------------------------
1721 # Adds support for distributing Python modules and packages. To
1722 # install modules, copy them to $(pythondir), using the python_PYTHON
1723 # automake variable. To install a package with the same name as the
1724 # automake package, install to $(pkgpythondir), or use the
1725 # pkgpython_PYTHON automake variable.
1727 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1728 # locations to install python extension modules (shared libraries).
1729 # Another macro is required to find the appropriate flags to compile
1730 # extension modules.
1732 # If your package is configured with a different prefix to python,
1733 # users will have to add the install directory to the PYTHONPATH
1734 # environment variable, or create a .pth file (see the python
1735 # documentation for details).
1737 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1738 # cause an error if the version of python installed on the system
1739 # doesn't meet the requirement. MINIMUM-VERSION should consist of
1740 # numbers and dots only.
1741 AC_DEFUN([AM_PATH_PYTHON],
1743 dnl Find a Python interpreter. Python versions prior to 2.0 are not
1744 dnl supported. (2.0 was released on October 16, 2000).
1745 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1746 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
1747 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
1749 AC_ARG_VAR([PYTHON], [the Python interpreter])
1752 dnl No version check is needed.
1753 # Find any Python interpreter.
1754 if test -z "$PYTHON"; then
1755 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1757 am_display_PYTHON=python
1759 dnl A version check is needed.
1760 if test -n "$PYTHON"; then
1761 # If the user set $PYTHON, use it and don't search something else.
1762 AC_MSG_CHECKING([whether $PYTHON version is >= $1])
1763 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1764 [AC_MSG_RESULT([yes])],
1765 [AC_MSG_RESULT([no])
1766 AC_MSG_ERROR([Python interpreter is too old])])
1767 am_display_PYTHON=$PYTHON
1769 # Otherwise, try each interpreter until we find one that satisfies
1771 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1772 [am_cv_pathless_PYTHON],[
1773 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1774 test "$am_cv_pathless_PYTHON" = none && break
1775 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1777 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1778 if test "$am_cv_pathless_PYTHON" = none; then
1781 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1783 am_display_PYTHON=$am_cv_pathless_PYTHON
1787 if test "$PYTHON" = :; then
1788 dnl Run any user-specified action, or abort.
1789 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1792 dnl Query Python for its version number. Getting [:3] seems to be
1793 dnl the best way to do this; it's what "site.py" does in the standard
1796 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1797 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1798 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1800 dnl Use the values of $prefix and $exec_prefix for the corresponding
1801 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
1802 dnl distinct variables so they can be overridden if need be. However,
1803 dnl general consensus is that you shouldn't need this ability.
1805 AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1806 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1808 dnl At times (like when building shared libraries) you may want
1809 dnl to know which OS platform Python thinks this is.
1811 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1812 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1813 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1815 # Just factor out some code duplication.
1816 am_python_setup_sysconfig="\
1818 # Prefer sysconfig over distutils.sysconfig, for better compatibility
1819 # with python 3.x. See automake bug#10227.
1823 can_use_sysconfig = 0
1825 can_use_sysconfig = 1
1826 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1827 # <https://github.com/pypa/virtualenv/issues/118>
1829 from platform import python_implementation
1830 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1831 can_use_sysconfig = 0
1835 dnl Set up 4 directories:
1837 dnl pythondir -- where to install python scripts. This is the
1838 dnl site-packages directory, not the python standard library
1839 dnl directory like in previous automake betas. This behavior
1840 dnl is more consistent with lispdir.m4 for example.
1841 dnl Query distutils for this directory.
1842 AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1843 [am_cv_python_pythondir],
1844 [if test "x$prefix" = xNONE
1846 am_py_prefix=$ac_default_prefix
1848 am_py_prefix=$prefix
1850 am_cv_python_pythondir=`$PYTHON -c "
1851 $am_python_setup_sysconfig
1852 if can_use_sysconfig:
1853 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1855 from distutils import sysconfig
1856 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1857 sys.stdout.write(sitedir)"`
1858 case $am_cv_python_pythondir in
1860 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1861 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1864 case $am_py_prefix in
1867 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1873 AC_SUBST([pythondir], [$am_cv_python_pythondir])
1875 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
1876 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
1877 dnl more consistent with the rest of automake.
1879 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1881 dnl pyexecdir -- directory for installing python extension modules
1882 dnl (shared libraries)
1883 dnl Query distutils for this directory.
1884 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1885 [am_cv_python_pyexecdir],
1886 [if test "x$exec_prefix" = xNONE
1888 am_py_exec_prefix=$am_py_prefix
1890 am_py_exec_prefix=$exec_prefix
1892 am_cv_python_pyexecdir=`$PYTHON -c "
1893 $am_python_setup_sysconfig
1894 if can_use_sysconfig:
1895 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
1897 from distutils import sysconfig
1898 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
1899 sys.stdout.write(sitedir)"`
1900 case $am_cv_python_pyexecdir in
1901 $am_py_exec_prefix*)
1902 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1903 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1906 case $am_py_exec_prefix in
1909 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1915 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1917 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1919 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1921 dnl Run any user-specified action.
1928 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1929 # ---------------------------------------------------------------------------
1930 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1931 # Run ACTION-IF-FALSE otherwise.
1932 # This test uses sys.hexversion instead of the string equivalent (first
1933 # word of sys.version), in order to cope with versions such as 2.2c1.
1934 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1935 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1937 # split strings by '.' and convert to numeric. Append some zeros
1938 # because we need at least 4 digits for the hex conversion.
1939 # map returns an iterator in Python 3.0 and a list in 2.x
1940 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1942 # xrange is not present in Python 3.0 and range returns an iterator
1943 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1944 sys.exit(sys.hexversion < minverhex)"
1945 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1947 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1949 # This file is free software; the Free Software Foundation
1950 # gives unlimited permission to copy and/or distribute it,
1951 # with or without modifications, as long as this notice is preserved.
1953 # AM_RUN_LOG(COMMAND)
1954 # -------------------
1955 # Run COMMAND, save the exit status in ac_status, and log it.
1956 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1957 AC_DEFUN([AM_RUN_LOG],
1958 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1959 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1961 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1962 (exit $ac_status); }])
1964 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1966 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1968 # This file is free software; the Free Software Foundation
1969 # gives unlimited permission to copy and/or distribute it,
1970 # with or without modifications, as long as this notice is preserved.
1974 AC_DEFUN([AM_SANITY_CHECK],
1975 [AC_MSG_CHECKING([whether build environment is sane])
1976 # Reject unsafe characters in $srcdir or the absolute working directory
1977 # name. Accept space and tab only in the latter.
1981 *[[\\\"\#\$\&\'\`$am_lf]]*)
1982 AC_MSG_ERROR([unsafe absolute working directory name]);;
1985 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1986 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1989 # Do 'set' in a subshell so we don't clobber the current shell's
1990 # arguments. Must try -L first in case configure is actually a
1991 # symlink; some systems play weird games with the mod time of symlinks
1992 # (eg FreeBSD returns the mod time of the symlink's containing
1996 for am_try in 1 2; do
1997 echo "timestamp, slept: $am_has_slept" > conftest.file
1998 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1999 if test "$[*]" = "X"; then
2001 set X `ls -t "$srcdir/configure" conftest.file`
2003 if test "$[*]" != "X $srcdir/configure conftest.file" \
2004 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2006 # If neither matched, then we have a broken ls. This can happen
2007 # if, for instance, CONFIG_SHELL is bash and it inherits a
2008 # broken ls alias from the environment. This has actually
2009 # happened. Such a system could not be considered "sane".
2010 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2011 alias in your environment])
2013 if test "$[2]" = conftest.file || test $am_try -eq 2; then
2020 test "$[2]" = conftest.file
2026 AC_MSG_ERROR([newly created file is older than distributed files!
2027 Check your system clock])
2029 AC_MSG_RESULT([yes])
2030 # If we didn't sleep, we still need to ensure time stamps of config.status and
2031 # generated files are strictly newer.
2033 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2037 AC_CONFIG_COMMANDS_PRE(
2038 [AC_MSG_CHECKING([that generated files are newer than configure])
2039 if test -n "$am_sleep_pid"; then
2040 # Hide warnings about reused PIDs.
2041 wait $am_sleep_pid 2>/dev/null
2043 AC_MSG_RESULT([done])])
2047 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
2049 # This file is free software; the Free Software Foundation
2050 # gives unlimited permission to copy and/or distribute it,
2051 # with or without modifications, as long as this notice is preserved.
2053 # AM_SILENT_RULES([DEFAULT])
2054 # --------------------------
2055 # Enable less verbose build rules; with the default set to DEFAULT
2056 # ("yes" being less verbose, "no" or empty being verbose).
2057 AC_DEFUN([AM_SILENT_RULES],
2058 [AC_ARG_ENABLE([silent-rules], [dnl
2060 [--enable-silent-rules],
2061 [less verbose build output (undo: "make V=1")])
2063 [--disable-silent-rules],
2064 [verbose build output (undo: "make V=0")])dnl
2066 case $enable_silent_rules in @%:@ (((
2067 yes) AM_DEFAULT_VERBOSITY=0;;
2068 no) AM_DEFAULT_VERBOSITY=1;;
2069 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2072 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
2073 dnl do not support nested variable expansions.
2074 dnl See automake bug#9928 and bug#10237.
2075 am_make=${MAKE-make}
2076 AC_CACHE_CHECK([whether $am_make supports nested variables],
2077 [am_cv_make_support_nested_variables],
2078 [if AS_ECHO([['TRUE=$(BAR$(V))
2084 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
2085 am_cv_make_support_nested_variables=yes
2087 am_cv_make_support_nested_variables=no
2089 if test $am_cv_make_support_nested_variables = yes; then
2090 dnl Using '$V' instead of '$(V)' breaks IRIX make.
2092 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2094 AM_V=$AM_DEFAULT_VERBOSITY
2095 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2098 AM_SUBST_NOTMAKE([AM_V])dnl
2099 AC_SUBST([AM_DEFAULT_V])dnl
2100 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2101 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2103 AC_SUBST([AM_BACKSLASH])dnl
2104 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2107 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
2109 # This file is free software; the Free Software Foundation
2110 # gives unlimited permission to copy and/or distribute it,
2111 # with or without modifications, as long as this notice is preserved.
2113 # AM_PROG_INSTALL_STRIP
2114 # ---------------------
2115 # One issue with vendor 'install' (even GNU) is that you can't
2116 # specify the program used to strip binaries. This is especially
2117 # annoying in cross-compiling environments, where the build's strip
2118 # is unlikely to handle the host's binaries.
2119 # Fortunately install-sh will honor a STRIPPROG variable, so we
2120 # always use install-sh in "make install-strip", and initialize
2121 # STRIPPROG with the value of the STRIP variable (set by the user).
2122 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2123 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2124 # Installed binaries are usually stripped using 'strip' when the user
2125 # run "make install-strip". However 'strip' might not be the right
2126 # tool to use in cross-compilation environments, therefore Automake
2127 # will honor the 'STRIP' environment variable to overrule this program.
2128 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
2129 if test "$cross_compiling" != no; then
2130 AC_CHECK_TOOL([STRIP], [strip], :)
2132 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2133 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2135 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
2137 # This file is free software; the Free Software Foundation
2138 # gives unlimited permission to copy and/or distribute it,
2139 # with or without modifications, as long as this notice is preserved.
2141 # _AM_SUBST_NOTMAKE(VARIABLE)
2142 # ---------------------------
2143 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2144 # This macro is traced by Automake.
2145 AC_DEFUN([_AM_SUBST_NOTMAKE])
2147 # AM_SUBST_NOTMAKE(VARIABLE)
2148 # --------------------------
2149 # Public sister of _AM_SUBST_NOTMAKE.
2150 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2152 # Check how to create a tarball. -*- Autoconf -*-
2154 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
2156 # This file is free software; the Free Software Foundation
2157 # gives unlimited permission to copy and/or distribute it,
2158 # with or without modifications, as long as this notice is preserved.
2160 # _AM_PROG_TAR(FORMAT)
2161 # --------------------
2162 # Check how to create a tarball in format FORMAT.
2163 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
2165 # Substitute a variable $(am__tar) that is a command
2166 # writing to stdout a FORMAT-tarball containing the directory
2168 # tardir=directory && $(am__tar) > result.tar
2170 # Substitute a variable $(am__untar) that extract such
2171 # a tarball read from stdin.
2172 # $(am__untar) < result.tar
2174 AC_DEFUN([_AM_PROG_TAR],
2175 [# Always define AMTAR for backward compatibility. Yes, it's still used
2176 # in the wild :-( We should find a proper way to deprecate it ...
2177 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2179 # We'll loop over all known methods to create a tar archive until one works.
2180 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2183 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2187 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
2188 # There is notably a 21 bits limit for the UID and the GID. In fact,
2189 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
2191 am_max_uid=2097151 # 2^21 - 1
2192 am_max_gid=$am_max_uid
2193 # The $UID and $GID variables are not portable, so we need to resort
2194 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
2195 # below are definitely unexpected, so allow the users to see them
2196 # (that is, avoid stderr redirection).
2197 am_uid=`id -u || echo unknown`
2198 am_gid=`id -g || echo unknown`
2199 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
2200 if test $am_uid -le $am_max_uid; then
2201 AC_MSG_RESULT([yes])
2206 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
2207 if test $am_gid -le $am_max_gid; then
2208 AC_MSG_RESULT([yes])
2217 [m4_fatal([Unknown tar format])])
2219 AC_MSG_CHECKING([how to create a $1 tar archive])
2221 # Go ahead even if we have the value already cached. We do so because we
2222 # need to set the values for the 'am__tar' and 'am__untar' variables.
2223 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2225 for _am_tool in $_am_tools; do
2228 for _am_tar in tar gnutar gtar; do
2229 AM_RUN_LOG([$_am_tar --version]) && break
2231 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2232 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2233 am__untar="$_am_tar -xf -"
2236 # Must skip GNU tar: if it does not support --format= it doesn't create
2237 # ustar tarball either.
2238 (tar --version) >/dev/null 2>&1 && continue
2239 am__tar='tar chf - "$$tardir"'
2240 am__tar_='tar chf - "$tardir"'
2241 am__untar='tar xf -'
2244 am__tar='pax -L -x $1 -w "$$tardir"'
2245 am__tar_='pax -L -x $1 -w "$tardir"'
2249 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2250 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2251 am__untar='cpio -i -H $1 -d'
2260 # If the value was cached, stop now. We just wanted to have am__tar
2261 # and am__untar set.
2262 test -n "${am_cv_prog_tar_$1}" && break
2264 # tar/untar a dummy directory, and stop if the command works.
2267 echo GrepMe > conftest.dir/file
2268 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2270 if test -s conftest.tar; then
2271 AM_RUN_LOG([$am__untar <conftest.tar])
2272 AM_RUN_LOG([cat conftest.dir/file])
2273 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2278 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2279 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2282 AC_SUBST([am__untar])
2285 m4_include([m4/ac_pkg_swig.m4])
2286 m4_include([m4/ac_python_devel.m4])
2287 m4_include([m4/libtool.m4])
2288 m4_include([m4/ltoptions.m4])
2289 m4_include([m4/ltsugar.m4])
2290 m4_include([m4/ltversion.m4])
2291 m4_include([m4/lt~obsolete.m4])
2292 m4_include([m4/swig_python.m4])