Imported Upstream version 0.2.0
[debian/lxdm.git] / aclocal.m4
CommitLineData
faee902e 1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
eea1c851
AL
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
faee902e
AL
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17[m4_warning([this file was generated for autoconf 2.65.
eea1c851
AL
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
23dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
24# serial 40 IT_PROG_INTLTOOL
25AC_DEFUN([IT_PROG_INTLTOOL], [
26AC_PREREQ([2.50])dnl
27AC_REQUIRE([AM_NLS])dnl
28
29case "$am__api_version" in
30 1.[01234])
31 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
32 ;;
33 *)
34 ;;
35esac
36
37if test -n "$1"; then
38 AC_MSG_CHECKING([for intltool >= $1])
39
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.])
47fi
48
49AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
50AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
51AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
52if 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.])
54fi
55
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 $< [$]@'
57INTLTOOL_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 $< [$]@'
64INTLTOOL_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 $< [$]@'
75
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)
95
96# Check the gettext tools to make sure they are GNU
97AC_PATH_PROG(XGETTEXT, xgettext)
98AC_PATH_PROG(MSGMERGE, msgmerge)
99AC_PATH_PROG(MSGFMT, msgfmt)
100AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
101if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
102 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
103fi
104xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
105mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
106mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
107if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
108 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
109fi
110
111AC_PATH_PROG(INTLTOOL_PERL, perl)
112if test -z "$INTLTOOL_PERL"; then
113 AC_MSG_ERROR([perl not found])
114fi
115AC_MSG_CHECKING([for perl >= 5.8.1])
116$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
117if test $? -ne 0; then
118 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
119else
120 IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
121 AC_MSG_RESULT([$IT_PERL_VERSION])
122fi
123if 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
130fi
131
132# Substitute ALL_LINGUAS so we can use it in po/Makefile
133AC_SUBST(ALL_LINGUAS)
134
135# Set DATADIRNAME correctly if it is not set yet
136# (copied from glib-gettext.m4)
137if 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])
157fi
158AC_SUBST(DATADIRNAME)
159
160IT_PO_SUBDIR([po])
161
162])
163
164
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.
169#
170AC_DEFUN([IT_PO_SUBDIR],
171[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
172dnl
faee902e 173dnl The following CONFIG_COMMANDS should be executed at the very end
eea1c851
AL
174dnl of config.status.
175AC_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
197])
198
199# _IT_SUBST(VARIABLE)
200# -------------------
201# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
202#
203AC_DEFUN([_IT_SUBST],
204[
205AC_SUBST([$1])
206m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
207]
208)
209
210# deprecated macros
211AU_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], ...)
214
215
216# nls.m4 serial 3 (gettext-0.15)
217dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
218dnl This file is free software; the Free Software Foundation
219dnl gives unlimited permission to copy and/or distribute it,
220dnl with or without modifications, as long as this notice is preserved.
221dnl
222dnl This file can can be used in projects which are not available under
223dnl the GNU General Public License or the GNU Library General Public
224dnl License but which still want to provide support for the GNU gettext
225dnl functionality.
226dnl Please note that the actual code of the GNU gettext library is covered
227dnl by the GNU Library General Public License, and the rest of the GNU
228dnl gettext package package is covered by the GNU General Public License.
229dnl They are *not* in the public domain.
230
231dnl Authors:
232dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
233dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
234
235AC_PREREQ(2.50)
236
237AC_DEFUN([AM_NLS],
238[
239 AC_MSG_CHECKING([whether NLS is requested])
240 dnl Default is enabled NLS
241 AC_ARG_ENABLE(nls,
242 [ --disable-nls do not use Native Language Support],
243 USE_NLS=$enableval, USE_NLS=yes)
244 AC_MSG_RESULT($USE_NLS)
245 AC_SUBST(USE_NLS)
246])
247
248# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
249#
250# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
251#
252# This program is free software; you can redistribute it and/or modify
253# it under the terms of the GNU General Public License as published by
254# the Free Software Foundation; either version 2 of the License, or
255# (at your option) any later version.
256#
257# This program is distributed in the hope that it will be useful, but
258# WITHOUT ANY WARRANTY; without even the implied warranty of
259# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
260# General Public License for more details.
261#
262# You should have received a copy of the GNU General Public License
263# along with this program; if not, write to the Free Software
264# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
265#
266# As a special exception to the GNU General Public License, if you
267# distribute this file as part of a program that contains a
268# configuration script generated by Autoconf, you may include it under
269# the same distribution terms that you use for the rest of that program.
270
271# PKG_PROG_PKG_CONFIG([MIN-VERSION])
272# ----------------------------------
273AC_DEFUN([PKG_PROG_PKG_CONFIG],
274[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
275m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
276AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
277if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
278 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
279fi
280if test -n "$PKG_CONFIG"; then
281 _pkg_min_version=m4_default([$1], [0.9.0])
282 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
283 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
284 AC_MSG_RESULT([yes])
285 else
286 AC_MSG_RESULT([no])
287 PKG_CONFIG=""
288 fi
289
290fi[]dnl
291])# PKG_PROG_PKG_CONFIG
292
293# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
294#
295# Check to see whether a particular set of modules exists. Similar
296# to PKG_CHECK_MODULES(), but does not set variables or print errors.
297#
298#
299# Similar to PKG_CHECK_MODULES, make sure that the first instance of
300# this or PKG_CHECK_MODULES is called, or make sure to call
301# PKG_CHECK_EXISTS manually
302# --------------------------------------------------------------
303AC_DEFUN([PKG_CHECK_EXISTS],
304[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
305if test -n "$PKG_CONFIG" && \
306 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
307 m4_ifval([$2], [$2], [:])
308m4_ifvaln([$3], [else
309 $3])dnl
310fi])
311
312
313# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
314# ---------------------------------------------
315m4_define([_PKG_CONFIG],
316[if test -n "$$1"; then
317 pkg_cv_[]$1="$$1"
318 elif test -n "$PKG_CONFIG"; then
319 PKG_CHECK_EXISTS([$3],
320 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
321 [pkg_failed=yes])
322 else
323 pkg_failed=untried
324fi[]dnl
325])# _PKG_CONFIG
326
327# _PKG_SHORT_ERRORS_SUPPORTED
328# -----------------------------
329AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
330[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
331if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
332 _pkg_short_errors_supported=yes
333else
334 _pkg_short_errors_supported=no
335fi[]dnl
336])# _PKG_SHORT_ERRORS_SUPPORTED
337
338
339# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
340# [ACTION-IF-NOT-FOUND])
341#
342#
343# Note that if there is a possibility the first call to
344# PKG_CHECK_MODULES might not happen, you should be sure to include an
345# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
346#
347#
348# --------------------------------------------------------------
349AC_DEFUN([PKG_CHECK_MODULES],
350[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
351AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
352AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
353
354pkg_failed=no
355AC_MSG_CHECKING([for $1])
356
357_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
358_PKG_CONFIG([$1][_LIBS], [libs], [$2])
359
360m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
361and $1[]_LIBS to avoid the need to call pkg-config.
362See the pkg-config man page for more details.])
363
364if test $pkg_failed = yes; then
365 _PKG_SHORT_ERRORS_SUPPORTED
366 if test $_pkg_short_errors_supported = yes; then
367 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
368 else
369 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
370 fi
371 # Put the nasty error message in config.log where it belongs
372 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
373
374 ifelse([$4], , [AC_MSG_ERROR(dnl
375[Package requirements ($2) were not met:
376
377$$1_PKG_ERRORS
378
379Consider adjusting the PKG_CONFIG_PATH environment variable if you
380installed software in a non-standard prefix.
381
382_PKG_TEXT
383])],
384 [AC_MSG_RESULT([no])
385 $4])
386elif test $pkg_failed = untried; then
387 ifelse([$4], , [AC_MSG_FAILURE(dnl
388[The pkg-config script could not be found or is too old. Make sure it
389is in your PATH or set the PKG_CONFIG environment variable to the full
390path to pkg-config.
391
392_PKG_TEXT
393
394To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
395 [$4])
396else
397 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
398 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
399 AC_MSG_RESULT([yes])
400 ifelse([$3], , :, [$3])
401fi[]dnl
402])# PKG_CHECK_MODULES
403
404# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
405#
406# This file is free software; the Free Software Foundation
407# gives unlimited permission to copy and/or distribute it,
408# with or without modifications, as long as this notice is preserved.
409
410# AM_AUTOMAKE_VERSION(VERSION)
411# ----------------------------
412# Automake X.Y traces this macro to ensure aclocal.m4 has been
413# generated from the m4 files accompanying Automake X.Y.
414# (This private macro should not be called outside this file.)
415AC_DEFUN([AM_AUTOMAKE_VERSION],
416[am__api_version='1.11'
417dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
418dnl require some minimum version. Point them to the right macro.
faee902e 419m4_if([$1], [1.11.1], [],
eea1c851
AL
420 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
421])
422
423# _AM_AUTOCONF_VERSION(VERSION)
424# -----------------------------
425# aclocal traces this macro to find the Autoconf version.
426# This is a private macro too. Using m4_define simplifies
427# the logic in aclocal, which can simply ignore this definition.
428m4_define([_AM_AUTOCONF_VERSION], [])
429
430# AM_SET_CURRENT_AUTOMAKE_VERSION
431# -------------------------------
432# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
433# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
434AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
faee902e 435[AM_AUTOMAKE_VERSION([1.11.1])dnl
eea1c851
AL
436m4_ifndef([AC_AUTOCONF_VERSION],
437 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
438_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
439
440# AM_AUX_DIR_EXPAND -*- Autoconf -*-
441
442# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
443#
444# This file is free software; the Free Software Foundation
445# gives unlimited permission to copy and/or distribute it,
446# with or without modifications, as long as this notice is preserved.
447
448# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
449# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
450# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
451#
452# Of course, Automake must honor this variable whenever it calls a
453# tool from the auxiliary directory. The problem is that $srcdir (and
454# therefore $ac_aux_dir as well) can be either absolute or relative,
455# depending on how configure is run. This is pretty annoying, since
456# it makes $ac_aux_dir quite unusable in subdirectories: in the top
457# source directory, any form will work fine, but in subdirectories a
458# relative path needs to be adjusted first.
459#
460# $ac_aux_dir/missing
461# fails when called from a subdirectory if $ac_aux_dir is relative
462# $top_srcdir/$ac_aux_dir/missing
463# fails if $ac_aux_dir is absolute,
464# fails when called from a subdirectory in a VPATH build with
465# a relative $ac_aux_dir
466#
467# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
468# are both prefixed by $srcdir. In an in-source build this is usually
469# harmless because $srcdir is `.', but things will broke when you
470# start a VPATH build or use an absolute $srcdir.
471#
472# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
473# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
474# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
475# and then we would define $MISSING as
476# MISSING="\${SHELL} $am_aux_dir/missing"
477# This will work as long as MISSING is not called from configure, because
478# unfortunately $(top_srcdir) has no meaning in configure.
479# However there are other variables, like CC, which are often used in
480# configure, and could therefore not use this "fixed" $ac_aux_dir.
481#
482# Another solution, used here, is to always expand $ac_aux_dir to an
483# absolute PATH. The drawback is that using absolute paths prevent a
484# configured tree to be moved without reconfiguration.
485
486AC_DEFUN([AM_AUX_DIR_EXPAND],
487[dnl Rely on autoconf to set up CDPATH properly.
488AC_PREREQ([2.50])dnl
489# expand $ac_aux_dir to an absolute path
490am_aux_dir=`cd $ac_aux_dir && pwd`
491])
492
493# AM_CONDITIONAL -*- Autoconf -*-
494
495# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
496# Free Software Foundation, Inc.
497#
498# This file is free software; the Free Software Foundation
499# gives unlimited permission to copy and/or distribute it,
500# with or without modifications, as long as this notice is preserved.
501
502# serial 9
503
504# AM_CONDITIONAL(NAME, SHELL-CONDITION)
505# -------------------------------------
506# Define a conditional.
507AC_DEFUN([AM_CONDITIONAL],
508[AC_PREREQ(2.52)dnl
509 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
510 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
511AC_SUBST([$1_TRUE])dnl
512AC_SUBST([$1_FALSE])dnl
513_AM_SUBST_NOTMAKE([$1_TRUE])dnl
514_AM_SUBST_NOTMAKE([$1_FALSE])dnl
515m4_define([_AM_COND_VALUE_$1], [$2])dnl
516if $2; then
517 $1_TRUE=
518 $1_FALSE='#'
519else
520 $1_TRUE='#'
521 $1_FALSE=
522fi
523AC_CONFIG_COMMANDS_PRE(
524[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
525 AC_MSG_ERROR([[conditional "$1" was never defined.
526Usually this means the macro was only invoked conditionally.]])
527fi])])
528
529# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
530# Free Software Foundation, Inc.
531#
532# This file is free software; the Free Software Foundation
533# gives unlimited permission to copy and/or distribute it,
534# with or without modifications, as long as this notice is preserved.
535
536# serial 10
537
538# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
539# written in clear, in which case automake, when reading aclocal.m4,
540# will think it sees a *use*, and therefore will trigger all it's
541# C support machinery. Also note that it means that autoscan, seeing
542# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
543
544
545# _AM_DEPENDENCIES(NAME)
546# ----------------------
547# See how the compiler implements dependency checking.
548# NAME is "CC", "CXX", "GCJ", or "OBJC".
549# We try a few techniques and use that to set a single cache variable.
550#
551# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
552# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
553# dependency, and given that the user is not expected to run this macro,
554# just rely on AC_PROG_CC.
555AC_DEFUN([_AM_DEPENDENCIES],
556[AC_REQUIRE([AM_SET_DEPDIR])dnl
557AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
558AC_REQUIRE([AM_MAKE_INCLUDE])dnl
559AC_REQUIRE([AM_DEP_TRACK])dnl
560
561ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
562 [$1], CXX, [depcc="$CXX" am_compiler_list=],
563 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
564 [$1], UPC, [depcc="$UPC" am_compiler_list=],
565 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
566 [depcc="$$1" am_compiler_list=])
567
568AC_CACHE_CHECK([dependency style of $depcc],
569 [am_cv_$1_dependencies_compiler_type],
570[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
571 # We make a subdir and do the tests there. Otherwise we can end up
572 # making bogus files that we don't know about and never remove. For
573 # instance it was reported that on HP-UX the gcc test will end up
574 # making a dummy file named `D' -- because `-MD' means `put the output
575 # in D'.
576 mkdir conftest.dir
577 # Copy depcomp to subdir because otherwise we won't find it if we're
578 # using a relative directory.
579 cp "$am_depcomp" conftest.dir
580 cd conftest.dir
581 # We will build objects and dependencies in a subdirectory because
582 # it helps to detect inapplicable dependency modes. For instance
583 # both Tru64's cc and ICC support -MD to output dependencies as a
584 # side effect of compilation, but ICC will put the dependencies in
585 # the current directory while Tru64 will put them in the object
586 # directory.
587 mkdir sub
588
589 am_cv_$1_dependencies_compiler_type=none
590 if test "$am_compiler_list" = ""; then
591 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
592 fi
593 am__universal=false
594 m4_case([$1], [CC],
595 [case " $depcc " in #(
596 *\ -arch\ *\ -arch\ *) am__universal=true ;;
597 esac],
598 [CXX],
599 [case " $depcc " in #(
600 *\ -arch\ *\ -arch\ *) am__universal=true ;;
601 esac])
602
603 for depmode in $am_compiler_list; do
604 # Setup a source with many dependencies, because some compilers
605 # like to wrap large dependency lists on column 80 (with \), and
606 # we should not choose a depcomp mode which is confused by this.
607 #
608 # We need to recreate these files for each test, as the compiler may
609 # overwrite some of them when testing with obscure command lines.
610 # This happens at least with the AIX C compiler.
611 : > sub/conftest.c
612 for i in 1 2 3 4 5 6; do
613 echo '#include "conftst'$i'.h"' >> sub/conftest.c
614 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
615 # Solaris 8's {/usr,}/bin/sh.
616 touch sub/conftst$i.h
617 done
618 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
619
620 # We check with `-c' and `-o' for the sake of the "dashmstdout"
621 # mode. It turns out that the SunPro C++ compiler does not properly
622 # handle `-M -o', and we need to detect this. Also, some Intel
623 # versions had trouble with output in subdirs
624 am__obj=sub/conftest.${OBJEXT-o}
625 am__minus_obj="-o $am__obj"
626 case $depmode in
627 gcc)
628 # This depmode causes a compiler race in universal mode.
629 test "$am__universal" = false || continue
630 ;;
631 nosideeffect)
632 # after this tag, mechanisms are not by side-effect, so they'll
633 # only be used when explicitly requested
634 if test "x$enable_dependency_tracking" = xyes; then
635 continue
636 else
637 break
638 fi
639 ;;
640 msvisualcpp | msvcmsys)
641 # This compiler won't grok `-c -o', but also, the minuso test has
642 # not run yet. These depmodes are late enough in the game, and
643 # so weak that their functioning should not be impacted.
644 am__obj=conftest.${OBJEXT-o}
645 am__minus_obj=
646 ;;
647 none) break ;;
648 esac
649 if depmode=$depmode \
650 source=sub/conftest.c object=$am__obj \
651 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
652 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
653 >/dev/null 2>conftest.err &&
654 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
655 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
656 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
657 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
658 # icc doesn't choke on unknown options, it will just issue warnings
659 # or remarks (even with -Werror). So we grep stderr for any message
660 # that says an option was ignored or not supported.
661 # When given -MP, icc 7.0 and 7.1 complain thusly:
662 # icc: Command line warning: ignoring option '-M'; no argument required
663 # The diagnosis changed in icc 8.0:
664 # icc: Command line remark: option '-MP' not supported
665 if (grep 'ignoring option' conftest.err ||
666 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
667 am_cv_$1_dependencies_compiler_type=$depmode
668 break
669 fi
670 fi
671 done
672
673 cd ..
674 rm -rf conftest.dir
675else
676 am_cv_$1_dependencies_compiler_type=none
677fi
678])
679AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
680AM_CONDITIONAL([am__fastdep$1], [
681 test "x$enable_dependency_tracking" != xno \
682 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
683])
684
685
686# AM_SET_DEPDIR
687# -------------
688# Choose a directory name for dependency files.
689# This macro is AC_REQUIREd in _AM_DEPENDENCIES
690AC_DEFUN([AM_SET_DEPDIR],
691[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
692AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
693])
694
695
696# AM_DEP_TRACK
697# ------------
698AC_DEFUN([AM_DEP_TRACK],
699[AC_ARG_ENABLE(dependency-tracking,
700[ --disable-dependency-tracking speeds up one-time build
701 --enable-dependency-tracking do not reject slow dependency extractors])
702if test "x$enable_dependency_tracking" != xno; then
703 am_depcomp="$ac_aux_dir/depcomp"
704 AMDEPBACKSLASH='\'
705fi
706AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
707AC_SUBST([AMDEPBACKSLASH])dnl
708_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
709])
710
711# Generate code to set up dependency tracking. -*- Autoconf -*-
712
713# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
714# Free Software Foundation, Inc.
715#
716# This file is free software; the Free Software Foundation
717# gives unlimited permission to copy and/or distribute it,
718# with or without modifications, as long as this notice is preserved.
719
720#serial 5
721
722# _AM_OUTPUT_DEPENDENCY_COMMANDS
723# ------------------------------
724AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
725[{
726 # Autoconf 2.62 quotes --file arguments for eval, but not when files
727 # are listed without --file. Let's play safe and only enable the eval
728 # if we detect the quoting.
729 case $CONFIG_FILES in
730 *\'*) eval set x "$CONFIG_FILES" ;;
731 *) set x $CONFIG_FILES ;;
732 esac
733 shift
734 for mf
735 do
736 # Strip MF so we end up with the name of the file.
737 mf=`echo "$mf" | sed -e 's/:.*$//'`
738 # Check whether this is an Automake generated Makefile or not.
739 # We used to match only the files named `Makefile.in', but
740 # some people rename them; so instead we look at the file content.
741 # Grep'ing the first line is not enough: some people post-process
742 # each Makefile.in and add a new line on top of each file to say so.
743 # Grep'ing the whole file is not good either: AIX grep has a line
744 # limit of 2048, but all sed's we know have understand at least 4000.
745 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
746 dirpart=`AS_DIRNAME("$mf")`
747 else
748 continue
749 fi
750 # Extract the definition of DEPDIR, am__include, and am__quote
751 # from the Makefile without running `make'.
752 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
753 test -z "$DEPDIR" && continue
754 am__include=`sed -n 's/^am__include = //p' < "$mf"`
755 test -z "am__include" && continue
756 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
757 # When using ansi2knr, U may be empty or an underscore; expand it
758 U=`sed -n 's/^U = //p' < "$mf"`
759 # Find all dependency output files, they are included files with
760 # $(DEPDIR) in their names. We invoke sed twice because it is the
761 # simplest approach to changing $(DEPDIR) to its actual value in the
762 # expansion.
763 for file in `sed -n "
764 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
765 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
766 # Make sure the directory exists.
767 test -f "$dirpart/$file" && continue
768 fdir=`AS_DIRNAME(["$file"])`
769 AS_MKDIR_P([$dirpart/$fdir])
770 # echo "creating $dirpart/$file"
771 echo '# dummy' > "$dirpart/$file"
772 done
773 done
774}
775])# _AM_OUTPUT_DEPENDENCY_COMMANDS
776
777
778# AM_OUTPUT_DEPENDENCY_COMMANDS
779# -----------------------------
780# This macro should only be invoked once -- use via AC_REQUIRE.
781#
782# This code is only required when automatic dependency tracking
783# is enabled. FIXME. This creates each `.P' file that we will
784# need in order to bootstrap the dependency handling code.
785AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
786[AC_CONFIG_COMMANDS([depfiles],
787 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
788 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
789])
790
791# Do all the work for Automake. -*- Autoconf -*-
792
793# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
794# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
795#
796# This file is free software; the Free Software Foundation
797# gives unlimited permission to copy and/or distribute it,
798# with or without modifications, as long as this notice is preserved.
799
800# serial 16
801
802# This macro actually does too much. Some checks are only needed if
803# your package does certain things. But this isn't really a big deal.
804
805# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
806# AM_INIT_AUTOMAKE([OPTIONS])
807# -----------------------------------------------
808# The call with PACKAGE and VERSION arguments is the old style
809# call (pre autoconf-2.50), which is being phased out. PACKAGE
810# and VERSION should now be passed to AC_INIT and removed from
811# the call to AM_INIT_AUTOMAKE.
812# We support both call styles for the transition. After
813# the next Automake release, Autoconf can make the AC_INIT
814# arguments mandatory, and then we can depend on a new Autoconf
815# release and drop the old call support.
816AC_DEFUN([AM_INIT_AUTOMAKE],
817[AC_PREREQ([2.62])dnl
818dnl Autoconf wants to disallow AM_ names. We explicitly allow
819dnl the ones we care about.
820m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
821AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
822AC_REQUIRE([AC_PROG_INSTALL])dnl
823if test "`cd $srcdir && pwd`" != "`pwd`"; then
824 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
825 # is not polluted with repeated "-I."
826 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
827 # test to see if srcdir already configured
828 if test -f $srcdir/config.status; then
829 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
830 fi
831fi
832
833# test whether we have cygpath
834if test -z "$CYGPATH_W"; then
835 if (cygpath --version) >/dev/null 2>/dev/null; then
836 CYGPATH_W='cygpath -w'
837 else
838 CYGPATH_W=echo
839 fi
840fi
841AC_SUBST([CYGPATH_W])
842
843# Define the identity of the package.
844dnl Distinguish between old-style and new-style calls.
845m4_ifval([$2],
846[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
847 AC_SUBST([PACKAGE], [$1])dnl
848 AC_SUBST([VERSION], [$2])],
849[_AM_SET_OPTIONS([$1])dnl
850dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
851m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
852 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
853 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
854 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
855
856_AM_IF_OPTION([no-define],,
857[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
858 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
859
860# Some tools Automake needs.
861AC_REQUIRE([AM_SANITY_CHECK])dnl
862AC_REQUIRE([AC_ARG_PROGRAM])dnl
863AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
864AM_MISSING_PROG(AUTOCONF, autoconf)
865AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
866AM_MISSING_PROG(AUTOHEADER, autoheader)
867AM_MISSING_PROG(MAKEINFO, makeinfo)
868AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
869AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
870AC_REQUIRE([AM_PROG_MKDIR_P])dnl
871# We need awk for the "check" target. The system "awk" is bad on
872# some platforms.
873AC_REQUIRE([AC_PROG_AWK])dnl
874AC_REQUIRE([AC_PROG_MAKE_SET])dnl
875AC_REQUIRE([AM_SET_LEADING_DOT])dnl
876_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
877 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
878 [_AM_PROG_TAR([v7])])])
879_AM_IF_OPTION([no-dependencies],,
880[AC_PROVIDE_IFELSE([AC_PROG_CC],
881 [_AM_DEPENDENCIES(CC)],
882 [define([AC_PROG_CC],
883 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
884AC_PROVIDE_IFELSE([AC_PROG_CXX],
885 [_AM_DEPENDENCIES(CXX)],
886 [define([AC_PROG_CXX],
887 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
888AC_PROVIDE_IFELSE([AC_PROG_OBJC],
889 [_AM_DEPENDENCIES(OBJC)],
890 [define([AC_PROG_OBJC],
891 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
892])
893_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
894dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
895dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
896dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
897AC_CONFIG_COMMANDS_PRE(dnl
898[m4_provide_if([_AM_COMPILER_EXEEXT],
899 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
900])
901
902dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
903dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
904dnl mangled by Autoconf and run in a shell conditional statement.
905m4_define([_AC_COMPILER_EXEEXT],
906m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
907
908
909# When config.status generates a header, we must update the stamp-h file.
910# This file resides in the same directory as the config header
911# that is generated. The stamp files are numbered to have different names.
912
913# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
914# loop where config.status creates the headers, so we can generate
915# our stamp files there.
916AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
917[# Compute $1's index in $config_headers.
918_am_arg=$1
919_am_stamp_count=1
920for _am_header in $config_headers :; do
921 case $_am_header in
922 $_am_arg | $_am_arg:* )
923 break ;;
924 * )
925 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
926 esac
927done
928echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
929
930# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
931#
932# This file is free software; the Free Software Foundation
933# gives unlimited permission to copy and/or distribute it,
934# with or without modifications, as long as this notice is preserved.
935
936# AM_PROG_INSTALL_SH
937# ------------------
938# Define $install_sh.
939AC_DEFUN([AM_PROG_INSTALL_SH],
940[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
941if test x"${install_sh}" != xset; then
942 case $am_aux_dir in
943 *\ * | *\ *)
944 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
945 *)
946 install_sh="\${SHELL} $am_aux_dir/install-sh"
947 esac
948fi
949AC_SUBST(install_sh)])
950
951# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
952#
953# This file is free software; the Free Software Foundation
954# gives unlimited permission to copy and/or distribute it,
955# with or without modifications, as long as this notice is preserved.
956
957# serial 2
958
959# Check whether the underlying file-system supports filenames
960# with a leading dot. For instance MS-DOS doesn't.
961AC_DEFUN([AM_SET_LEADING_DOT],
962[rm -rf .tst 2>/dev/null
963mkdir .tst 2>/dev/null
964if test -d .tst; then
965 am__leading_dot=.
966else
967 am__leading_dot=_
968fi
969rmdir .tst 2>/dev/null
970AC_SUBST([am__leading_dot])])
971
972# Check to see how 'make' treats includes. -*- Autoconf -*-
973
974# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
975#
976# This file is free software; the Free Software Foundation
977# gives unlimited permission to copy and/or distribute it,
978# with or without modifications, as long as this notice is preserved.
979
980# serial 4
981
982# AM_MAKE_INCLUDE()
983# -----------------
984# Check to see how make treats includes.
985AC_DEFUN([AM_MAKE_INCLUDE],
986[am_make=${MAKE-make}
987cat > confinc << 'END'
988am__doit:
989 @echo this is the am__doit target
990.PHONY: am__doit
991END
992# If we don't find an include directive, just comment out the code.
993AC_MSG_CHECKING([for style of include used by $am_make])
994am__include="#"
995am__quote=
996_am_result=none
997# First try GNU make style include.
998echo "include confinc" > confmf
999# Ignore all kinds of additional output from `make'.
1000case `$am_make -s -f confmf 2> /dev/null` in #(
1001*the\ am__doit\ target*)
1002 am__include=include
1003 am__quote=
1004 _am_result=GNU
1005 ;;
1006esac
1007# Now try BSD make style include.
1008if test "$am__include" = "#"; then
1009 echo '.include "confinc"' > confmf
1010 case `$am_make -s -f confmf 2> /dev/null` in #(
1011 *the\ am__doit\ target*)
1012 am__include=.include
1013 am__quote="\""
1014 _am_result=BSD
1015 ;;
1016 esac
1017fi
1018AC_SUBST([am__include])
1019AC_SUBST([am__quote])
1020AC_MSG_RESULT([$_am_result])
1021rm -f confinc confmf
1022])
1023
1024# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1025# Free Software Foundation, Inc.
1026#
1027# This file is free software; the Free Software Foundation
1028# gives unlimited permission to copy and/or distribute it,
1029# with or without modifications, as long as this notice is preserved.
1030
1031# serial 6
1032
1033# AM_PROG_CC_C_O
1034# --------------
1035# Like AC_PROG_CC_C_O, but changed for automake.
1036AC_DEFUN([AM_PROG_CC_C_O],
1037[AC_REQUIRE([AC_PROG_CC_C_O])dnl
1038AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1039AC_REQUIRE_AUX_FILE([compile])dnl
1040# FIXME: we rely on the cache variable name because
1041# there is no other way.
1042set dummy $CC
1043am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1044eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1045if test "$am_t" != yes; then
1046 # Losing compiler, so override with the script.
1047 # FIXME: It is wrong to rewrite CC.
1048 # But if we don't then we get into trouble of one sort or another.
1049 # A longer-term fix would be to have automake use am__CC in this case,
1050 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1051 CC="$am_aux_dir/compile $CC"
1052fi
1053dnl Make sure AC_PROG_CC is never called again, or it will override our
1054dnl setting of CC.
1055m4_define([AC_PROG_CC],
1056 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1057])
1058
1059# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1060
1061# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1062# Free Software Foundation, Inc.
1063#
1064# This file is free software; the Free Software Foundation
1065# gives unlimited permission to copy and/or distribute it,
1066# with or without modifications, as long as this notice is preserved.
1067
1068# serial 6
1069
1070# AM_MISSING_PROG(NAME, PROGRAM)
1071# ------------------------------
1072AC_DEFUN([AM_MISSING_PROG],
1073[AC_REQUIRE([AM_MISSING_HAS_RUN])
1074$1=${$1-"${am_missing_run}$2"}
1075AC_SUBST($1)])
1076
1077
1078# AM_MISSING_HAS_RUN
1079# ------------------
1080# Define MISSING if not defined so far and test if it supports --run.
1081# If it does, set am_missing_run to use it, otherwise, to nothing.
1082AC_DEFUN([AM_MISSING_HAS_RUN],
1083[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1084AC_REQUIRE_AUX_FILE([missing])dnl
1085if test x"${MISSING+set}" != xset; then
1086 case $am_aux_dir in
1087 *\ * | *\ *)
1088 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1089 *)
1090 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1091 esac
1092fi
1093# Use eval to expand $SHELL
1094if eval "$MISSING --run true"; then
1095 am_missing_run="$MISSING --run "
1096else
1097 am_missing_run=
1098 AC_MSG_WARN([`missing' script is too old or missing])
1099fi
1100])
1101
1102# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1103#
1104# This file is free software; the Free Software Foundation
1105# gives unlimited permission to copy and/or distribute it,
1106# with or without modifications, as long as this notice is preserved.
1107
1108# AM_PROG_MKDIR_P
1109# ---------------
1110# Check for `mkdir -p'.
1111AC_DEFUN([AM_PROG_MKDIR_P],
1112[AC_PREREQ([2.60])dnl
1113AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1114dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1115dnl while keeping a definition of mkdir_p for backward compatibility.
1116dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1117dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1118dnl Makefile.ins that do not define MKDIR_P, so we do our own
1119dnl adjustment using top_builddir (which is defined more often than
1120dnl MKDIR_P).
1121AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1122case $mkdir_p in
1123 [[\\/$]]* | ?:[[\\/]]*) ;;
1124 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1125esac
1126])
1127
1128# Helper functions for option handling. -*- Autoconf -*-
1129
1130# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1131#
1132# This file is free software; the Free Software Foundation
1133# gives unlimited permission to copy and/or distribute it,
1134# with or without modifications, as long as this notice is preserved.
1135
1136# serial 4
1137
1138# _AM_MANGLE_OPTION(NAME)
1139# -----------------------
1140AC_DEFUN([_AM_MANGLE_OPTION],
1141[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1142
1143# _AM_SET_OPTION(NAME)
1144# ------------------------------
1145# Set option NAME. Presently that only means defining a flag for this option.
1146AC_DEFUN([_AM_SET_OPTION],
1147[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1148
1149# _AM_SET_OPTIONS(OPTIONS)
1150# ----------------------------------
1151# OPTIONS is a space-separated list of Automake options.
1152AC_DEFUN([_AM_SET_OPTIONS],
1153[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1154
1155# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1156# -------------------------------------------
1157# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1158AC_DEFUN([_AM_IF_OPTION],
1159[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1160
1161# Check to make sure that the build environment is sane. -*- Autoconf -*-
1162
1163# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1164# Free Software Foundation, Inc.
1165#
1166# This file is free software; the Free Software Foundation
1167# gives unlimited permission to copy and/or distribute it,
1168# with or without modifications, as long as this notice is preserved.
1169
1170# serial 5
1171
1172# AM_SANITY_CHECK
1173# ---------------
1174AC_DEFUN([AM_SANITY_CHECK],
1175[AC_MSG_CHECKING([whether build environment is sane])
1176# Just in case
1177sleep 1
1178echo timestamp > conftest.file
1179# Reject unsafe characters in $srcdir or the absolute working directory
1180# name. Accept space and tab only in the latter.
1181am_lf='
1182'
1183case `pwd` in
1184 *[[\\\"\#\$\&\'\`$am_lf]]*)
1185 AC_MSG_ERROR([unsafe absolute working directory name]);;
1186esac
1187case $srcdir in
1188 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1189 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1190esac
1191
1192# Do `set' in a subshell so we don't clobber the current shell's
1193# arguments. Must try -L first in case configure is actually a
1194# symlink; some systems play weird games with the mod time of symlinks
1195# (eg FreeBSD returns the mod time of the symlink's containing
1196# directory).
1197if (
1198 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1199 if test "$[*]" = "X"; then
1200 # -L didn't work.
1201 set X `ls -t "$srcdir/configure" conftest.file`
1202 fi
1203 rm -f conftest.file
1204 if test "$[*]" != "X $srcdir/configure conftest.file" \
1205 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1206
1207 # If neither matched, then we have a broken ls. This can happen
1208 # if, for instance, CONFIG_SHELL is bash and it inherits a
1209 # broken ls alias from the environment. This has actually
1210 # happened. Such a system could not be considered "sane".
1211 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1212alias in your environment])
1213 fi
1214
1215 test "$[2]" = conftest.file
1216 )
1217then
1218 # Ok.
1219 :
1220else
1221 AC_MSG_ERROR([newly created file is older than distributed files!
1222Check your system clock])
1223fi
1224AC_MSG_RESULT(yes)])
1225
1226# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1227#
1228# This file is free software; the Free Software Foundation
1229# gives unlimited permission to copy and/or distribute it,
1230# with or without modifications, as long as this notice is preserved.
1231
1232# AM_PROG_INSTALL_STRIP
1233# ---------------------
1234# One issue with vendor `install' (even GNU) is that you can't
1235# specify the program used to strip binaries. This is especially
1236# annoying in cross-compiling environments, where the build's strip
1237# is unlikely to handle the host's binaries.
1238# Fortunately install-sh will honor a STRIPPROG variable, so we
1239# always use install-sh in `make install-strip', and initialize
1240# STRIPPROG with the value of the STRIP variable (set by the user).
1241AC_DEFUN([AM_PROG_INSTALL_STRIP],
1242[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1243# Installed binaries are usually stripped using `strip' when the user
1244# run `make install-strip'. However `strip' might not be the right
1245# tool to use in cross-compilation environments, therefore Automake
1246# will honor the `STRIP' environment variable to overrule this program.
1247dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1248if test "$cross_compiling" != no; then
1249 AC_CHECK_TOOL([STRIP], [strip], :)
1250fi
1251INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1252AC_SUBST([INSTALL_STRIP_PROGRAM])])
1253
1254# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1255#
1256# This file is free software; the Free Software Foundation
1257# gives unlimited permission to copy and/or distribute it,
1258# with or without modifications, as long as this notice is preserved.
1259
1260# serial 2
1261
1262# _AM_SUBST_NOTMAKE(VARIABLE)
1263# ---------------------------
1264# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1265# This macro is traced by Automake.
1266AC_DEFUN([_AM_SUBST_NOTMAKE])
1267
1268# AM_SUBST_NOTMAKE(VARIABLE)
1269# ---------------------------
1270# Public sister of _AM_SUBST_NOTMAKE.
1271AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1272
1273# Check how to create a tarball. -*- Autoconf -*-
1274
1275# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1276#
1277# This file is free software; the Free Software Foundation
1278# gives unlimited permission to copy and/or distribute it,
1279# with or without modifications, as long as this notice is preserved.
1280
1281# serial 2
1282
1283# _AM_PROG_TAR(FORMAT)
1284# --------------------
1285# Check how to create a tarball in format FORMAT.
1286# FORMAT should be one of `v7', `ustar', or `pax'.
1287#
1288# Substitute a variable $(am__tar) that is a command
1289# writing to stdout a FORMAT-tarball containing the directory
1290# $tardir.
1291# tardir=directory && $(am__tar) > result.tar
1292#
1293# Substitute a variable $(am__untar) that extract such
1294# a tarball read from stdin.
1295# $(am__untar) < result.tar
1296AC_DEFUN([_AM_PROG_TAR],
1297[# Always define AMTAR for backward compatibility.
1298AM_MISSING_PROG([AMTAR], [tar])
1299m4_if([$1], [v7],
1300 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1301 [m4_case([$1], [ustar],, [pax],,
1302 [m4_fatal([Unknown tar format])])
1303AC_MSG_CHECKING([how to create a $1 tar archive])
1304# Loop over all known methods to create a tar archive until one works.
1305_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1306_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1307# Do not fold the above two line into one, because Tru64 sh and
1308# Solaris sh will not grok spaces in the rhs of `-'.
1309for _am_tool in $_am_tools
1310do
1311 case $_am_tool in
1312 gnutar)
1313 for _am_tar in tar gnutar gtar;
1314 do
1315 AM_RUN_LOG([$_am_tar --version]) && break
1316 done
1317 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1318 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1319 am__untar="$_am_tar -xf -"
1320 ;;
1321 plaintar)
1322 # Must skip GNU tar: if it does not support --format= it doesn't create
1323 # ustar tarball either.
1324 (tar --version) >/dev/null 2>&1 && continue
1325 am__tar='tar chf - "$$tardir"'
1326 am__tar_='tar chf - "$tardir"'
1327 am__untar='tar xf -'
1328 ;;
1329 pax)
1330 am__tar='pax -L -x $1 -w "$$tardir"'
1331 am__tar_='pax -L -x $1 -w "$tardir"'
1332 am__untar='pax -r'
1333 ;;
1334 cpio)
1335 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1336 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1337 am__untar='cpio -i -H $1 -d'
1338 ;;
1339 none)
1340 am__tar=false
1341 am__tar_=false
1342 am__untar=false
1343 ;;
1344 esac
1345
1346 # If the value was cached, stop now. We just wanted to have am__tar
1347 # and am__untar set.
1348 test -n "${am_cv_prog_tar_$1}" && break
1349
1350 # tar/untar a dummy directory, and stop if the command works
1351 rm -rf conftest.dir
1352 mkdir conftest.dir
1353 echo GrepMe > conftest.dir/file
1354 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1355 rm -rf conftest.dir
1356 if test -s conftest.tar; then
1357 AM_RUN_LOG([$am__untar <conftest.tar])
1358 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1359 fi
1360done
1361rm -rf conftest.dir
1362
1363AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1364AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1365AC_SUBST([am__tar])
1366AC_SUBST([am__untar])
1367]) # _AM_PROG_TAR
1368