Transmission 2.33
[tomato.git] / release / src / router / transmission / aclocal.m4
blobef8b16ae79b752d85aa1c9b8ba9668a83987f3a9
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
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.
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.
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17 [m4_warning([this file was generated for autoconf 2.67.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
23 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
24 # serial 40 IT_PROG_INTLTOOL
25 AC_DEFUN([IT_PROG_INTLTOOL], [
26 AC_PREREQ([2.50])dnl
27 AC_REQUIRE([AM_NLS])dnl
29 case "$am__api_version" in
30     1.[01234])
31         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
32     ;;
33     *)
34     ;;
35 esac
37 if test -n "$1"; then
38     AC_MSG_CHECKING([for intltool >= $1])
40     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
41     INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
42     [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
43     ]
44     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
45     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
46         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
49 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
50 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
51 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
52 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
53     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
56   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
57 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
58      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
59      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
60       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
61      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
62    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
63     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
64 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
65        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
66       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
67       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
68       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
69       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
70     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
71   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
72     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
73     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
74    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
76 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
77 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
78 _IT_SUBST(INTLTOOL_KEYS_RULE)
79 _IT_SUBST(INTLTOOL_PROP_RULE)
80 _IT_SUBST(INTLTOOL_OAF_RULE)
81 _IT_SUBST(INTLTOOL_PONG_RULE)
82 _IT_SUBST(INTLTOOL_SERVER_RULE)
83 _IT_SUBST(INTLTOOL_SHEET_RULE)
84 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
85 _IT_SUBST(INTLTOOL_UI_RULE)
86 _IT_SUBST(INTLTOOL_XAM_RULE)
87 _IT_SUBST(INTLTOOL_KBD_RULE)
88 _IT_SUBST(INTLTOOL_XML_RULE)
89 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
90 _IT_SUBST(INTLTOOL_CAVES_RULE)
91 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
92 _IT_SUBST(INTLTOOL_THEME_RULE)
93 _IT_SUBST(INTLTOOL_SERVICE_RULE)
94 _IT_SUBST(INTLTOOL_POLICY_RULE)
96 # Check the gettext tools to make sure they are GNU
97 AC_PATH_PROG(XGETTEXT, xgettext)
98 AC_PATH_PROG(MSGMERGE, msgmerge)
99 AC_PATH_PROG(MSGFMT, msgfmt)
100 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
101 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
102     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
104 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
105 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
106 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
107 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
108     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
111 AC_PATH_PROG(INTLTOOL_PERL, perl)
112 if test -z "$INTLTOOL_PERL"; then
113    AC_MSG_ERROR([perl not found])
115 AC_MSG_CHECKING([for perl >= 5.8.1])
116 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
117 if test $? -ne 0; then
118    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
119 else
120    IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
121    AC_MSG_RESULT([$IT_PERL_VERSION])
123 if test "x$2" != "xno-xml"; then
124    AC_MSG_CHECKING([for XML::Parser])
125    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
126        AC_MSG_RESULT([ok])
127    else
128        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
129    fi
132 # Substitute ALL_LINGUAS so we can use it in po/Makefile
133 AC_SUBST(ALL_LINGUAS)
135 # Set DATADIRNAME correctly if it is not set yet
136 # (copied from glib-gettext.m4)
137 if test -z "$DATADIRNAME"; then
138   AC_LINK_IFELSE(
139     [AC_LANG_PROGRAM([[]],
140                      [[extern int _nl_msg_cat_cntr;
141                        return _nl_msg_cat_cntr]])],
142     [DATADIRNAME=share],
143     [case $host in
144     *-*-solaris*)
145     dnl On Solaris, if bind_textdomain_codeset is in libc,
146     dnl GNU format message catalog is always supported,
147     dnl since both are added to the libc all together.
148     dnl Hence, we'd like to go with DATADIRNAME=share
149     dnl in this case.
150     AC_CHECK_FUNC(bind_textdomain_codeset,
151       [DATADIRNAME=share], [DATADIRNAME=lib])
152     ;;
153     *)
154     [DATADIRNAME=lib]
155     ;;
156     esac])
158 AC_SUBST(DATADIRNAME)
160 IT_PO_SUBDIR([po])
165 # IT_PO_SUBDIR(DIRNAME)
166 # ---------------------
167 # All po subdirs have to be declared with this macro; the subdir "po" is
168 # declared by IT_PROG_INTLTOOL.
170 AC_DEFUN([IT_PO_SUBDIR],
171 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
173 dnl The following CONFIG_COMMANDS should be executed at the very end
174 dnl of config.status.
175 AC_CONFIG_COMMANDS_PRE([
176   AC_CONFIG_COMMANDS([$1/stamp-it], [
177     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
178        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
179     fi
180     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
181     >"$1/stamp-it.tmp"
182     [sed '/^#/d
183          s/^[[].*] *//
184          /^[    ]*$/d
185         '"s|^|  $ac_top_srcdir/|" \
186       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
187     ]
188     [sed '/^POTFILES =/,/[^\\]$/ {
189                 /^POTFILES =/!d
190                 r $1/POTFILES
191           }
192          ' "$1/Makefile.in" >"$1/Makefile"]
193     rm -f "$1/Makefile.tmp"
194     mv "$1/stamp-it.tmp" "$1/stamp-it"
195   ])
196 ])dnl
199 # _IT_SUBST(VARIABLE)
200 # -------------------
201 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
203 AC_DEFUN([_IT_SUBST],
205 AC_SUBST([$1])
206 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
210 # deprecated macros
211 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
212 # A hint is needed for aclocal from Automake <= 1.9.4:
213 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
216 # nls.m4 serial 5 (gettext-0.18)
217 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
218 dnl Inc.
219 dnl This file is free software; the Free Software Foundation
220 dnl gives unlimited permission to copy and/or distribute it,
221 dnl with or without modifications, as long as this notice is preserved.
223 dnl This file can can be used in projects which are not available under
224 dnl the GNU General Public License or the GNU Library General Public
225 dnl License but which still want to provide support for the GNU gettext
226 dnl functionality.
227 dnl Please note that the actual code of the GNU gettext library is covered
228 dnl by the GNU Library General Public License, and the rest of the GNU
229 dnl gettext package package is covered by the GNU General Public License.
230 dnl They are *not* in the public domain.
232 dnl Authors:
233 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
234 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
236 AC_PREREQ([2.50])
238 AC_DEFUN([AM_NLS],
240   AC_MSG_CHECKING([whether NLS is requested])
241   dnl Default is enabled NLS
242   AC_ARG_ENABLE([nls],
243     [  --disable-nls           do not use Native Language Support],
244     USE_NLS=$enableval, USE_NLS=yes)
245   AC_MSG_RESULT([$USE_NLS])
246   AC_SUBST([USE_NLS])
249 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
251 # This file is free software; the Free Software Foundation
252 # gives unlimited permission to copy and/or distribute it,
253 # with or without modifications, as long as this notice is preserved.
255 # AM_AUTOMAKE_VERSION(VERSION)
256 # ----------------------------
257 # Automake X.Y traces this macro to ensure aclocal.m4 has been
258 # generated from the m4 files accompanying Automake X.Y.
259 # (This private macro should not be called outside this file.)
260 AC_DEFUN([AM_AUTOMAKE_VERSION],
261 [am__api_version='1.11'
262 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
263 dnl require some minimum version.  Point them to the right macro.
264 m4_if([$1], [1.11.1], [],
265       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
268 # _AM_AUTOCONF_VERSION(VERSION)
269 # -----------------------------
270 # aclocal traces this macro to find the Autoconf version.
271 # This is a private macro too.  Using m4_define simplifies
272 # the logic in aclocal, which can simply ignore this definition.
273 m4_define([_AM_AUTOCONF_VERSION], [])
275 # AM_SET_CURRENT_AUTOMAKE_VERSION
276 # -------------------------------
277 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
278 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
279 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
280 [AM_AUTOMAKE_VERSION([1.11.1])dnl
281 m4_ifndef([AC_AUTOCONF_VERSION],
282   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
283 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
285 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
287 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
289 # This file is free software; the Free Software Foundation
290 # gives unlimited permission to copy and/or distribute it,
291 # with or without modifications, as long as this notice is preserved.
293 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
294 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
295 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
297 # Of course, Automake must honor this variable whenever it calls a
298 # tool from the auxiliary directory.  The problem is that $srcdir (and
299 # therefore $ac_aux_dir as well) can be either absolute or relative,
300 # depending on how configure is run.  This is pretty annoying, since
301 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
302 # source directory, any form will work fine, but in subdirectories a
303 # relative path needs to be adjusted first.
305 # $ac_aux_dir/missing
306 #    fails when called from a subdirectory if $ac_aux_dir is relative
307 # $top_srcdir/$ac_aux_dir/missing
308 #    fails if $ac_aux_dir is absolute,
309 #    fails when called from a subdirectory in a VPATH build with
310 #          a relative $ac_aux_dir
312 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
313 # are both prefixed by $srcdir.  In an in-source build this is usually
314 # harmless because $srcdir is `.', but things will broke when you
315 # start a VPATH build or use an absolute $srcdir.
317 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
318 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
319 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
320 # and then we would define $MISSING as
321 #   MISSING="\${SHELL} $am_aux_dir/missing"
322 # This will work as long as MISSING is not called from configure, because
323 # unfortunately $(top_srcdir) has no meaning in configure.
324 # However there are other variables, like CC, which are often used in
325 # configure, and could therefore not use this "fixed" $ac_aux_dir.
327 # Another solution, used here, is to always expand $ac_aux_dir to an
328 # absolute PATH.  The drawback is that using absolute paths prevent a
329 # configured tree to be moved without reconfiguration.
331 AC_DEFUN([AM_AUX_DIR_EXPAND],
332 [dnl Rely on autoconf to set up CDPATH properly.
333 AC_PREREQ([2.50])dnl
334 # expand $ac_aux_dir to an absolute path
335 am_aux_dir=`cd $ac_aux_dir && pwd`
338 # AM_CONDITIONAL                                            -*- Autoconf -*-
340 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
341 # Free Software Foundation, Inc.
343 # This file is free software; the Free Software Foundation
344 # gives unlimited permission to copy and/or distribute it,
345 # with or without modifications, as long as this notice is preserved.
347 # serial 9
349 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
350 # -------------------------------------
351 # Define a conditional.
352 AC_DEFUN([AM_CONDITIONAL],
353 [AC_PREREQ(2.52)dnl
354  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
355         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
356 AC_SUBST([$1_TRUE])dnl
357 AC_SUBST([$1_FALSE])dnl
358 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
359 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
360 m4_define([_AM_COND_VALUE_$1], [$2])dnl
361 if $2; then
362   $1_TRUE=
363   $1_FALSE='#'
364 else
365   $1_TRUE='#'
366   $1_FALSE=
368 AC_CONFIG_COMMANDS_PRE(
369 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
370   AC_MSG_ERROR([[conditional "$1" was never defined.
371 Usually this means the macro was only invoked conditionally.]])
372 fi])])
374 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
375 # Free Software Foundation, Inc.
377 # This file is free software; the Free Software Foundation
378 # gives unlimited permission to copy and/or distribute it,
379 # with or without modifications, as long as this notice is preserved.
381 # serial 10
383 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
384 # written in clear, in which case automake, when reading aclocal.m4,
385 # will think it sees a *use*, and therefore will trigger all it's
386 # C support machinery.  Also note that it means that autoscan, seeing
387 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
390 # _AM_DEPENDENCIES(NAME)
391 # ----------------------
392 # See how the compiler implements dependency checking.
393 # NAME is "CC", "CXX", "GCJ", or "OBJC".
394 # We try a few techniques and use that to set a single cache variable.
396 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
397 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
398 # dependency, and given that the user is not expected to run this macro,
399 # just rely on AC_PROG_CC.
400 AC_DEFUN([_AM_DEPENDENCIES],
401 [AC_REQUIRE([AM_SET_DEPDIR])dnl
402 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
403 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
404 AC_REQUIRE([AM_DEP_TRACK])dnl
406 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
407        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
408        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
409        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
410        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
411                    [depcc="$$1"   am_compiler_list=])
413 AC_CACHE_CHECK([dependency style of $depcc],
414                [am_cv_$1_dependencies_compiler_type],
415 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
416   # We make a subdir and do the tests there.  Otherwise we can end up
417   # making bogus files that we don't know about and never remove.  For
418   # instance it was reported that on HP-UX the gcc test will end up
419   # making a dummy file named `D' -- because `-MD' means `put the output
420   # in D'.
421   mkdir conftest.dir
422   # Copy depcomp to subdir because otherwise we won't find it if we're
423   # using a relative directory.
424   cp "$am_depcomp" conftest.dir
425   cd conftest.dir
426   # We will build objects and dependencies in a subdirectory because
427   # it helps to detect inapplicable dependency modes.  For instance
428   # both Tru64's cc and ICC support -MD to output dependencies as a
429   # side effect of compilation, but ICC will put the dependencies in
430   # the current directory while Tru64 will put them in the object
431   # directory.
432   mkdir sub
434   am_cv_$1_dependencies_compiler_type=none
435   if test "$am_compiler_list" = ""; then
436      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
437   fi
438   am__universal=false
439   m4_case([$1], [CC],
440     [case " $depcc " in #(
441      *\ -arch\ *\ -arch\ *) am__universal=true ;;
442      esac],
443     [CXX],
444     [case " $depcc " in #(
445      *\ -arch\ *\ -arch\ *) am__universal=true ;;
446      esac])
448   for depmode in $am_compiler_list; do
449     # Setup a source with many dependencies, because some compilers
450     # like to wrap large dependency lists on column 80 (with \), and
451     # we should not choose a depcomp mode which is confused by this.
452     #
453     # We need to recreate these files for each test, as the compiler may
454     # overwrite some of them when testing with obscure command lines.
455     # This happens at least with the AIX C compiler.
456     : > sub/conftest.c
457     for i in 1 2 3 4 5 6; do
458       echo '#include "conftst'$i'.h"' >> sub/conftest.c
459       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
460       # Solaris 8's {/usr,}/bin/sh.
461       touch sub/conftst$i.h
462     done
463     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
465     # We check with `-c' and `-o' for the sake of the "dashmstdout"
466     # mode.  It turns out that the SunPro C++ compiler does not properly
467     # handle `-M -o', and we need to detect this.  Also, some Intel
468     # versions had trouble with output in subdirs
469     am__obj=sub/conftest.${OBJEXT-o}
470     am__minus_obj="-o $am__obj"
471     case $depmode in
472     gcc)
473       # This depmode causes a compiler race in universal mode.
474       test "$am__universal" = false || continue
475       ;;
476     nosideeffect)
477       # after this tag, mechanisms are not by side-effect, so they'll
478       # only be used when explicitly requested
479       if test "x$enable_dependency_tracking" = xyes; then
480         continue
481       else
482         break
483       fi
484       ;;
485     msvisualcpp | msvcmsys)
486       # This compiler won't grok `-c -o', but also, the minuso test has
487       # not run yet.  These depmodes are late enough in the game, and
488       # so weak that their functioning should not be impacted.
489       am__obj=conftest.${OBJEXT-o}
490       am__minus_obj=
491       ;;
492     none) break ;;
493     esac
494     if depmode=$depmode \
495        source=sub/conftest.c object=$am__obj \
496        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
497        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
498          >/dev/null 2>conftest.err &&
499        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
500        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
501        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
502        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
503       # icc doesn't choke on unknown options, it will just issue warnings
504       # or remarks (even with -Werror).  So we grep stderr for any message
505       # that says an option was ignored or not supported.
506       # When given -MP, icc 7.0 and 7.1 complain thusly:
507       #   icc: Command line warning: ignoring option '-M'; no argument required
508       # The diagnosis changed in icc 8.0:
509       #   icc: Command line remark: option '-MP' not supported
510       if (grep 'ignoring option' conftest.err ||
511           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
512         am_cv_$1_dependencies_compiler_type=$depmode
513         break
514       fi
515     fi
516   done
518   cd ..
519   rm -rf conftest.dir
520 else
521   am_cv_$1_dependencies_compiler_type=none
524 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
525 AM_CONDITIONAL([am__fastdep$1], [
526   test "x$enable_dependency_tracking" != xno \
527   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
531 # AM_SET_DEPDIR
532 # -------------
533 # Choose a directory name for dependency files.
534 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
535 AC_DEFUN([AM_SET_DEPDIR],
536 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
537 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
541 # AM_DEP_TRACK
542 # ------------
543 AC_DEFUN([AM_DEP_TRACK],
544 [AC_ARG_ENABLE(dependency-tracking,
545 [  --disable-dependency-tracking  speeds up one-time build
546   --enable-dependency-tracking   do not reject slow dependency extractors])
547 if test "x$enable_dependency_tracking" != xno; then
548   am_depcomp="$ac_aux_dir/depcomp"
549   AMDEPBACKSLASH='\'
551 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
552 AC_SUBST([AMDEPBACKSLASH])dnl
553 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
556 # Generate code to set up dependency tracking.              -*- Autoconf -*-
558 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
559 # Free Software Foundation, Inc.
561 # This file is free software; the Free Software Foundation
562 # gives unlimited permission to copy and/or distribute it,
563 # with or without modifications, as long as this notice is preserved.
565 #serial 5
567 # _AM_OUTPUT_DEPENDENCY_COMMANDS
568 # ------------------------------
569 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
571   # Autoconf 2.62 quotes --file arguments for eval, but not when files
572   # are listed without --file.  Let's play safe and only enable the eval
573   # if we detect the quoting.
574   case $CONFIG_FILES in
575   *\'*) eval set x "$CONFIG_FILES" ;;
576   *)   set x $CONFIG_FILES ;;
577   esac
578   shift
579   for mf
580   do
581     # Strip MF so we end up with the name of the file.
582     mf=`echo "$mf" | sed -e 's/:.*$//'`
583     # Check whether this is an Automake generated Makefile or not.
584     # We used to match only the files named `Makefile.in', but
585     # some people rename them; so instead we look at the file content.
586     # Grep'ing the first line is not enough: some people post-process
587     # each Makefile.in and add a new line on top of each file to say so.
588     # Grep'ing the whole file is not good either: AIX grep has a line
589     # limit of 2048, but all sed's we know have understand at least 4000.
590     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
591       dirpart=`AS_DIRNAME("$mf")`
592     else
593       continue
594     fi
595     # Extract the definition of DEPDIR, am__include, and am__quote
596     # from the Makefile without running `make'.
597     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
598     test -z "$DEPDIR" && continue
599     am__include=`sed -n 's/^am__include = //p' < "$mf"`
600     test -z "am__include" && continue
601     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
602     # When using ansi2knr, U may be empty or an underscore; expand it
603     U=`sed -n 's/^U = //p' < "$mf"`
604     # Find all dependency output files, they are included files with
605     # $(DEPDIR) in their names.  We invoke sed twice because it is the
606     # simplest approach to changing $(DEPDIR) to its actual value in the
607     # expansion.
608     for file in `sed -n "
609       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
610          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
611       # Make sure the directory exists.
612       test -f "$dirpart/$file" && continue
613       fdir=`AS_DIRNAME(["$file"])`
614       AS_MKDIR_P([$dirpart/$fdir])
615       # echo "creating $dirpart/$file"
616       echo '# dummy' > "$dirpart/$file"
617     done
618   done
620 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
623 # AM_OUTPUT_DEPENDENCY_COMMANDS
624 # -----------------------------
625 # This macro should only be invoked once -- use via AC_REQUIRE.
627 # This code is only required when automatic dependency tracking
628 # is enabled.  FIXME.  This creates each `.P' file that we will
629 # need in order to bootstrap the dependency handling code.
630 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
631 [AC_CONFIG_COMMANDS([depfiles],
632      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
633      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
636 # Do all the work for Automake.                             -*- Autoconf -*-
638 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
639 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
641 # This file is free software; the Free Software Foundation
642 # gives unlimited permission to copy and/or distribute it,
643 # with or without modifications, as long as this notice is preserved.
645 # serial 16
647 # This macro actually does too much.  Some checks are only needed if
648 # your package does certain things.  But this isn't really a big deal.
650 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
651 # AM_INIT_AUTOMAKE([OPTIONS])
652 # -----------------------------------------------
653 # The call with PACKAGE and VERSION arguments is the old style
654 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
655 # and VERSION should now be passed to AC_INIT and removed from
656 # the call to AM_INIT_AUTOMAKE.
657 # We support both call styles for the transition.  After
658 # the next Automake release, Autoconf can make the AC_INIT
659 # arguments mandatory, and then we can depend on a new Autoconf
660 # release and drop the old call support.
661 AC_DEFUN([AM_INIT_AUTOMAKE],
662 [AC_PREREQ([2.62])dnl
663 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
664 dnl the ones we care about.
665 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
666 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
667 AC_REQUIRE([AC_PROG_INSTALL])dnl
668 if test "`cd $srcdir && pwd`" != "`pwd`"; then
669   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
670   # is not polluted with repeated "-I."
671   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
672   # test to see if srcdir already configured
673   if test -f $srcdir/config.status; then
674     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
675   fi
678 # test whether we have cygpath
679 if test -z "$CYGPATH_W"; then
680   if (cygpath --version) >/dev/null 2>/dev/null; then
681     CYGPATH_W='cygpath -w'
682   else
683     CYGPATH_W=echo
684   fi
686 AC_SUBST([CYGPATH_W])
688 # Define the identity of the package.
689 dnl Distinguish between old-style and new-style calls.
690 m4_ifval([$2],
691 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
692  AC_SUBST([PACKAGE], [$1])dnl
693  AC_SUBST([VERSION], [$2])],
694 [_AM_SET_OPTIONS([$1])dnl
695 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
696 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
697   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
698  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
699  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
701 _AM_IF_OPTION([no-define],,
702 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
703  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
705 # Some tools Automake needs.
706 AC_REQUIRE([AM_SANITY_CHECK])dnl
707 AC_REQUIRE([AC_ARG_PROGRAM])dnl
708 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
709 AM_MISSING_PROG(AUTOCONF, autoconf)
710 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
711 AM_MISSING_PROG(AUTOHEADER, autoheader)
712 AM_MISSING_PROG(MAKEINFO, makeinfo)
713 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
714 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
715 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
716 # We need awk for the "check" target.  The system "awk" is bad on
717 # some platforms.
718 AC_REQUIRE([AC_PROG_AWK])dnl
719 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
720 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
721 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
722               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
723                              [_AM_PROG_TAR([v7])])])
724 _AM_IF_OPTION([no-dependencies],,
725 [AC_PROVIDE_IFELSE([AC_PROG_CC],
726                   [_AM_DEPENDENCIES(CC)],
727                   [define([AC_PROG_CC],
728                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
729 AC_PROVIDE_IFELSE([AC_PROG_CXX],
730                   [_AM_DEPENDENCIES(CXX)],
731                   [define([AC_PROG_CXX],
732                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
733 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
734                   [_AM_DEPENDENCIES(OBJC)],
735                   [define([AC_PROG_OBJC],
736                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
738 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
739 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
740 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
741 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
742 AC_CONFIG_COMMANDS_PRE(dnl
743 [m4_provide_if([_AM_COMPILER_EXEEXT],
744   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
747 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
748 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
749 dnl mangled by Autoconf and run in a shell conditional statement.
750 m4_define([_AC_COMPILER_EXEEXT],
751 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
754 # When config.status generates a header, we must update the stamp-h file.
755 # This file resides in the same directory as the config header
756 # that is generated.  The stamp files are numbered to have different names.
758 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
759 # loop where config.status creates the headers, so we can generate
760 # our stamp files there.
761 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
762 [# Compute $1's index in $config_headers.
763 _am_arg=$1
764 _am_stamp_count=1
765 for _am_header in $config_headers :; do
766   case $_am_header in
767     $_am_arg | $_am_arg:* )
768       break ;;
769     * )
770       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
771   esac
772 done
773 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
775 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
777 # This file is free software; the Free Software Foundation
778 # gives unlimited permission to copy and/or distribute it,
779 # with or without modifications, as long as this notice is preserved.
781 # AM_PROG_INSTALL_SH
782 # ------------------
783 # Define $install_sh.
784 AC_DEFUN([AM_PROG_INSTALL_SH],
785 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
786 if test x"${install_sh}" != xset; then
787   case $am_aux_dir in
788   *\ * | *\     *)
789     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
790   *)
791     install_sh="\${SHELL} $am_aux_dir/install-sh"
792   esac
794 AC_SUBST(install_sh)])
796 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
798 # This file is free software; the Free Software Foundation
799 # gives unlimited permission to copy and/or distribute it,
800 # with or without modifications, as long as this notice is preserved.
802 # serial 2
804 # Check whether the underlying file-system supports filenames
805 # with a leading dot.  For instance MS-DOS doesn't.
806 AC_DEFUN([AM_SET_LEADING_DOT],
807 [rm -rf .tst 2>/dev/null
808 mkdir .tst 2>/dev/null
809 if test -d .tst; then
810   am__leading_dot=.
811 else
812   am__leading_dot=_
814 rmdir .tst 2>/dev/null
815 AC_SUBST([am__leading_dot])])
817 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
819 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
821 # This file is free software; the Free Software Foundation
822 # gives unlimited permission to copy and/or distribute it,
823 # with or without modifications, as long as this notice is preserved.
825 # serial 4
827 # AM_MAKE_INCLUDE()
828 # -----------------
829 # Check to see how make treats includes.
830 AC_DEFUN([AM_MAKE_INCLUDE],
831 [am_make=${MAKE-make}
832 cat > confinc << 'END'
833 am__doit:
834         @echo this is the am__doit target
835 .PHONY: am__doit
837 # If we don't find an include directive, just comment out the code.
838 AC_MSG_CHECKING([for style of include used by $am_make])
839 am__include="#"
840 am__quote=
841 _am_result=none
842 # First try GNU make style include.
843 echo "include confinc" > confmf
844 # Ignore all kinds of additional output from `make'.
845 case `$am_make -s -f confmf 2> /dev/null` in #(
846 *the\ am__doit\ target*)
847   am__include=include
848   am__quote=
849   _am_result=GNU
850   ;;
851 esac
852 # Now try BSD make style include.
853 if test "$am__include" = "#"; then
854    echo '.include "confinc"' > confmf
855    case `$am_make -s -f confmf 2> /dev/null` in #(
856    *the\ am__doit\ target*)
857      am__include=.include
858      am__quote="\""
859      _am_result=BSD
860      ;;
861    esac
863 AC_SUBST([am__include])
864 AC_SUBST([am__quote])
865 AC_MSG_RESULT([$_am_result])
866 rm -f confinc confmf
869 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
871 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
872 # Free Software Foundation, Inc.
874 # This file is free software; the Free Software Foundation
875 # gives unlimited permission to copy and/or distribute it,
876 # with or without modifications, as long as this notice is preserved.
878 # serial 6
880 # AM_MISSING_PROG(NAME, PROGRAM)
881 # ------------------------------
882 AC_DEFUN([AM_MISSING_PROG],
883 [AC_REQUIRE([AM_MISSING_HAS_RUN])
884 $1=${$1-"${am_missing_run}$2"}
885 AC_SUBST($1)])
888 # AM_MISSING_HAS_RUN
889 # ------------------
890 # Define MISSING if not defined so far and test if it supports --run.
891 # If it does, set am_missing_run to use it, otherwise, to nothing.
892 AC_DEFUN([AM_MISSING_HAS_RUN],
893 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
894 AC_REQUIRE_AUX_FILE([missing])dnl
895 if test x"${MISSING+set}" != xset; then
896   case $am_aux_dir in
897   *\ * | *\     *)
898     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
899   *)
900     MISSING="\${SHELL} $am_aux_dir/missing" ;;
901   esac
903 # Use eval to expand $SHELL
904 if eval "$MISSING --run true"; then
905   am_missing_run="$MISSING --run "
906 else
907   am_missing_run=
908   AC_MSG_WARN([`missing' script is too old or missing])
912 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
914 # This file is free software; the Free Software Foundation
915 # gives unlimited permission to copy and/or distribute it,
916 # with or without modifications, as long as this notice is preserved.
918 # AM_PROG_MKDIR_P
919 # ---------------
920 # Check for `mkdir -p'.
921 AC_DEFUN([AM_PROG_MKDIR_P],
922 [AC_PREREQ([2.60])dnl
923 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
924 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
925 dnl while keeping a definition of mkdir_p for backward compatibility.
926 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
927 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
928 dnl Makefile.ins that do not define MKDIR_P, so we do our own
929 dnl adjustment using top_builddir (which is defined more often than
930 dnl MKDIR_P).
931 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
932 case $mkdir_p in
933   [[\\/$]]* | ?:[[\\/]]*) ;;
934   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
935 esac
938 # Helper functions for option handling.                     -*- Autoconf -*-
940 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
942 # This file is free software; the Free Software Foundation
943 # gives unlimited permission to copy and/or distribute it,
944 # with or without modifications, as long as this notice is preserved.
946 # serial 4
948 # _AM_MANGLE_OPTION(NAME)
949 # -----------------------
950 AC_DEFUN([_AM_MANGLE_OPTION],
951 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
953 # _AM_SET_OPTION(NAME)
954 # ------------------------------
955 # Set option NAME.  Presently that only means defining a flag for this option.
956 AC_DEFUN([_AM_SET_OPTION],
957 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
959 # _AM_SET_OPTIONS(OPTIONS)
960 # ----------------------------------
961 # OPTIONS is a space-separated list of Automake options.
962 AC_DEFUN([_AM_SET_OPTIONS],
963 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
965 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
966 # -------------------------------------------
967 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
968 AC_DEFUN([_AM_IF_OPTION],
969 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
971 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
973 # This file is free software; the Free Software Foundation
974 # gives unlimited permission to copy and/or distribute it,
975 # with or without modifications, as long as this notice is preserved.
977 # AM_RUN_LOG(COMMAND)
978 # -------------------
979 # Run COMMAND, save the exit status in ac_status, and log it.
980 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
981 AC_DEFUN([AM_RUN_LOG],
982 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
983    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
984    ac_status=$?
985    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
986    (exit $ac_status); }])
988 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
990 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
991 # Free Software Foundation, Inc.
993 # This file is free software; the Free Software Foundation
994 # gives unlimited permission to copy and/or distribute it,
995 # with or without modifications, as long as this notice is preserved.
997 # serial 5
999 # AM_SANITY_CHECK
1000 # ---------------
1001 AC_DEFUN([AM_SANITY_CHECK],
1002 [AC_MSG_CHECKING([whether build environment is sane])
1003 # Just in case
1004 sleep 1
1005 echo timestamp > conftest.file
1006 # Reject unsafe characters in $srcdir or the absolute working directory
1007 # name.  Accept space and tab only in the latter.
1008 am_lf='
1010 case `pwd` in
1011   *[[\\\"\#\$\&\'\`$am_lf]]*)
1012     AC_MSG_ERROR([unsafe absolute working directory name]);;
1013 esac
1014 case $srcdir in
1015   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1016     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1017 esac
1019 # Do `set' in a subshell so we don't clobber the current shell's
1020 # arguments.  Must try -L first in case configure is actually a
1021 # symlink; some systems play weird games with the mod time of symlinks
1022 # (eg FreeBSD returns the mod time of the symlink's containing
1023 # directory).
1024 if (
1025    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1026    if test "$[*]" = "X"; then
1027       # -L didn't work.
1028       set X `ls -t "$srcdir/configure" conftest.file`
1029    fi
1030    rm -f conftest.file
1031    if test "$[*]" != "X $srcdir/configure conftest.file" \
1032       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1034       # If neither matched, then we have a broken ls.  This can happen
1035       # if, for instance, CONFIG_SHELL is bash and it inherits a
1036       # broken ls alias from the environment.  This has actually
1037       # happened.  Such a system could not be considered "sane".
1038       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1039 alias in your environment])
1040    fi
1042    test "$[2]" = conftest.file
1043    )
1044 then
1045    # Ok.
1046    :
1047 else
1048    AC_MSG_ERROR([newly created file is older than distributed files!
1049 Check your system clock])
1051 AC_MSG_RESULT(yes)])
1053 # Copyright (C) 2009  Free Software Foundation, Inc.
1055 # This file is free software; the Free Software Foundation
1056 # gives unlimited permission to copy and/or distribute it,
1057 # with or without modifications, as long as this notice is preserved.
1059 # serial 1
1061 # AM_SILENT_RULES([DEFAULT])
1062 # --------------------------
1063 # Enable less verbose build rules; with the default set to DEFAULT
1064 # (`yes' being less verbose, `no' or empty being verbose).
1065 AC_DEFUN([AM_SILENT_RULES],
1066 [AC_ARG_ENABLE([silent-rules],
1067 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
1068   --disable-silent-rules         verbose build output (undo: `make V=0')])
1069 case $enable_silent_rules in
1070 yes) AM_DEFAULT_VERBOSITY=0;;
1071 no)  AM_DEFAULT_VERBOSITY=1;;
1072 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1073 esac
1074 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1075 AM_BACKSLASH='\'
1076 AC_SUBST([AM_BACKSLASH])dnl
1077 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1080 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1082 # This file is free software; the Free Software Foundation
1083 # gives unlimited permission to copy and/or distribute it,
1084 # with or without modifications, as long as this notice is preserved.
1086 # AM_PROG_INSTALL_STRIP
1087 # ---------------------
1088 # One issue with vendor `install' (even GNU) is that you can't
1089 # specify the program used to strip binaries.  This is especially
1090 # annoying in cross-compiling environments, where the build's strip
1091 # is unlikely to handle the host's binaries.
1092 # Fortunately install-sh will honor a STRIPPROG variable, so we
1093 # always use install-sh in `make install-strip', and initialize
1094 # STRIPPROG with the value of the STRIP variable (set by the user).
1095 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1096 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1097 # Installed binaries are usually stripped using `strip' when the user
1098 # run `make install-strip'.  However `strip' might not be the right
1099 # tool to use in cross-compilation environments, therefore Automake
1100 # will honor the `STRIP' environment variable to overrule this program.
1101 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1102 if test "$cross_compiling" != no; then
1103   AC_CHECK_TOOL([STRIP], [strip], :)
1105 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1106 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1108 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1110 # This file is free software; the Free Software Foundation
1111 # gives unlimited permission to copy and/or distribute it,
1112 # with or without modifications, as long as this notice is preserved.
1114 # serial 2
1116 # _AM_SUBST_NOTMAKE(VARIABLE)
1117 # ---------------------------
1118 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1119 # This macro is traced by Automake.
1120 AC_DEFUN([_AM_SUBST_NOTMAKE])
1122 # AM_SUBST_NOTMAKE(VARIABLE)
1123 # ---------------------------
1124 # Public sister of _AM_SUBST_NOTMAKE.
1125 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1127 # Check how to create a tarball.                            -*- Autoconf -*-
1129 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1131 # This file is free software; the Free Software Foundation
1132 # gives unlimited permission to copy and/or distribute it,
1133 # with or without modifications, as long as this notice is preserved.
1135 # serial 2
1137 # _AM_PROG_TAR(FORMAT)
1138 # --------------------
1139 # Check how to create a tarball in format FORMAT.
1140 # FORMAT should be one of `v7', `ustar', or `pax'.
1142 # Substitute a variable $(am__tar) that is a command
1143 # writing to stdout a FORMAT-tarball containing the directory
1144 # $tardir.
1145 #     tardir=directory && $(am__tar) > result.tar
1147 # Substitute a variable $(am__untar) that extract such
1148 # a tarball read from stdin.
1149 #     $(am__untar) < result.tar
1150 AC_DEFUN([_AM_PROG_TAR],
1151 [# Always define AMTAR for backward compatibility.
1152 AM_MISSING_PROG([AMTAR], [tar])
1153 m4_if([$1], [v7],
1154      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1155      [m4_case([$1], [ustar],, [pax],,
1156               [m4_fatal([Unknown tar format])])
1157 AC_MSG_CHECKING([how to create a $1 tar archive])
1158 # Loop over all known methods to create a tar archive until one works.
1159 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1160 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1161 # Do not fold the above two line into one, because Tru64 sh and
1162 # Solaris sh will not grok spaces in the rhs of `-'.
1163 for _am_tool in $_am_tools
1165   case $_am_tool in
1166   gnutar)
1167     for _am_tar in tar gnutar gtar;
1168     do
1169       AM_RUN_LOG([$_am_tar --version]) && break
1170     done
1171     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1172     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1173     am__untar="$_am_tar -xf -"
1174     ;;
1175   plaintar)
1176     # Must skip GNU tar: if it does not support --format= it doesn't create
1177     # ustar tarball either.
1178     (tar --version) >/dev/null 2>&1 && continue
1179     am__tar='tar chf - "$$tardir"'
1180     am__tar_='tar chf - "$tardir"'
1181     am__untar='tar xf -'
1182     ;;
1183   pax)
1184     am__tar='pax -L -x $1 -w "$$tardir"'
1185     am__tar_='pax -L -x $1 -w "$tardir"'
1186     am__untar='pax -r'
1187     ;;
1188   cpio)
1189     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1190     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1191     am__untar='cpio -i -H $1 -d'
1192     ;;
1193   none)
1194     am__tar=false
1195     am__tar_=false
1196     am__untar=false
1197     ;;
1198   esac
1200   # If the value was cached, stop now.  We just wanted to have am__tar
1201   # and am__untar set.
1202   test -n "${am_cv_prog_tar_$1}" && break
1204   # tar/untar a dummy directory, and stop if the command works
1205   rm -rf conftest.dir
1206   mkdir conftest.dir
1207   echo GrepMe > conftest.dir/file
1208   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1209   rm -rf conftest.dir
1210   if test -s conftest.tar; then
1211     AM_RUN_LOG([$am__untar <conftest.tar])
1212     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1213   fi
1214 done
1215 rm -rf conftest.dir
1217 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1218 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1219 AC_SUBST([am__tar])
1220 AC_SUBST([am__untar])
1221 ]) # _AM_PROG_TAR
1223 m4_include([m4/acx-pthread.m4])
1224 m4_include([m4/check-ssl.m4])
1225 m4_include([m4/glib-gettext.m4])
1226 m4_include([m4/libtool.m4])
1227 m4_include([m4/ltoptions.m4])
1228 m4_include([m4/ltsugar.m4])
1229 m4_include([m4/ltversion.m4])
1230 m4_include([m4/lt~obsolete.m4])
1231 m4_include([m4/pkg.m4])
1232 m4_include([m4/zlib.m4])