1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009  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.
8
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
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17[m4_warning([this file was generated for autoconf 2.68.
18You have another version of autoconf.  It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22
23#serial 20090814
24
25AC_DEFUN([_MM_PRE_INIT], [m4_pattern_forbid([^_?MM_])])
26
27m4_define([_MM_PREREQ],
28[dnl
29m4_if(m4_quote(m4_version_compare([$2], [$3])), [-1],
30      [m4_fatal([$4 requires $1 $3 (version $2 is installed)])])[]dnl
31])
32
33AC_DEFUN([MM_PREREQ],
34[dnl
35m4_assert([$# >= 1])[]dnl
36AC_REQUIRE([_MM_PRE_INIT])[]dnl
37_MM_PREREQ([mm-common], [0.9.5], [$1], m4_defn([AC_PACKAGE_NAME]))[]dnl
38])
39
40
41#serial 20091224
42
43m4_define([_MM_PROG_GCC_VISIBILITY_CHECK],
44[dnl
45AC_PROVIDE([$0])[]dnl
46AC_CACHE_CHECK([for GCC symbol visibility options],
47               [mm_cv_gcc_visibility_cxxflags],
48[dnl
49mm_save_CXXFLAGS=$CXXFLAGS
50CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
51dnl
52AC_LINK_IFELSE([AC_LANG_PROGRAM([[
53#pragma GCC visibility push(default)
54namespace Mm { void __attribute__((__visibility__("hidden"))) mmfunc(); }
55void Mm::mmfunc() {}
56#pragma GCC visibility pop
57]], [[Mm::mmfunc();]])],
58[mm_cv_gcc_visibility_cxxflags='-fvisibility=hidden -fvisibility-inlines-hidden'],
59[mm_cv_gcc_visibility_cxxflags=none])
60dnl
61CXXFLAGS=$mm_save_CXXFLAGS])[]dnl
62])
63
64AC_DEFUN([MM_PROG_GCC_VISIBILITY],
65[dnl
66m4_assert([$# >= 1])[]dnl
67AC_LANG_ASSERT([C++])[]dnl
68AC_REQUIRE([_MM_PRE_INIT])[]dnl
69AC_REQUIRE([_MM_PROG_GCC_VISIBILITY_CHECK])[]dnl
70AS_IF([test "x$mm_cv_gcc_visibility_cxxflags" != xnone],
71      [$1=$mm_cv_gcc_visibility_cxxflags], [$1=])
72AC_SUBST([$1])[]dnl
73])
74
75m4_define([_MM_ARG_DISABLE_DEPRECATED_API_OPTION],
76[dnl
77AC_PROVIDE([$0])[]dnl
78AC_ARG_ENABLE([deprecated-api],
79              [AS_HELP_STRING([--disable-deprecated-api],
80                              [omit deprecated API from the library])],
81              [mm_enable_deprecated_api=$enableval],
82              [mm_enable_deprecated_api=yes])[]dnl
83AS_IF([test "x$mm_enable_deprecated_api" = xno],
84      [AC_MSG_WARN([[Deprecated API will not be built, breaking compatibility.
85Do not use this option for distribution packages.]])],
86      [AC_MSG_NOTICE([[Deprecated API will be built, for backwards-compatibility.]])])
87AM_CONDITIONAL([DISABLE_DEPRECATED_API], [test "x$mm_enable_deprecated_api" = xno])[]dnl
88])
89
90m4_define([_MM_ARG_DISABLE_DEPRECATED_API_DEFINE],
91[m4_foreach_w([mm_prefix], [$1],
92[AC_DEFINE(m4_defn([mm_prefix])[_DISABLE_DEPRECATED], [1],
93           [Define to omit deprecated API from the library.])
94])])
95
96AC_DEFUN([MM_ARG_DISABLE_DEPRECATED_API],
97[dnl
98AC_REQUIRE([_MM_PRE_INIT])[]dnl
99AC_REQUIRE([_MM_ARG_DISABLE_DEPRECATED_API_OPTION])[]dnl
100AS_IF([test "x$mm_enable_deprecated_api" = xno],
101      [_MM_ARG_DISABLE_DEPRECATED_API_DEFINE(
102        m4_ifval([$1], [[$1]], [AS_TR_CPP(m4_defn([AC_PACKAGE_TARNAME]))]))])[]dnl
103])
104
105
106#serial 20110327
107
108m4_define([_MM_CONFIG_DOCTOOL_DIR],
109[dnl
110AC_PROVIDE([$0])[]dnl
111AC_REQUIRE([PKG_PROG_PKG_CONFIG])[]dnl
112dnl
113AC_MSG_CHECKING([location of documentation utilities])
114AS_IF([test "x$MMDOCTOOLDIR" = x],
115[
116  MMDOCTOOLDIR=`$PKG_CONFIG --variable=doctooldir mm-common-util 2>&AS_MESSAGE_LOG_FD`
117  AS_IF([test "[$]?" -ne 0],
118        [AC_MSG_ERROR([[not found
119The required module mm-common-util could not be found on this system.  If you
120are running a binary distribution and the mm-common package is installed,
121make sure that any separate development package for mm-common is installed
122as well.  If you built mm-common yourself, it may be necessary to adjust
123the PKG_CONFIG_PATH environment variable for pkg-config to find it.
124]])])
125])
126AC_MSG_RESULT([$MMDOCTOOLDIR])[]dnl
127])
128
129AC_DEFUN([MM_CONFIG_DOCTOOL_DIR],
130[dnl
131AC_REQUIRE([_MM_PRE_INIT])[]dnl
132AC_REQUIRE([MM_CHECK_GNU_MAKE])[]dnl
133m4_ifval([$1], [MMDOCTOOLDIR='[$]{top_srcdir}/$1'], [AC_REQUIRE([_MM_CONFIG_DOCTOOL_DIR])])
134AM_CONDITIONAL([DIST_DOCTOOLS], [test 'x$1' != 'x'])dnl
135AC_SUBST([MMDOCTOOLDIR])[]dnl
136])
137
138m4_define([_MM_ARG_ENABLE_DOCUMENTATION],
139[dnl
140AC_PROVIDE([$0])[]dnl
141dnl
142AC_ARG_VAR([DOT], [path to dot utility])[]dnl
143AC_ARG_VAR([DOXYGEN], [path to Doxygen utility])[]dnl
144AC_ARG_VAR([XSLTPROC], [path to xsltproc utility])[]dnl
145dnl
146AC_PATH_PROG([DOT], [dot], [dot])
147AC_PATH_PROG([DOXYGEN], [doxygen], [doxygen])
148AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc])
149dnl
150AC_ARG_ENABLE([documentation],
151              [AS_HELP_STRING([--disable-documentation],
152                              [do not build or install the documentation])],
153              [ENABLE_DOCUMENTATION=$enableval],
154              [ENABLE_DOCUMENTATION=auto])
155AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
156[
157  mm_err=
158  AS_IF([test "x$MMDOCTOOLDIR" = x], [mm_err='dnl
159The mm-common-util module is available, but the installation of mm-common on this
160machine is missing the shared documentation utilities of the GNOME C++
161bindings.  It may be necessary to upgrade to a more recent release of
162mm-common in order to build '$PACKAGE_NAME' and install the documentation.'],
163        [test "x$PERL" = xperl], [mm_err='Perl is required for installing the documentation.'],
164        [test "x$USE_MAINTAINER_MODE" != xno],
165  [
166    test "x$DOT" != xdot || mm_err=' dot'
167    test "x$DOXYGEN" != xdoxygen || mm_err="$mm_err doxygen"
168    test "x$XSLTPROC" != xxsltproc || mm_err="$mm_err xsltproc"
169    test -z "$mm_err" || mm_err='The documentation cannot be generated because
170not all of the required tools are available:'$mm_err
171  ])
172  AS_IF([test -z "$mm_err"], [ENABLE_DOCUMENTATION=yes],
173        [test "x$ENABLE_DOCUMENTATION" = xyes], [AC_MSG_FAILURE([[$mm_err]])],
174        [ENABLE_DOCUMENTATION=no; AC_MSG_WARN([[$mm_err]])])
175])
176AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test "x$ENABLE_DOCUMENTATION" = xyes])
177AC_SUBST([DOXYGEN_TAGFILES], [[]])
178AC_SUBST([DOCINSTALL_FLAGS], [[]])[]dnl
179])
180
181AC_DEFUN([MM_ARG_ENABLE_DOCUMENTATION],
182[dnl
183AC_BEFORE([$0], [MM_ARG_WITH_TAGFILE_DOC])[]dnl
184AC_REQUIRE([_MM_PRE_INIT])[]dnl
185AC_REQUIRE([MM_CONFIG_DOCTOOL_DIR])[]dnl
186AC_REQUIRE([MM_PATH_PERL])[]dnl
187AC_REQUIRE([_MM_ARG_ENABLE_DOCUMENTATION])[]dnl
188])
189
190m4_define([_MM_TR_URI],
191[dnl
192[`expr "X$1" : 'X\(.*[^\\/]\)[\\/]*' 2>&]AS_MESSAGE_LOG_FD[ |]dnl
193[ sed 's|[\\]|/|g;s| |%20|g;s|^/|file:///|;s|^.:/|file:///&|' 2>&]AS_MESSAGE_LOG_FD[`]dnl
194])
195
196m4_define([_MM_ARG_WITH_TAGFILE_DOC],
197[dnl
198  AC_MSG_CHECKING([for $1 documentation])
199  AC_ARG_WITH([$1-doc],
200              [AS_HELP_STRING([[--with-$1-doc=[TAGFILE@]HTMLREFDIR]],
201                              [Link to external $1 documentation]m4_ifval([$4], [[ [auto]]]))],
202  [
203    mm_htmlrefdir=`[expr "X@$withval" : '.*@\(.*\)' 2>&]AS_MESSAGE_LOG_FD`
204    mm_tagname=`[expr "X/$withval" : '[^@]*[\\/]\([^\\/@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
205    mm_tagpath=`[expr "X$withval" : 'X\([^@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
206    test "x$mm_tagname" != x || mm_tagname="$3"
207    test "x$mm_tagpath" != x || mm_tagpath=$mm_tagname[]dnl
208  ], [
209    mm_htmlrefdir=
210    mm_tagname="$3"
211    mm_tagpath=$mm_tagname[]dnl
212  ])
213  # Prepend working direcory if the tag file path starts with ./ or ../
214  AS_CASE([$mm_tagpath], [[.[\\/]*|..[\\/]*]], [mm_tagpath=`pwd`/$mm_tagpath])
215
216m4_ifval([$4], [dnl
217  # If no local directory was specified, get the default from the .pc file
218  AS_IF([test "x$mm_htmlrefdir" = x],
219  [
220    mm_htmlrefdir=`$PKG_CONFIG --variable=htmlrefdir "$4" 2>&AS_MESSAGE_LOG_FD`dnl
221  ])
222  # If the user specified a Web URL, allow it to override the public location
223  AS_CASE([$mm_htmlrefdir], [[http://*|https://*]], [mm_htmlrefpub=$mm_htmlrefdir],
224  [
225    mm_htmlrefpub=`$PKG_CONFIG --variable=htmlrefpub "$4" 2>&AS_MESSAGE_LOG_FD`
226    test "x$mm_htmlrefpub" != x || mm_htmlrefpub=$mm_htmlrefdir
227    test "x$mm_htmlrefdir" != x || mm_htmlrefdir=$mm_htmlrefpub
228  ])
229  # The user-supplied tag-file name takes precedence if it includes the path
230  AS_CASE([$mm_tagpath], [[*[\\/]*]],,
231  [
232    mm_doxytagfile=`$PKG_CONFIG --variable=doxytagfile "$4" 2>&AS_MESSAGE_LOG_FD`
233    test "x$mm_doxytagfile" = x || mm_tagpath=$mm_doxytagfile
234  ])
235  # Remove trailing slashes and translate to URI
236  mm_htmlrefpub=_MM_TR_URI([$mm_htmlrefpub])
237])[]dnl
238  mm_htmlrefdir=_MM_TR_URI([$mm_htmlrefdir])
239
240  AC_MSG_RESULT([$mm_tagpath@$mm_htmlrefdir])
241
242  AS_IF([test "x$USE_MAINTAINER_MODE" != xno && test ! -f "$mm_tagpath"],
243        [AC_MSG_WARN([Doxygen tag file $3 not found])])
244  AS_IF([test "x$mm_htmlrefdir" = x],
245        [AC_MSG_WARN([Location of external $1 documentation not set])],
246        [AS_IF([test "x$DOCINSTALL_FLAGS" = x],
247               [DOCINSTALL_FLAGS="-l '$mm_tagname@$mm_htmlrefdir/'"],
248               [DOCINSTALL_FLAGS="$DOCINSTALL_FLAGS -l '$mm_tagname@$mm_htmlrefdir/'"])])
249
250  AS_IF([test "x$mm_$2" = x], [mm_val=$mm_tagpath], [mm_val="$mm_tagpath=$mm_$2"])
251  AS_IF([test "x$DOXYGEN_TAGFILES" = x],
252        [DOXYGEN_TAGFILES=[\]"$mm_val[\]"],
253        [DOXYGEN_TAGFILES="$DOXYGEN_TAGFILES "[\]"$mm_val[\]"])[]dnl
254])
255
256AC_DEFUN([MM_ARG_WITH_TAGFILE_DOC],
257[dnl
258m4_assert([$# >= 1])[]dnl
259m4_ifval([$2], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])])[]dnl
260AC_REQUIRE([MM_CONFIG_DOCTOOL_DIR])[]dnl
261AC_REQUIRE([_MM_ARG_ENABLE_DOCUMENTATION])[]dnl
262dnl
263AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
264      [_MM_ARG_WITH_TAGFILE_DOC(m4_quote(m4_bpatsubst([$1], [[+]*\([-+][0123456789]\|[._]\).*$])),
265                                [htmlref]m4_ifval([$2], [[pub]], [[dir]]), [$1], [$2])])[]dnl
266])
267
268
269#serial 20091228
270
271m4_define([_MM_INIT_MODULE_VERSION],
272[dnl
273m4_ifval([$3],
274[AC_SUBST([$2][_MAJOR_VERSION], [$3])
275AC_DEFINE([$2][_MAJOR_VERSION], [$3], [Major version number of $1.])
276])[]dnl
277m4_ifval([$4],
278[AC_SUBST([$2][_MINOR_VERSION], [$4])
279AC_DEFINE([$2][_MINOR_VERSION], [$4], [Minor version number of $1.])
280])[]dnl
281m4_ifval([$5],
282[AC_SUBST([$2][_MICRO_VERSION], [$5])
283AC_DEFINE([$2][_MICRO_VERSION], [$5], [Micro version number of $1.])
284])[]dnl
285])
286
287m4_define([_MM_INIT_MODULE_SUBST],
288[dnl
289AC_SUBST([$5][_MODULE_NAME], ['$1'])
290AC_SUBST([$5][_VERSION], ['$2'])
291m4_ifval([$4],
292[AC_SUBST([$5][_API_VERSION], ['$4'])
293])[]dnl
294_MM_INIT_MODULE_VERSION([$3], [$5], m4_bpatsubst([$2], [[^0123456789]+], [,]))[]dnl
295])
296
297m4_define([_MM_INIT_MODULE_BASENAME],
298          [_MM_INIT_MODULE_SUBST([$1], [$2], [$3], [$4],
299                                 m4_quote(AS_TR_CPP(m4_quote(m4_translit([$3], [+], [X])))))])
300
301AC_DEFUN([MM_INIT_MODULE],
302[dnl
303m4_assert([$# >= 1])[]dnl
304AC_REQUIRE([_MM_PRE_INIT])[]dnl
305AC_REQUIRE([MM_CHECK_GNU_MAKE])[]dnl
306_MM_INIT_MODULE_BASENAME([$1],
307                 m4_quote(m4_ifval([$2], [$2], m4_defn([AC_PACKAGE_VERSION]))),
308                 m4_quote(m4_bpatsubst([$1], [[-.0123456789]+$])),
309                 m4_quote(m4_bregexp([$1], [-?\([.0123456789]+\)$], [\1])))[]dnl
310])
311
312
313#serial 20090822
314
315m4_define([_MM_CHECK_GNU_MAKE],
316[dnl
317AC_PROVIDE([$0])[]dnl
318AC_MSG_CHECKING([whether [$]{MAKE-make} supports GNU make features])
319cat >conftest.make <<'_MMEOF'
320override reverse = [$](2)[$](subst ,, )[$](1)
321override result := [$](word 2,[$](call reverse,success,failure))
322all: ; test '[$](result)' = success
323.PHONY: all
324_MMEOF
325AS_IF([[$]{MAKE-make} -f conftest.make >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD],
326      [mm_gnu_make=yes], [mm_gnu_make=no])
327rm -f conftest.make
328AC_MSG_RESULT([$mm_gnu_make])
329AS_IF([test "x$mm_gnu_make" != xyes],
330      [AC_MSG_FAILURE([[The GNU make program is required to build $PACKAGE_NAME.]])])[]dnl
331])
332
333AC_DEFUN([MM_CHECK_GNU_MAKE],
334[dnl
335AC_REQUIRE([_MM_PRE_INIT])[]dnl
336AC_REQUIRE([_MM_CHECK_GNU_MAKE])[]dnl
337])
338
339m4_define([_MM_PATH_PERL],
340[dnl
341AC_PROVIDE([$0])[]dnl
342AC_ARG_VAR([PERL], [path to Perl interpreter])[]dnl
343AC_PATH_PROG([PERL], [perl], [perl])[]dnl
344])
345
346AC_DEFUN([MM_PATH_PERL],
347[dnl
348AC_REQUIRE([_MM_PRE_INIT])[]dnl
349AC_REQUIRE([_MM_PATH_PERL])[]dnl
350])
351
352m4_define([_MM_CHECK_PERL],
353[dnl
354AS_IF([$PERL -e "require v$1; exit 0;" >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD],
355      [$2], m4_ifval([$2$3], [[$3]],
356            [[AC_MSG_FAILURE([[At least Perl ]$1[ is required to build $PACKAGE_NAME.]])]]))[]dnl
357])
358
359AC_DEFUN([MM_CHECK_PERL],
360[dnl
361AC_REQUIRE([_MM_PRE_INIT])[]dnl
362AC_REQUIRE([_MM_PATH_PERL])[]dnl
363_MM_CHECK_PERL(m4_ifval([$1], [[$1]], [[5.6.0]]), [$2], [$3])[]dnl
364])
365
366AC_DEFUN([MM_PKG_CONFIG_SUBST],
367[dnl
368m4_assert([$# >= 2])[]dnl
369AC_REQUIRE([_MM_PRE_INIT])[]dnl
370AC_REQUIRE([PKG_PROG_PKG_CONFIG])[]dnl
371AC_MSG_CHECKING([for $1])
372dnl
373AS_IF([test -z "[$]{$1+set}"],
374      [$1=`$PKG_CONFIG $2 2>&AS_MESSAGE_LOG_FD`
375       AS_IF([test "[$]?" -eq 0], [$3], [$4])])
376dnl
377AC_MSG_RESULT([[$]$1])
378AC_SUBST([$1])[]dnl
379])
380
381
382#serial 20091103
383
384m4_define([_MM_ARG_ENABLE_WARNINGS_OPTION],
385[dnl
386AC_PROVIDE([$0])[]dnl
387AC_ARG_ENABLE([warnings],
388              [AS_HELP_STRING([[--enable-warnings[=min|max|fatal|no]]],
389                              [set compiler pedantry level [default=min]])],
390              [mm_enable_warnings=$enableval],
391              [mm_enable_warnings=min])[]dnl
392])
393
394AC_DEFUN([MM_ARG_ENABLE_WARNINGS],
395[dnl
396m4_assert([$# >= 3])[]dnl
397AC_REQUIRE([_MM_PRE_INIT])[]dnl
398AC_REQUIRE([_MM_ARG_ENABLE_WARNINGS_OPTION])[]dnl
399dnl
400AS_CASE([$ac_compile],
401        [[*'$CXXFLAGS '*]], [mm_lang='C++' mm_cc=$CXX mm_conftest="conftest.[$]{ac_ext-cc}"],
402        [[*'$CFLAGS '*]],   [mm_lang=C mm_cc=$CC mm_conftest="conftest.[$]{ac_ext-c}"],
403        [AC_MSG_ERROR([[current language is neither C nor C++]])])
404dnl
405AC_MSG_CHECKING([which $mm_lang compiler warning flags to use])
406m4_ifval([$4], [mm_deprecation_flags=
407])mm_tested_flags=
408dnl
409AS_CASE([$mm_enable_warnings],
410        [no],    [mm_warning_flags=],
411        [max],   [mm_warning_flags="$3"],
412        [fatal], [mm_warning_flags="$3 -Werror"[]m4_ifval([$4], [
413         for mm_prefix in $4
414         do
415           mm_deprecation_flags="$mm_deprecation_flags-D[$]{mm_prefix}_DISABLE_DEPRECATED "
416         done])],
417        [mm_warning_flags="$2"])
418dnl
419AS_IF([test "x$mm_warning_flags" != x],
420[
421  # Keep in mind that the dummy source must be devoid of any
422  # problems that might cause diagnostics.
423  AC_LANG_CONFTEST([AC_LANG_SOURCE([[
424int main(int argc, char** argv) { return (argv != 0) ? argc : 0; }
425]])])
426  for mm_flag in $mm_warning_flags
427  do
428    # Test whether the compiler accepts the flag.  Look at standard output,
429    # since GCC only shows a warning message if an option is not supported.
430    mm_cc_out=`$mm_cc $mm_tested_flags $mm_flag -c "$mm_conftest" 2>&1 || echo failed`
431    rm -f "conftest.[$]{OBJEXT-o}"
432
433    AS_IF([test "x$mm_cc_out" = x],
434          [AS_IF([test "x$mm_tested_flags" = x],
435                 [mm_tested_flags=$mm_flag],
436                 [mm_tested_flags="$mm_tested_flags $mm_flag"])],
437[cat <<_MMEOF >&AS_MESSAGE_LOG_FD
438$mm_cc: $mm_cc_out
439_MMEOF
440])
441  done
442  rm -f "$mm_conftest"
443])
444mm_all_flags=m4_ifval([$4], [$mm_deprecation_flags])$mm_tested_flags
445AC_SUBST([$1], [$mm_all_flags])
446dnl
447test "x$mm_all_flags" != x || mm_all_flags=none
448AC_MSG_RESULT([$mm_all_flags])[]dnl
449])
450
451# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
452# serial 1 (pkg-config-0.24)
453#
454# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
455#
456# This program is free software; you can redistribute it and/or modify
457# it under the terms of the GNU General Public License as published by
458# the Free Software Foundation; either version 2 of the License, or
459# (at your option) any later version.
460#
461# This program is distributed in the hope that it will be useful, but
462# WITHOUT ANY WARRANTY; without even the implied warranty of
463# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
464# General Public License for more details.
465#
466# You should have received a copy of the GNU General Public License
467# along with this program; if not, write to the Free Software
468# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
469#
470# As a special exception to the GNU General Public License, if you
471# distribute this file as part of a program that contains a
472# configuration script generated by Autoconf, you may include it under
473# the same distribution terms that you use for the rest of that program.
474
475# PKG_PROG_PKG_CONFIG([MIN-VERSION])
476# ----------------------------------
477AC_DEFUN([PKG_PROG_PKG_CONFIG],
478[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
479m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
480AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
481AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
482AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
483
484if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
485	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
486fi
487if test -n "$PKG_CONFIG"; then
488	_pkg_min_version=m4_default([$1], [0.9.0])
489	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
490	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
491		AC_MSG_RESULT([yes])
492	else
493		AC_MSG_RESULT([no])
494		PKG_CONFIG=""
495	fi
496fi[]dnl
497])# PKG_PROG_PKG_CONFIG
498
499# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
500#
501# Check to see whether a particular set of modules exists.  Similar
502# to PKG_CHECK_MODULES(), but does not set variables or print errors.
503#
504# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
505# only at the first occurence in configure.ac, so if the first place
506# it's called might be skipped (such as if it is within an "if", you
507# have to call PKG_CHECK_EXISTS manually
508# --------------------------------------------------------------
509AC_DEFUN([PKG_CHECK_EXISTS],
510[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
511if test -n "$PKG_CONFIG" && \
512    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
513  m4_default([$2], [:])
514m4_ifvaln([$3], [else
515  $3])dnl
516fi])
517
518# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
519# ---------------------------------------------
520m4_define([_PKG_CONFIG],
521[if test -n "$$1"; then
522    pkg_cv_[]$1="$$1"
523 elif test -n "$PKG_CONFIG"; then
524    PKG_CHECK_EXISTS([$3],
525                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
526		     [pkg_failed=yes])
527 else
528    pkg_failed=untried
529fi[]dnl
530])# _PKG_CONFIG
531
532# _PKG_SHORT_ERRORS_SUPPORTED
533# -----------------------------
534AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
535[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
536if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
537        _pkg_short_errors_supported=yes
538else
539        _pkg_short_errors_supported=no
540fi[]dnl
541])# _PKG_SHORT_ERRORS_SUPPORTED
542
543
544# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
545# [ACTION-IF-NOT-FOUND])
546#
547#
548# Note that if there is a possibility the first call to
549# PKG_CHECK_MODULES might not happen, you should be sure to include an
550# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
551#
552#
553# --------------------------------------------------------------
554AC_DEFUN([PKG_CHECK_MODULES],
555[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
556AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
557AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
558
559pkg_failed=no
560AC_MSG_CHECKING([for $1])
561
562_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
563_PKG_CONFIG([$1][_LIBS], [libs], [$2])
564
565m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
566and $1[]_LIBS to avoid the need to call pkg-config.
567See the pkg-config man page for more details.])
568
569if test $pkg_failed = yes; then
570   	AC_MSG_RESULT([no])
571        _PKG_SHORT_ERRORS_SUPPORTED
572        if test $_pkg_short_errors_supported = yes; then
573	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
574        else
575	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
576        fi
577	# Put the nasty error message in config.log where it belongs
578	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
579
580	m4_default([$4], [AC_MSG_ERROR(
581[Package requirements ($2) were not met:
582
583$$1_PKG_ERRORS
584
585Consider adjusting the PKG_CONFIG_PATH environment variable if you
586installed software in a non-standard prefix.
587
588_PKG_TEXT])
589        ])
590elif test $pkg_failed = untried; then
591     	AC_MSG_RESULT([no])
592	m4_default([$4], [AC_MSG_FAILURE(
593[The pkg-config script could not be found or is too old.  Make sure it
594is in your PATH or set the PKG_CONFIG environment variable to the full
595path to pkg-config.
596
597_PKG_TEXT
598
599To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
600        ])
601else
602	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
603	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
604        AC_MSG_RESULT([yes])
605	$3
606fi[]dnl
607])# PKG_CHECK_MODULES
608
609# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
610#
611# This file is free software; the Free Software Foundation
612# gives unlimited permission to copy and/or distribute it,
613# with or without modifications, as long as this notice is preserved.
614
615# AM_AUTOMAKE_VERSION(VERSION)
616# ----------------------------
617# Automake X.Y traces this macro to ensure aclocal.m4 has been
618# generated from the m4 files accompanying Automake X.Y.
619# (This private macro should not be called outside this file.)
620AC_DEFUN([AM_AUTOMAKE_VERSION],
621[am__api_version='1.11'
622dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
623dnl require some minimum version.  Point them to the right macro.
624m4_if([$1], [1.11.1], [],
625      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
626])
627
628# _AM_AUTOCONF_VERSION(VERSION)
629# -----------------------------
630# aclocal traces this macro to find the Autoconf version.
631# This is a private macro too.  Using m4_define simplifies
632# the logic in aclocal, which can simply ignore this definition.
633m4_define([_AM_AUTOCONF_VERSION], [])
634
635# AM_SET_CURRENT_AUTOMAKE_VERSION
636# -------------------------------
637# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
638# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
639AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
640[AM_AUTOMAKE_VERSION([1.11.1])dnl
641m4_ifndef([AC_AUTOCONF_VERSION],
642  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
643_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
644
645# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
646
647# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
648#
649# This file is free software; the Free Software Foundation
650# gives unlimited permission to copy and/or distribute it,
651# with or without modifications, as long as this notice is preserved.
652
653# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
654# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
655# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
656#
657# Of course, Automake must honor this variable whenever it calls a
658# tool from the auxiliary directory.  The problem is that $srcdir (and
659# therefore $ac_aux_dir as well) can be either absolute or relative,
660# depending on how configure is run.  This is pretty annoying, since
661# it makes $ac_aux_dir quite unusable in subdirectories: in the top
662# source directory, any form will work fine, but in subdirectories a
663# relative path needs to be adjusted first.
664#
665# $ac_aux_dir/missing
666#    fails when called from a subdirectory if $ac_aux_dir is relative
667# $top_srcdir/$ac_aux_dir/missing
668#    fails if $ac_aux_dir is absolute,
669#    fails when called from a subdirectory in a VPATH build with
670#          a relative $ac_aux_dir
671#
672# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
673# are both prefixed by $srcdir.  In an in-source build this is usually
674# harmless because $srcdir is `.', but things will broke when you
675# start a VPATH build or use an absolute $srcdir.
676#
677# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
678# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
679#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
680# and then we would define $MISSING as
681#   MISSING="\${SHELL} $am_aux_dir/missing"
682# This will work as long as MISSING is not called from configure, because
683# unfortunately $(top_srcdir) has no meaning in configure.
684# However there are other variables, like CC, which are often used in
685# configure, and could therefore not use this "fixed" $ac_aux_dir.
686#
687# Another solution, used here, is to always expand $ac_aux_dir to an
688# absolute PATH.  The drawback is that using absolute paths prevent a
689# configured tree to be moved without reconfiguration.
690
691AC_DEFUN([AM_AUX_DIR_EXPAND],
692[dnl Rely on autoconf to set up CDPATH properly.
693AC_PREREQ([2.50])dnl
694# expand $ac_aux_dir to an absolute path
695am_aux_dir=`cd $ac_aux_dir && pwd`
696])
697
698# AM_CONDITIONAL                                            -*- Autoconf -*-
699
700# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
701# Free Software Foundation, Inc.
702#
703# This file is free software; the Free Software Foundation
704# gives unlimited permission to copy and/or distribute it,
705# with or without modifications, as long as this notice is preserved.
706
707# serial 9
708
709# AM_CONDITIONAL(NAME, SHELL-CONDITION)
710# -------------------------------------
711# Define a conditional.
712AC_DEFUN([AM_CONDITIONAL],
713[AC_PREREQ(2.52)dnl
714 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
715	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
716AC_SUBST([$1_TRUE])dnl
717AC_SUBST([$1_FALSE])dnl
718_AM_SUBST_NOTMAKE([$1_TRUE])dnl
719_AM_SUBST_NOTMAKE([$1_FALSE])dnl
720m4_define([_AM_COND_VALUE_$1], [$2])dnl
721if $2; then
722  $1_TRUE=
723  $1_FALSE='#'
724else
725  $1_TRUE='#'
726  $1_FALSE=
727fi
728AC_CONFIG_COMMANDS_PRE(
729[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
730  AC_MSG_ERROR([[conditional "$1" was never defined.
731Usually this means the macro was only invoked conditionally.]])
732fi])])
733
734# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
735# Free Software Foundation, Inc.
736#
737# This file is free software; the Free Software Foundation
738# gives unlimited permission to copy and/or distribute it,
739# with or without modifications, as long as this notice is preserved.
740
741# serial 10
742
743# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
744# written in clear, in which case automake, when reading aclocal.m4,
745# will think it sees a *use*, and therefore will trigger all it's
746# C support machinery.  Also note that it means that autoscan, seeing
747# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
748
749
750# _AM_DEPENDENCIES(NAME)
751# ----------------------
752# See how the compiler implements dependency checking.
753# NAME is "CC", "CXX", "GCJ", or "OBJC".
754# We try a few techniques and use that to set a single cache variable.
755#
756# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
757# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
758# dependency, and given that the user is not expected to run this macro,
759# just rely on AC_PROG_CC.
760AC_DEFUN([_AM_DEPENDENCIES],
761[AC_REQUIRE([AM_SET_DEPDIR])dnl
762AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
763AC_REQUIRE([AM_MAKE_INCLUDE])dnl
764AC_REQUIRE([AM_DEP_TRACK])dnl
765
766ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
767       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
768       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
769       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
770       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
771                   [depcc="$$1"   am_compiler_list=])
772
773AC_CACHE_CHECK([dependency style of $depcc],
774               [am_cv_$1_dependencies_compiler_type],
775[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
776  # We make a subdir and do the tests there.  Otherwise we can end up
777  # making bogus files that we don't know about and never remove.  For
778  # instance it was reported that on HP-UX the gcc test will end up
779  # making a dummy file named `D' -- because `-MD' means `put the output
780  # in D'.
781  mkdir conftest.dir
782  # Copy depcomp to subdir because otherwise we won't find it if we're
783  # using a relative directory.
784  cp "$am_depcomp" conftest.dir
785  cd conftest.dir
786  # We will build objects and dependencies in a subdirectory because
787  # it helps to detect inapplicable dependency modes.  For instance
788  # both Tru64's cc and ICC support -MD to output dependencies as a
789  # side effect of compilation, but ICC will put the dependencies in
790  # the current directory while Tru64 will put them in the object
791  # directory.
792  mkdir sub
793
794  am_cv_$1_dependencies_compiler_type=none
795  if test "$am_compiler_list" = ""; then
796     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
797  fi
798  am__universal=false
799  m4_case([$1], [CC],
800    [case " $depcc " in #(
801     *\ -arch\ *\ -arch\ *) am__universal=true ;;
802     esac],
803    [CXX],
804    [case " $depcc " in #(
805     *\ -arch\ *\ -arch\ *) am__universal=true ;;
806     esac])
807
808  for depmode in $am_compiler_list; do
809    # Setup a source with many dependencies, because some compilers
810    # like to wrap large dependency lists on column 80 (with \), and
811    # we should not choose a depcomp mode which is confused by this.
812    #
813    # We need to recreate these files for each test, as the compiler may
814    # overwrite some of them when testing with obscure command lines.
815    # This happens at least with the AIX C compiler.
816    : > sub/conftest.c
817    for i in 1 2 3 4 5 6; do
818      echo '#include "conftst'$i'.h"' >> sub/conftest.c
819      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
820      # Solaris 8's {/usr,}/bin/sh.
821      touch sub/conftst$i.h
822    done
823    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
824
825    # We check with `-c' and `-o' for the sake of the "dashmstdout"
826    # mode.  It turns out that the SunPro C++ compiler does not properly
827    # handle `-M -o', and we need to detect this.  Also, some Intel
828    # versions had trouble with output in subdirs
829    am__obj=sub/conftest.${OBJEXT-o}
830    am__minus_obj="-o $am__obj"
831    case $depmode in
832    gcc)
833      # This depmode causes a compiler race in universal mode.
834      test "$am__universal" = false || continue
835      ;;
836    nosideeffect)
837      # after this tag, mechanisms are not by side-effect, so they'll
838      # only be used when explicitly requested
839      if test "x$enable_dependency_tracking" = xyes; then
840	continue
841      else
842	break
843      fi
844      ;;
845    msvisualcpp | msvcmsys)
846      # This compiler won't grok `-c -o', but also, the minuso test has
847      # not run yet.  These depmodes are late enough in the game, and
848      # so weak that their functioning should not be impacted.
849      am__obj=conftest.${OBJEXT-o}
850      am__minus_obj=
851      ;;
852    none) break ;;
853    esac
854    if depmode=$depmode \
855       source=sub/conftest.c object=$am__obj \
856       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
857       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
858         >/dev/null 2>conftest.err &&
859       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
860       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
861       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
862       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
863      # icc doesn't choke on unknown options, it will just issue warnings
864      # or remarks (even with -Werror).  So we grep stderr for any message
865      # that says an option was ignored or not supported.
866      # When given -MP, icc 7.0 and 7.1 complain thusly:
867      #   icc: Command line warning: ignoring option '-M'; no argument required
868      # The diagnosis changed in icc 8.0:
869      #   icc: Command line remark: option '-MP' not supported
870      if (grep 'ignoring option' conftest.err ||
871          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
872        am_cv_$1_dependencies_compiler_type=$depmode
873        break
874      fi
875    fi
876  done
877
878  cd ..
879  rm -rf conftest.dir
880else
881  am_cv_$1_dependencies_compiler_type=none
882fi
883])
884AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
885AM_CONDITIONAL([am__fastdep$1], [
886  test "x$enable_dependency_tracking" != xno \
887  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
888])
889
890
891# AM_SET_DEPDIR
892# -------------
893# Choose a directory name for dependency files.
894# This macro is AC_REQUIREd in _AM_DEPENDENCIES
895AC_DEFUN([AM_SET_DEPDIR],
896[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
897AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
898])
899
900
901# AM_DEP_TRACK
902# ------------
903AC_DEFUN([AM_DEP_TRACK],
904[AC_ARG_ENABLE(dependency-tracking,
905[  --disable-dependency-tracking  speeds up one-time build
906  --enable-dependency-tracking   do not reject slow dependency extractors])
907if test "x$enable_dependency_tracking" != xno; then
908  am_depcomp="$ac_aux_dir/depcomp"
909  AMDEPBACKSLASH='\'
910fi
911AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
912AC_SUBST([AMDEPBACKSLASH])dnl
913_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
914])
915
916# Generate code to set up dependency tracking.              -*- Autoconf -*-
917
918# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
919# Free Software Foundation, Inc.
920#
921# This file is free software; the Free Software Foundation
922# gives unlimited permission to copy and/or distribute it,
923# with or without modifications, as long as this notice is preserved.
924
925#serial 5
926
927# _AM_OUTPUT_DEPENDENCY_COMMANDS
928# ------------------------------
929AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
930[{
931  # Autoconf 2.62 quotes --file arguments for eval, but not when files
932  # are listed without --file.  Let's play safe and only enable the eval
933  # if we detect the quoting.
934  case $CONFIG_FILES in
935  *\'*) eval set x "$CONFIG_FILES" ;;
936  *)   set x $CONFIG_FILES ;;
937  esac
938  shift
939  for mf
940  do
941    # Strip MF so we end up with the name of the file.
942    mf=`echo "$mf" | sed -e 's/:.*$//'`
943    # Check whether this is an Automake generated Makefile or not.
944    # We used to match only the files named `Makefile.in', but
945    # some people rename them; so instead we look at the file content.
946    # Grep'ing the first line is not enough: some people post-process
947    # each Makefile.in and add a new line on top of each file to say so.
948    # Grep'ing the whole file is not good either: AIX grep has a line
949    # limit of 2048, but all sed's we know have understand at least 4000.
950    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
951      dirpart=`AS_DIRNAME("$mf")`
952    else
953      continue
954    fi
955    # Extract the definition of DEPDIR, am__include, and am__quote
956    # from the Makefile without running `make'.
957    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
958    test -z "$DEPDIR" && continue
959    am__include=`sed -n 's/^am__include = //p' < "$mf"`
960    test -z "am__include" && continue
961    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
962    # When using ansi2knr, U may be empty or an underscore; expand it
963    U=`sed -n 's/^U = //p' < "$mf"`
964    # Find all dependency output files, they are included files with
965    # $(DEPDIR) in their names.  We invoke sed twice because it is the
966    # simplest approach to changing $(DEPDIR) to its actual value in the
967    # expansion.
968    for file in `sed -n "
969      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
970	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
971      # Make sure the directory exists.
972      test -f "$dirpart/$file" && continue
973      fdir=`AS_DIRNAME(["$file"])`
974      AS_MKDIR_P([$dirpart/$fdir])
975      # echo "creating $dirpart/$file"
976      echo '# dummy' > "$dirpart/$file"
977    done
978  done
979}
980])# _AM_OUTPUT_DEPENDENCY_COMMANDS
981
982
983# AM_OUTPUT_DEPENDENCY_COMMANDS
984# -----------------------------
985# This macro should only be invoked once -- use via AC_REQUIRE.
986#
987# This code is only required when automatic dependency tracking
988# is enabled.  FIXME.  This creates each `.P' file that we will
989# need in order to bootstrap the dependency handling code.
990AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
991[AC_CONFIG_COMMANDS([depfiles],
992     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
993     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
994])
995
996# Do all the work for Automake.                             -*- Autoconf -*-
997
998# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
999# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1000#
1001# This file is free software; the Free Software Foundation
1002# gives unlimited permission to copy and/or distribute it,
1003# with or without modifications, as long as this notice is preserved.
1004
1005# serial 16
1006
1007# This macro actually does too much.  Some checks are only needed if
1008# your package does certain things.  But this isn't really a big deal.
1009
1010# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1011# AM_INIT_AUTOMAKE([OPTIONS])
1012# -----------------------------------------------
1013# The call with PACKAGE and VERSION arguments is the old style
1014# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1015# and VERSION should now be passed to AC_INIT and removed from
1016# the call to AM_INIT_AUTOMAKE.
1017# We support both call styles for the transition.  After
1018# the next Automake release, Autoconf can make the AC_INIT
1019# arguments mandatory, and then we can depend on a new Autoconf
1020# release and drop the old call support.
1021AC_DEFUN([AM_INIT_AUTOMAKE],
1022[AC_PREREQ([2.62])dnl
1023dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1024dnl the ones we care about.
1025m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1026AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1027AC_REQUIRE([AC_PROG_INSTALL])dnl
1028if test "`cd $srcdir && pwd`" != "`pwd`"; then
1029  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1030  # is not polluted with repeated "-I."
1031  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1032  # test to see if srcdir already configured
1033  if test -f $srcdir/config.status; then
1034    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1035  fi
1036fi
1037
1038# test whether we have cygpath
1039if test -z "$CYGPATH_W"; then
1040  if (cygpath --version) >/dev/null 2>/dev/null; then
1041    CYGPATH_W='cygpath -w'
1042  else
1043    CYGPATH_W=echo
1044  fi
1045fi
1046AC_SUBST([CYGPATH_W])
1047
1048# Define the identity of the package.
1049dnl Distinguish between old-style and new-style calls.
1050m4_ifval([$2],
1051[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1052 AC_SUBST([PACKAGE], [$1])dnl
1053 AC_SUBST([VERSION], [$2])],
1054[_AM_SET_OPTIONS([$1])dnl
1055dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1056m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1057  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1058 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1059 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1060
1061_AM_IF_OPTION([no-define],,
1062[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1063 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1064
1065# Some tools Automake needs.
1066AC_REQUIRE([AM_SANITY_CHECK])dnl
1067AC_REQUIRE([AC_ARG_PROGRAM])dnl
1068AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1069AM_MISSING_PROG(AUTOCONF, autoconf)
1070AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1071AM_MISSING_PROG(AUTOHEADER, autoheader)
1072AM_MISSING_PROG(MAKEINFO, makeinfo)
1073AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1074AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1075AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1076# We need awk for the "check" target.  The system "awk" is bad on
1077# some platforms.
1078AC_REQUIRE([AC_PROG_AWK])dnl
1079AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1080AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1081_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1082	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1083			     [_AM_PROG_TAR([v7])])])
1084_AM_IF_OPTION([no-dependencies],,
1085[AC_PROVIDE_IFELSE([AC_PROG_CC],
1086		  [_AM_DEPENDENCIES(CC)],
1087		  [define([AC_PROG_CC],
1088			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1089AC_PROVIDE_IFELSE([AC_PROG_CXX],
1090		  [_AM_DEPENDENCIES(CXX)],
1091		  [define([AC_PROG_CXX],
1092			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1093AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1094		  [_AM_DEPENDENCIES(OBJC)],
1095		  [define([AC_PROG_OBJC],
1096			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1097])
1098_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1099dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1100dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
1101dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1102AC_CONFIG_COMMANDS_PRE(dnl
1103[m4_provide_if([_AM_COMPILER_EXEEXT],
1104  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1105])
1106
1107dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
1108dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1109dnl mangled by Autoconf and run in a shell conditional statement.
1110m4_define([_AC_COMPILER_EXEEXT],
1111m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1112
1113
1114# When config.status generates a header, we must update the stamp-h file.
1115# This file resides in the same directory as the config header
1116# that is generated.  The stamp files are numbered to have different names.
1117
1118# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1119# loop where config.status creates the headers, so we can generate
1120# our stamp files there.
1121AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1122[# Compute $1's index in $config_headers.
1123_am_arg=$1
1124_am_stamp_count=1
1125for _am_header in $config_headers :; do
1126  case $_am_header in
1127    $_am_arg | $_am_arg:* )
1128      break ;;
1129    * )
1130      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1131  esac
1132done
1133echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1134
1135# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
1136#
1137# This file is free software; the Free Software Foundation
1138# gives unlimited permission to copy and/or distribute it,
1139# with or without modifications, as long as this notice is preserved.
1140
1141# AM_PROG_INSTALL_SH
1142# ------------------
1143# Define $install_sh.
1144AC_DEFUN([AM_PROG_INSTALL_SH],
1145[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1146if test x"${install_sh}" != xset; then
1147  case $am_aux_dir in
1148  *\ * | *\	*)
1149    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1150  *)
1151    install_sh="\${SHELL} $am_aux_dir/install-sh"
1152  esac
1153fi
1154AC_SUBST(install_sh)])
1155
1156# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
1157#
1158# This file is free software; the Free Software Foundation
1159# gives unlimited permission to copy and/or distribute it,
1160# with or without modifications, as long as this notice is preserved.
1161
1162# serial 2
1163
1164# Check whether the underlying file-system supports filenames
1165# with a leading dot.  For instance MS-DOS doesn't.
1166AC_DEFUN([AM_SET_LEADING_DOT],
1167[rm -rf .tst 2>/dev/null
1168mkdir .tst 2>/dev/null
1169if test -d .tst; then
1170  am__leading_dot=.
1171else
1172  am__leading_dot=_
1173fi
1174rmdir .tst 2>/dev/null
1175AC_SUBST([am__leading_dot])])
1176
1177# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1178# From Jim Meyering
1179
1180# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1181# Free Software Foundation, Inc.
1182#
1183# This file is free software; the Free Software Foundation
1184# gives unlimited permission to copy and/or distribute it,
1185# with or without modifications, as long as this notice is preserved.
1186
1187# serial 5
1188
1189# AM_MAINTAINER_MODE([DEFAULT-MODE])
1190# ----------------------------------
1191# Control maintainer-specific portions of Makefiles.
1192# Default is to disable them, unless `enable' is passed literally.
1193# For symmetry, `disable' may be passed as well.  Anyway, the user
1194# can override the default with the --enable/--disable switch.
1195AC_DEFUN([AM_MAINTAINER_MODE],
1196[m4_case(m4_default([$1], [disable]),
1197       [enable], [m4_define([am_maintainer_other], [disable])],
1198       [disable], [m4_define([am_maintainer_other], [enable])],
1199       [m4_define([am_maintainer_other], [enable])
1200        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1201AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1202  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1203  AC_ARG_ENABLE([maintainer-mode],
1204[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
1205			  (and sometimes confusing) to the casual installer],
1206      [USE_MAINTAINER_MODE=$enableval],
1207      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1208  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1209  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1210  MAINT=$MAINTAINER_MODE_TRUE
1211  AC_SUBST([MAINT])dnl
1212]
1213)
1214
1215AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1216
1217# Check to see how 'make' treats includes.	            -*- Autoconf -*-
1218
1219# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
1220#
1221# This file is free software; the Free Software Foundation
1222# gives unlimited permission to copy and/or distribute it,
1223# with or without modifications, as long as this notice is preserved.
1224
1225# serial 4
1226
1227# AM_MAKE_INCLUDE()
1228# -----------------
1229# Check to see how make treats includes.
1230AC_DEFUN([AM_MAKE_INCLUDE],
1231[am_make=${MAKE-make}
1232cat > confinc << 'END'
1233am__doit:
1234	@echo this is the am__doit target
1235.PHONY: am__doit
1236END
1237# If we don't find an include directive, just comment out the code.
1238AC_MSG_CHECKING([for style of include used by $am_make])
1239am__include="#"
1240am__quote=
1241_am_result=none
1242# First try GNU make style include.
1243echo "include confinc" > confmf
1244# Ignore all kinds of additional output from `make'.
1245case `$am_make -s -f confmf 2> /dev/null` in #(
1246*the\ am__doit\ target*)
1247  am__include=include
1248  am__quote=
1249  _am_result=GNU
1250  ;;
1251esac
1252# Now try BSD make style include.
1253if test "$am__include" = "#"; then
1254   echo '.include "confinc"' > confmf
1255   case `$am_make -s -f confmf 2> /dev/null` in #(
1256   *the\ am__doit\ target*)
1257     am__include=.include
1258     am__quote="\""
1259     _am_result=BSD
1260     ;;
1261   esac
1262fi
1263AC_SUBST([am__include])
1264AC_SUBST([am__quote])
1265AC_MSG_RESULT([$_am_result])
1266rm -f confinc confmf
1267])
1268
1269# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1270
1271# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1272# Free Software Foundation, Inc.
1273#
1274# This file is free software; the Free Software Foundation
1275# gives unlimited permission to copy and/or distribute it,
1276# with or without modifications, as long as this notice is preserved.
1277
1278# serial 6
1279
1280# AM_MISSING_PROG(NAME, PROGRAM)
1281# ------------------------------
1282AC_DEFUN([AM_MISSING_PROG],
1283[AC_REQUIRE([AM_MISSING_HAS_RUN])
1284$1=${$1-"${am_missing_run}$2"}
1285AC_SUBST($1)])
1286
1287
1288# AM_MISSING_HAS_RUN
1289# ------------------
1290# Define MISSING if not defined so far and test if it supports --run.
1291# If it does, set am_missing_run to use it, otherwise, to nothing.
1292AC_DEFUN([AM_MISSING_HAS_RUN],
1293[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1294AC_REQUIRE_AUX_FILE([missing])dnl
1295if test x"${MISSING+set}" != xset; then
1296  case $am_aux_dir in
1297  *\ * | *\	*)
1298    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1299  *)
1300    MISSING="\${SHELL} $am_aux_dir/missing" ;;
1301  esac
1302fi
1303# Use eval to expand $SHELL
1304if eval "$MISSING --run true"; then
1305  am_missing_run="$MISSING --run "
1306else
1307  am_missing_run=
1308  AC_MSG_WARN([`missing' script is too old or missing])
1309fi
1310])
1311
1312# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
1313#
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.
1317
1318# AM_PROG_MKDIR_P
1319# ---------------
1320# Check for `mkdir -p'.
1321AC_DEFUN([AM_PROG_MKDIR_P],
1322[AC_PREREQ([2.60])dnl
1323AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1324dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
1325dnl while keeping a definition of mkdir_p for backward compatibility.
1326dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1327dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1328dnl Makefile.ins that do not define MKDIR_P, so we do our own
1329dnl adjustment using top_builddir (which is defined more often than
1330dnl MKDIR_P).
1331AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1332case $mkdir_p in
1333  [[\\/$]]* | ?:[[\\/]]*) ;;
1334  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1335esac
1336])
1337
1338# Helper functions for option handling.                     -*- Autoconf -*-
1339
1340# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1341#
1342# This file is free software; the Free Software Foundation
1343# gives unlimited permission to copy and/or distribute it,
1344# with or without modifications, as long as this notice is preserved.
1345
1346# serial 4
1347
1348# _AM_MANGLE_OPTION(NAME)
1349# -----------------------
1350AC_DEFUN([_AM_MANGLE_OPTION],
1351[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1352
1353# _AM_SET_OPTION(NAME)
1354# ------------------------------
1355# Set option NAME.  Presently that only means defining a flag for this option.
1356AC_DEFUN([_AM_SET_OPTION],
1357[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1358
1359# _AM_SET_OPTIONS(OPTIONS)
1360# ----------------------------------
1361# OPTIONS is a space-separated list of Automake options.
1362AC_DEFUN([_AM_SET_OPTIONS],
1363[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1364
1365# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1366# -------------------------------------------
1367# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1368AC_DEFUN([_AM_IF_OPTION],
1369[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1370
1371# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1372#
1373# This file is free software; the Free Software Foundation
1374# gives unlimited permission to copy and/or distribute it,
1375# with or without modifications, as long as this notice is preserved.
1376
1377# AM_RUN_LOG(COMMAND)
1378# -------------------
1379# Run COMMAND, save the exit status in ac_status, and log it.
1380# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1381AC_DEFUN([AM_RUN_LOG],
1382[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1383   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1384   ac_status=$?
1385   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1386   (exit $ac_status); }])
1387
1388# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1389
1390# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1391# Free Software Foundation, Inc.
1392#
1393# This file is free software; the Free Software Foundation
1394# gives unlimited permission to copy and/or distribute it,
1395# with or without modifications, as long as this notice is preserved.
1396
1397# serial 5
1398
1399# AM_SANITY_CHECK
1400# ---------------
1401AC_DEFUN([AM_SANITY_CHECK],
1402[AC_MSG_CHECKING([whether build environment is sane])
1403# Just in case
1404sleep 1
1405echo timestamp > conftest.file
1406# Reject unsafe characters in $srcdir or the absolute working directory
1407# name.  Accept space and tab only in the latter.
1408am_lf='
1409'
1410case `pwd` in
1411  *[[\\\"\#\$\&\'\`$am_lf]]*)
1412    AC_MSG_ERROR([unsafe absolute working directory name]);;
1413esac
1414case $srcdir in
1415  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1416    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1417esac
1418
1419# Do `set' in a subshell so we don't clobber the current shell's
1420# arguments.  Must try -L first in case configure is actually a
1421# symlink; some systems play weird games with the mod time of symlinks
1422# (eg FreeBSD returns the mod time of the symlink's containing
1423# directory).
1424if (
1425   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1426   if test "$[*]" = "X"; then
1427      # -L didn't work.
1428      set X `ls -t "$srcdir/configure" conftest.file`
1429   fi
1430   rm -f conftest.file
1431   if test "$[*]" != "X $srcdir/configure conftest.file" \
1432      && test "$[*]" != "X conftest.file $srcdir/configure"; then
1433
1434      # If neither matched, then we have a broken ls.  This can happen
1435      # if, for instance, CONFIG_SHELL is bash and it inherits a
1436      # broken ls alias from the environment.  This has actually
1437      # happened.  Such a system could not be considered "sane".
1438      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1439alias in your environment])
1440   fi
1441
1442   test "$[2]" = conftest.file
1443   )
1444then
1445   # Ok.
1446   :
1447else
1448   AC_MSG_ERROR([newly created file is older than distributed files!
1449Check your system clock])
1450fi
1451AC_MSG_RESULT(yes)])
1452
1453# Copyright (C) 2009  Free Software Foundation, Inc.
1454#
1455# This file is free software; the Free Software Foundation
1456# gives unlimited permission to copy and/or distribute it,
1457# with or without modifications, as long as this notice is preserved.
1458
1459# serial 1
1460
1461# AM_SILENT_RULES([DEFAULT])
1462# --------------------------
1463# Enable less verbose build rules; with the default set to DEFAULT
1464# (`yes' being less verbose, `no' or empty being verbose).
1465AC_DEFUN([AM_SILENT_RULES],
1466[AC_ARG_ENABLE([silent-rules],
1467[  --enable-silent-rules          less verbose build output (undo: `make V=1')
1468  --disable-silent-rules         verbose build output (undo: `make V=0')])
1469case $enable_silent_rules in
1470yes) AM_DEFAULT_VERBOSITY=0;;
1471no)  AM_DEFAULT_VERBOSITY=1;;
1472*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1473esac
1474AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1475AM_BACKSLASH='\'
1476AC_SUBST([AM_BACKSLASH])dnl
1477_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1478])
1479
1480# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1481#
1482# This file is free software; the Free Software Foundation
1483# gives unlimited permission to copy and/or distribute it,
1484# with or without modifications, as long as this notice is preserved.
1485
1486# AM_PROG_INSTALL_STRIP
1487# ---------------------
1488# One issue with vendor `install' (even GNU) is that you can't
1489# specify the program used to strip binaries.  This is especially
1490# annoying in cross-compiling environments, where the build's strip
1491# is unlikely to handle the host's binaries.
1492# Fortunately install-sh will honor a STRIPPROG variable, so we
1493# always use install-sh in `make install-strip', and initialize
1494# STRIPPROG with the value of the STRIP variable (set by the user).
1495AC_DEFUN([AM_PROG_INSTALL_STRIP],
1496[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1497# Installed binaries are usually stripped using `strip' when the user
1498# run `make install-strip'.  However `strip' might not be the right
1499# tool to use in cross-compilation environments, therefore Automake
1500# will honor the `STRIP' environment variable to overrule this program.
1501dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1502if test "$cross_compiling" != no; then
1503  AC_CHECK_TOOL([STRIP], [strip], :)
1504fi
1505INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1506AC_SUBST([INSTALL_STRIP_PROGRAM])])
1507
1508# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1509#
1510# This file is free software; the Free Software Foundation
1511# gives unlimited permission to copy and/or distribute it,
1512# with or without modifications, as long as this notice is preserved.
1513
1514# serial 2
1515
1516# _AM_SUBST_NOTMAKE(VARIABLE)
1517# ---------------------------
1518# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1519# This macro is traced by Automake.
1520AC_DEFUN([_AM_SUBST_NOTMAKE])
1521
1522# AM_SUBST_NOTMAKE(VARIABLE)
1523# ---------------------------
1524# Public sister of _AM_SUBST_NOTMAKE.
1525AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1526
1527# Check how to create a tarball.                            -*- Autoconf -*-
1528
1529# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1530#
1531# This file is free software; the Free Software Foundation
1532# gives unlimited permission to copy and/or distribute it,
1533# with or without modifications, as long as this notice is preserved.
1534
1535# serial 2
1536
1537# _AM_PROG_TAR(FORMAT)
1538# --------------------
1539# Check how to create a tarball in format FORMAT.
1540# FORMAT should be one of `v7', `ustar', or `pax'.
1541#
1542# Substitute a variable $(am__tar) that is a command
1543# writing to stdout a FORMAT-tarball containing the directory
1544# $tardir.
1545#     tardir=directory && $(am__tar) > result.tar
1546#
1547# Substitute a variable $(am__untar) that extract such
1548# a tarball read from stdin.
1549#     $(am__untar) < result.tar
1550AC_DEFUN([_AM_PROG_TAR],
1551[# Always define AMTAR for backward compatibility.
1552AM_MISSING_PROG([AMTAR], [tar])
1553m4_if([$1], [v7],
1554     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1555     [m4_case([$1], [ustar],, [pax],,
1556              [m4_fatal([Unknown tar format])])
1557AC_MSG_CHECKING([how to create a $1 tar archive])
1558# Loop over all known methods to create a tar archive until one works.
1559_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1560_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1561# Do not fold the above two line into one, because Tru64 sh and
1562# Solaris sh will not grok spaces in the rhs of `-'.
1563for _am_tool in $_am_tools
1564do
1565  case $_am_tool in
1566  gnutar)
1567    for _am_tar in tar gnutar gtar;
1568    do
1569      AM_RUN_LOG([$_am_tar --version]) && break
1570    done
1571    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1572    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1573    am__untar="$_am_tar -xf -"
1574    ;;
1575  plaintar)
1576    # Must skip GNU tar: if it does not support --format= it doesn't create
1577    # ustar tarball either.
1578    (tar --version) >/dev/null 2>&1 && continue
1579    am__tar='tar chf - "$$tardir"'
1580    am__tar_='tar chf - "$tardir"'
1581    am__untar='tar xf -'
1582    ;;
1583  pax)
1584    am__tar='pax -L -x $1 -w "$$tardir"'
1585    am__tar_='pax -L -x $1 -w "$tardir"'
1586    am__untar='pax -r'
1587    ;;
1588  cpio)
1589    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1590    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1591    am__untar='cpio -i -H $1 -d'
1592    ;;
1593  none)
1594    am__tar=false
1595    am__tar_=false
1596    am__untar=false
1597    ;;
1598  esac
1599
1600  # If the value was cached, stop now.  We just wanted to have am__tar
1601  # and am__untar set.
1602  test -n "${am_cv_prog_tar_$1}" && break
1603
1604  # tar/untar a dummy directory, and stop if the command works
1605  rm -rf conftest.dir
1606  mkdir conftest.dir
1607  echo GrepMe > conftest.dir/file
1608  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1609  rm -rf conftest.dir
1610  if test -s conftest.tar; then
1611    AM_RUN_LOG([$am__untar <conftest.tar])
1612    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1613  fi
1614done
1615rm -rf conftest.dir
1616
1617AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1618AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1619AC_SUBST([am__tar])
1620AC_SUBST([am__untar])
1621]) # _AM_PROG_TAR
1622
1623m4_include([build/libtool.m4])
1624m4_include([build/ltoptions.m4])
1625m4_include([build/ltsugar.m4])
1626m4_include([build/ltversion.m4])
1627m4_include([build/lt~obsolete.m4])
1628