Removing whitespaces at EOL and EOF.
[debian/lxmenu-data.git] / aclocal.m4
CommitLineData
1ba9830c 1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
44e1791e
DB
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
c651baf3 4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
44e1791e
DB
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
1ba9830c
DB
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17[m4_warning([this file was generated for autoconf 2.68.
44e1791e
DB
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# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23# Copyright (C) 2001-2003,2004 Red Hat, Inc.
24#
25# This file is free software, distributed under the terms of the GNU
26# General Public License. As a special exception to the GNU General
27# Public License, this file may be distributed as part of a program
28# that contains a configuration script generated by Autoconf, under
29# the same distribution terms as the rest of that program.
30#
31# This file can be copied and used freely without restrictions. It can
32# be used in projects which are not available under the GNU Public License
33# but which still want to provide support for the GNU gettext functionality.
34#
35# Macro to add for using GNU gettext.
36# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37#
38# Modified to never use included libintl.
39# Owen Taylor <otaylor@redhat.com>, 12/15/1998
40#
41# Major rework to remove unused code
42# Owen Taylor <otaylor@redhat.com>, 12/11/2002
43#
44# Added better handling of ALL_LINGUAS from GNU gettext version
45# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46#
47# Modified to require ngettext
48# Matthias Clasen <mclasen@redhat.com> 08/06/2004
49#
50# We need this here as well, since someone might use autoconf-2.5x
51# to configure GLib then an older version to configure a package
52# using AM_GLIB_GNU_GETTEXT
53AC_PREREQ(2.53)
54
55dnl
56dnl We go to great lengths to make sure that aclocal won't
57dnl try to pull in the installed version of these macros
58dnl when running aclocal in the glib directory.
59dnl
60m4_copy([AC_DEFUN],[glib_DEFUN])
61m4_copy([AC_REQUIRE],[glib_REQUIRE])
62dnl
63dnl At the end, if we're not within glib, we'll define the public
64dnl definitions in terms of our private definitions.
65dnl
66
67# GLIB_LC_MESSAGES
68#--------------------
69glib_DEFUN([GLIB_LC_MESSAGES],
70 [AC_CHECK_HEADERS([locale.h])
71 if test $ac_cv_header_locale_h = yes; then
72 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75 if test $am_cv_val_LC_MESSAGES = yes; then
76 AC_DEFINE(HAVE_LC_MESSAGES, 1,
77 [Define if your <locale.h> file defines LC_MESSAGES.])
78 fi
79 fi])
80
81# GLIB_PATH_PROG_WITH_TEST
82#----------------------------
83dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86[# Extract the first word of "$2", so it can be a program name with args.
87set dummy $2; ac_word=[$]2
88AC_MSG_CHECKING([for $ac_word])
89AC_CACHE_VAL(ac_cv_path_$1,
90[case "[$]$1" in
91 /*)
92 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93 ;;
94 *)
95 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96 for ac_dir in ifelse([$5], , $PATH, [$5]); do
97 test -z "$ac_dir" && ac_dir=.
98 if test -f $ac_dir/$ac_word; then
99 if [$3]; then
100 ac_cv_path_$1="$ac_dir/$ac_word"
101 break
102 fi
103 fi
104 done
105 IFS="$ac_save_ifs"
106dnl If no 4th arg is given, leave the cache variable unset,
107dnl so AC_PATH_PROGS will keep looking.
108ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109])dnl
110 ;;
111esac])dnl
112$1="$ac_cv_path_$1"
113if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114 AC_MSG_RESULT([$]$1)
115else
116 AC_MSG_RESULT(no)
117fi
118AC_SUBST($1)dnl
119])
120
121# GLIB_WITH_NLS
122#-----------------
123glib_DEFUN([GLIB_WITH_NLS],
124 dnl NLS is obligatory
125 [USE_NLS=yes
126 AC_SUBST(USE_NLS)
127
128 gt_cv_have_gettext=no
129
130 CATOBJEXT=NONE
131 XGETTEXT=:
132 INTLLIBS=
133
134 AC_CHECK_HEADER(libintl.h,
135 [gt_cv_func_dgettext_libintl="no"
136 libintl_extra_libs=""
137
138 #
139 # First check in libc
140 #
141 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142 [AC_TRY_LINK([
143#include <libintl.h>
144],
145 [return !ngettext ("","", 1)],
146 gt_cv_func_ngettext_libc=yes,
147 gt_cv_func_ngettext_libc=no)
148 ])
149
150 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152 [AC_TRY_LINK([
153#include <libintl.h>
154],
155 [return !dgettext ("","")],
156 gt_cv_func_dgettext_libc=yes,
157 gt_cv_func_dgettext_libc=no)
158 ])
159 fi
160
161 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162 AC_CHECK_FUNCS(bind_textdomain_codeset)
163 fi
164
165 #
166 # If we don't have everything we want, check in libintl
167 #
168 if test "$gt_cv_func_dgettext_libc" != "yes" \
169 || test "$gt_cv_func_ngettext_libc" != "yes" \
170 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171
172 AC_CHECK_LIB(intl, bindtextdomain,
173 [AC_CHECK_LIB(intl, ngettext,
174 [AC_CHECK_LIB(intl, dgettext,
175 gt_cv_func_dgettext_libintl=yes)])])
176
177 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178 AC_MSG_CHECKING([if -liconv is needed to use gettext])
179 AC_MSG_RESULT([])
180 AC_CHECK_LIB(intl, ngettext,
181 [AC_CHECK_LIB(intl, dcgettext,
182 [gt_cv_func_dgettext_libintl=yes
183 libintl_extra_libs=-liconv],
184 :,-liconv)],
185 :,-liconv)
186 fi
187
188 #
189 # If we found libintl, then check in it for bind_textdomain_codeset();
190 # we'll prefer libc if neither have bind_textdomain_codeset(),
191 # and both have dgettext and ngettext
192 #
193 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194 glib_save_LIBS="$LIBS"
195 LIBS="$LIBS -lintl $libintl_extra_libs"
196 unset ac_cv_func_bind_textdomain_codeset
197 AC_CHECK_FUNCS(bind_textdomain_codeset)
198 LIBS="$glib_save_LIBS"
199
200 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201 gt_cv_func_dgettext_libc=no
202 else
203 if test "$gt_cv_func_dgettext_libc" = "yes" \
204 && test "$gt_cv_func_ngettext_libc" = "yes"; then
205 gt_cv_func_dgettext_libintl=no
206 fi
207 fi
208 fi
209 fi
210
211 if test "$gt_cv_func_dgettext_libc" = "yes" \
212 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
213 gt_cv_have_gettext=yes
214 fi
215
216 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217 INTLLIBS="-lintl $libintl_extra_libs"
218 fi
219
220 if test "$gt_cv_have_gettext" = "yes"; then
221 AC_DEFINE(HAVE_GETTEXT,1,
222 [Define if the GNU gettext() function is already present or preinstalled.])
223 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225 if test "$MSGFMT" != "no"; then
226 glib_save_LIBS="$LIBS"
227 LIBS="$LIBS $INTLLIBS"
228 AC_CHECK_FUNCS(dcgettext)
229 MSGFMT_OPTS=
230 AC_MSG_CHECKING([if msgfmt accepts -c])
231 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232msgid ""
233msgstr ""
234"Content-Type: text/plain; charset=UTF-8\n"
235"Project-Id-Version: test 1.0\n"
236"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237"Last-Translator: test <foo@bar.xx>\n"
238"Language-Team: C <LL@li.org>\n"
239"MIME-Version: 1.0\n"
240"Content-Transfer-Encoding: 8bit\n"
241], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242 AC_SUBST(MSGFMT_OPTS)
243 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247 return _nl_msg_cat_cntr],
248 [CATOBJEXT=.gmo
249 DATADIRNAME=share],
250 [case $host in
251 *-*-solaris*)
252 dnl On Solaris, if bind_textdomain_codeset is in libc,
253 dnl GNU format message catalog is always supported,
254 dnl since both are added to the libc all together.
255 dnl Hence, we'd like to go with DATADIRNAME=share and
256 dnl and CATOBJEXT=.gmo in this case.
257 AC_CHECK_FUNC(bind_textdomain_codeset,
258 [CATOBJEXT=.gmo
259 DATADIRNAME=share],
260 [CATOBJEXT=.mo
261 DATADIRNAME=lib])
262 ;;
263 *)
264 CATOBJEXT=.mo
265 DATADIRNAME=lib
266 ;;
267 esac])
268 LIBS="$glib_save_LIBS"
269 INSTOBJEXT=.mo
270 else
271 gt_cv_have_gettext=no
272 fi
273 fi
274 ])
275
276 if test "$gt_cv_have_gettext" = "yes" ; then
277 AC_DEFINE(ENABLE_NLS, 1,
278 [always defined to indicate that i18n is enabled])
279 fi
280
281 dnl Test whether we really found GNU xgettext.
282 if test "$XGETTEXT" != ":"; then
283 dnl If it is not GNU xgettext we define it as : so that the
284 dnl Makefiles still can work.
285 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286 : ;
287 else
288 AC_MSG_RESULT(
289 [found xgettext program is not GNU xgettext; ignore it])
290 XGETTEXT=":"
291 fi
292 fi
293
294 # We need to process the po/ directory.
295 POSUB=po
296
297 AC_OUTPUT_COMMANDS(
298 [case "$CONFIG_FILES" in *po/Makefile.in*)
299 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300 esac])
301
302 dnl These rules are solely for the distribution goal. While doing this
303 dnl we only have to keep exactly one list of the available catalogs
1ba9830c 304 dnl in configure.ac.
44e1791e
DB
305 for lang in $ALL_LINGUAS; do
306 GMOFILES="$GMOFILES $lang.gmo"
307 POFILES="$POFILES $lang.po"
308 done
309
310 dnl Make all variables we use known to autoconf.
311 AC_SUBST(CATALOGS)
312 AC_SUBST(CATOBJEXT)
313 AC_SUBST(DATADIRNAME)
314 AC_SUBST(GMOFILES)
315 AC_SUBST(INSTOBJEXT)
316 AC_SUBST(INTLLIBS)
317 AC_SUBST(PO_IN_DATADIR_TRUE)
318 AC_SUBST(PO_IN_DATADIR_FALSE)
319 AC_SUBST(POFILES)
320 AC_SUBST(POSUB)
321 ])
322
323# AM_GLIB_GNU_GETTEXT
324# -------------------
325# Do checks necessary for use of gettext. If a suitable implementation
326# of gettext is found in either in libintl or in the C library,
327# it will set INTLLIBS to the libraries needed for use of gettext
328# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330# on various variables needed by the Makefile.in.in installed by
331# glib-gettextize.
332dnl
333glib_DEFUN([GLIB_GNU_GETTEXT],
334 [AC_REQUIRE([AC_PROG_CC])dnl
335 AC_REQUIRE([AC_HEADER_STDC])dnl
336
337 GLIB_LC_MESSAGES
338 GLIB_WITH_NLS
339
340 if test "$gt_cv_have_gettext" = "yes"; then
341 if test "x$ALL_LINGUAS" = "x"; then
342 LINGUAS=
343 else
344 AC_MSG_CHECKING(for catalogs to be installed)
345 NEW_LINGUAS=
346 for presentlang in $ALL_LINGUAS; do
347 useit=no
348 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349 desiredlanguages="$LINGUAS"
350 else
351 desiredlanguages="$ALL_LINGUAS"
352 fi
353 for desiredlang in $desiredlanguages; do
354 # Use the presentlang catalog if desiredlang is
355 # a. equal to presentlang, or
356 # b. a variant of presentlang (because in this case,
357 # presentlang can be used as a fallback for messages
358 # which are not translated in the desiredlang catalog).
359 case "$desiredlang" in
360 "$presentlang"*) useit=yes;;
361 esac
362 done
363 if test $useit = yes; then
364 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365 fi
366 done
367 LINGUAS=$NEW_LINGUAS
368 AC_MSG_RESULT($LINGUAS)
369 fi
370
371 dnl Construct list of names of catalog files to be constructed.
372 if test -n "$LINGUAS"; then
373 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
374 fi
375 fi
376
377 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379 dnl Try to locate is.
380 MKINSTALLDIRS=
381 if test -n "$ac_aux_dir"; then
382 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383 fi
384 if test -z "$MKINSTALLDIRS"; then
385 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386 fi
387 AC_SUBST(MKINSTALLDIRS)
388
389 dnl Generate list of files to be processed by xgettext which will
390 dnl be included in po/Makefile.
391 test -d po || mkdir po
392 if test "x$srcdir" != "x."; then
393 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394 posrcprefix="$srcdir/"
395 else
396 posrcprefix="../$srcdir/"
397 fi
398 else
399 posrcprefix="../"
400 fi
401 rm -f po/POTFILES
402 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403 < $srcdir/po/POTFILES.in > po/POTFILES
404 ])
405
406# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407# -------------------------------
408# Define VARIABLE to the location where catalog files will
409# be installed by po/Makefile.
410glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412glib_save_prefix="$prefix"
413glib_save_exec_prefix="$exec_prefix"
414glib_save_datarootdir="$datarootdir"
415test "x$prefix" = xNONE && prefix=$ac_default_prefix
416test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417datarootdir=`eval echo "${datarootdir}"`
418if test "x$CATOBJEXT" = "x.mo" ; then
419 localedir=`eval echo "${libdir}/locale"`
420else
421 localedir=`eval echo "${datadir}/locale"`
422fi
423prefix="$glib_save_prefix"
424exec_prefix="$glib_save_exec_prefix"
425datarootdir="$glib_save_datarootdir"
426AC_DEFINE_UNQUOTED($1, "$localedir",
427 [Define the location where the catalogs will be installed])
428])
429
430dnl
431dnl Now the definitions that aclocal will find
432dnl
1ba9830c 433ifdef(glib_configure_ac,[],[
44e1791e
DB
434AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436])dnl
437
438# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439#
440# Create a temporary file with TEST-FILE as its contents and pass the
441# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
442# 0 and perform ACTION-IF-FAIL for any other exit status.
443AC_DEFUN([GLIB_RUN_PROG],
444[cat >conftest.foo <<_ACEOF
445$2
446_ACEOF
447if AC_RUN_LOG([$1 conftest.foo]); then
448 m4_ifval([$3], [$3], [:])
449m4_ifvaln([$4], [else $4])dnl
450echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452fi])
453
454
455
456dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
457# serial 40 IT_PROG_INTLTOOL
458AC_DEFUN([IT_PROG_INTLTOOL], [
459AC_PREREQ([2.50])dnl
460AC_REQUIRE([AM_NLS])dnl
461
462case "$am__api_version" in
463 1.[01234])
464 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
465 ;;
466 *)
467 ;;
468esac
469
470if test -n "$1"; then
471 AC_MSG_CHECKING([for intltool >= $1])
472
473 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
474 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
475 [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
476 ]
477 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
478 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
479 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
480fi
481
482AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
483AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
484AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
485if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
486 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
487fi
488
489 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 $< [$]@'
490INTLTOOL_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 $< [$]@'
491 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 $< [$]@'
492 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 $< [$]@'
493 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
494 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 $< [$]@'
495 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 $< [$]@'
496 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 $< [$]@'
497INTLTOOL_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 $< [$]@'
498 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 $< [$]@'
499 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 $< [$]@'
500 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
501 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 $< [$]@'
502 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 $< [$]@'
503 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 $< [$]@'
504 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 $< [$]@'
505 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 $< [$]@'
506 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 $< [$]@'
507 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 $< [$]@'
508
c651baf3
DB
509_IT_SUBST(INTLTOOL_DESKTOP_RULE)
510_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
511_IT_SUBST(INTLTOOL_KEYS_RULE)
512_IT_SUBST(INTLTOOL_PROP_RULE)
513_IT_SUBST(INTLTOOL_OAF_RULE)
514_IT_SUBST(INTLTOOL_PONG_RULE)
515_IT_SUBST(INTLTOOL_SERVER_RULE)
516_IT_SUBST(INTLTOOL_SHEET_RULE)
517_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
518_IT_SUBST(INTLTOOL_UI_RULE)
519_IT_SUBST(INTLTOOL_XAM_RULE)
520_IT_SUBST(INTLTOOL_KBD_RULE)
521_IT_SUBST(INTLTOOL_XML_RULE)
522_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
523_IT_SUBST(INTLTOOL_CAVES_RULE)
524_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
525_IT_SUBST(INTLTOOL_THEME_RULE)
526_IT_SUBST(INTLTOOL_SERVICE_RULE)
527_IT_SUBST(INTLTOOL_POLICY_RULE)
44e1791e
DB
528
529# Check the gettext tools to make sure they are GNU
530AC_PATH_PROG(XGETTEXT, xgettext)
531AC_PATH_PROG(MSGMERGE, msgmerge)
532AC_PATH_PROG(MSGFMT, msgfmt)
533AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
534if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
535 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
536fi
537xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
538mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
539mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
540if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
541 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
542fi
543
c651baf3 544AC_PATH_PROG(INTLTOOL_PERL, perl)
44e1791e 545if test -z "$INTLTOOL_PERL"; then
c651baf3 546 AC_MSG_ERROR([perl not found])
44e1791e 547fi
c651baf3
DB
548AC_MSG_CHECKING([for perl >= 5.8.1])
549$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
550if test $? -ne 0; then
551 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
552else
553 IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
554 AC_MSG_RESULT([$IT_PERL_VERSION])
44e1791e
DB
555fi
556if test "x$2" != "xno-xml"; then
557 AC_MSG_CHECKING([for XML::Parser])
558 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
559 AC_MSG_RESULT([ok])
560 else
561 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
562 fi
563fi
564
565# Substitute ALL_LINGUAS so we can use it in po/Makefile
566AC_SUBST(ALL_LINGUAS)
567
568# Set DATADIRNAME correctly if it is not set yet
569# (copied from glib-gettext.m4)
570if test -z "$DATADIRNAME"; then
571 AC_LINK_IFELSE(
572 [AC_LANG_PROGRAM([[]],
573 [[extern int _nl_msg_cat_cntr;
574 return _nl_msg_cat_cntr]])],
575 [DATADIRNAME=share],
576 [case $host in
577 *-*-solaris*)
578 dnl On Solaris, if bind_textdomain_codeset is in libc,
579 dnl GNU format message catalog is always supported,
580 dnl since both are added to the libc all together.
581 dnl Hence, we'd like to go with DATADIRNAME=share
582 dnl in this case.
583 AC_CHECK_FUNC(bind_textdomain_codeset,
584 [DATADIRNAME=share], [DATADIRNAME=lib])
585 ;;
586 *)
587 [DATADIRNAME=lib]
588 ;;
589 esac])
590fi
591AC_SUBST(DATADIRNAME)
592
593IT_PO_SUBDIR([po])
594
595])
596
597
598# IT_PO_SUBDIR(DIRNAME)
599# ---------------------
600# All po subdirs have to be declared with this macro; the subdir "po" is
601# declared by IT_PROG_INTLTOOL.
602#
603AC_DEFUN([IT_PO_SUBDIR],
604[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
605dnl
1ba9830c 606dnl The following CONFIG_COMMANDS should be executed at the very end
44e1791e
DB
607dnl of config.status.
608AC_CONFIG_COMMANDS_PRE([
609 AC_CONFIG_COMMANDS([$1/stamp-it], [
c651baf3 610 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
44e1791e
DB
611 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
612 fi
613 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
614 >"$1/stamp-it.tmp"
615 [sed '/^#/d
616 s/^[[].*] *//
617 /^[ ]*$/d
618 '"s|^| $ac_top_srcdir/|" \
619 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
620 ]
621 [sed '/^POTFILES =/,/[^\\]$/ {
622 /^POTFILES =/!d
623 r $1/POTFILES
624 }
625 ' "$1/Makefile.in" >"$1/Makefile"]
626 rm -f "$1/Makefile.tmp"
627 mv "$1/stamp-it.tmp" "$1/stamp-it"
628 ])
629])dnl
630])
631
c651baf3
DB
632# _IT_SUBST(VARIABLE)
633# -------------------
634# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
635#
636AC_DEFUN([_IT_SUBST],
637[
638AC_SUBST([$1])
639m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
640]
641)
642
44e1791e
DB
643# deprecated macros
644AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
645# A hint is needed for aclocal from Automake <= 1.9.4:
646# AC_DEFUN([AC_PROG_INTLTOOL], ...)
647
648
1ba9830c
DB
649# nls.m4 serial 5 (gettext-0.18)
650dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
651dnl Inc.
44e1791e
DB
652dnl This file is free software; the Free Software Foundation
653dnl gives unlimited permission to copy and/or distribute it,
654dnl with or without modifications, as long as this notice is preserved.
655dnl
656dnl This file can can be used in projects which are not available under
657dnl the GNU General Public License or the GNU Library General Public
658dnl License but which still want to provide support for the GNU gettext
659dnl functionality.
660dnl Please note that the actual code of the GNU gettext library is covered
661dnl by the GNU Library General Public License, and the rest of the GNU
662dnl gettext package package is covered by the GNU General Public License.
663dnl They are *not* in the public domain.
664
665dnl Authors:
666dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
667dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
668
1ba9830c 669AC_PREREQ([2.50])
44e1791e
DB
670
671AC_DEFUN([AM_NLS],
672[
673 AC_MSG_CHECKING([whether NLS is requested])
674 dnl Default is enabled NLS
1ba9830c 675 AC_ARG_ENABLE([nls],
44e1791e
DB
676 [ --disable-nls do not use Native Language Support],
677 USE_NLS=$enableval, USE_NLS=yes)
1ba9830c
DB
678 AC_MSG_RESULT([$USE_NLS])
679 AC_SUBST([USE_NLS])
44e1791e
DB
680])
681
c651baf3 682# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
44e1791e
DB
683#
684# This file is free software; the Free Software Foundation
685# gives unlimited permission to copy and/or distribute it,
686# with or without modifications, as long as this notice is preserved.
687
688# AM_AUTOMAKE_VERSION(VERSION)
689# ----------------------------
690# Automake X.Y traces this macro to ensure aclocal.m4 has been
691# generated from the m4 files accompanying Automake X.Y.
692# (This private macro should not be called outside this file.)
693AC_DEFUN([AM_AUTOMAKE_VERSION],
c651baf3 694[am__api_version='1.11'
44e1791e
DB
695dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
696dnl require some minimum version. Point them to the right macro.
1ba9830c 697m4_if([$1], [1.11.1], [],
44e1791e
DB
698 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
699])
700
701# _AM_AUTOCONF_VERSION(VERSION)
702# -----------------------------
703# aclocal traces this macro to find the Autoconf version.
704# This is a private macro too. Using m4_define simplifies
705# the logic in aclocal, which can simply ignore this definition.
706m4_define([_AM_AUTOCONF_VERSION], [])
707
708# AM_SET_CURRENT_AUTOMAKE_VERSION
709# -------------------------------
710# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
c651baf3 711# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
44e1791e 712AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1ba9830c 713[AM_AUTOMAKE_VERSION([1.11.1])dnl
44e1791e
DB
714m4_ifndef([AC_AUTOCONF_VERSION],
715 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
c651baf3 716_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
44e1791e
DB
717
718# AM_AUX_DIR_EXPAND -*- Autoconf -*-
719
720# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
721#
722# This file is free software; the Free Software Foundation
723# gives unlimited permission to copy and/or distribute it,
724# with or without modifications, as long as this notice is preserved.
725
726# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
727# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
728# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
729#
730# Of course, Automake must honor this variable whenever it calls a
731# tool from the auxiliary directory. The problem is that $srcdir (and
732# therefore $ac_aux_dir as well) can be either absolute or relative,
733# depending on how configure is run. This is pretty annoying, since
734# it makes $ac_aux_dir quite unusable in subdirectories: in the top
735# source directory, any form will work fine, but in subdirectories a
736# relative path needs to be adjusted first.
737#
738# $ac_aux_dir/missing
739# fails when called from a subdirectory if $ac_aux_dir is relative
740# $top_srcdir/$ac_aux_dir/missing
741# fails if $ac_aux_dir is absolute,
742# fails when called from a subdirectory in a VPATH build with
743# a relative $ac_aux_dir
744#
745# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
746# are both prefixed by $srcdir. In an in-source build this is usually
747# harmless because $srcdir is `.', but things will broke when you
748# start a VPATH build or use an absolute $srcdir.
749#
750# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
751# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
752# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
753# and then we would define $MISSING as
754# MISSING="\${SHELL} $am_aux_dir/missing"
755# This will work as long as MISSING is not called from configure, because
756# unfortunately $(top_srcdir) has no meaning in configure.
757# However there are other variables, like CC, which are often used in
758# configure, and could therefore not use this "fixed" $ac_aux_dir.
759#
760# Another solution, used here, is to always expand $ac_aux_dir to an
761# absolute PATH. The drawback is that using absolute paths prevent a
762# configured tree to be moved without reconfiguration.
763
764AC_DEFUN([AM_AUX_DIR_EXPAND],
765[dnl Rely on autoconf to set up CDPATH properly.
766AC_PREREQ([2.50])dnl
767# expand $ac_aux_dir to an absolute path
768am_aux_dir=`cd $ac_aux_dir && pwd`
769])
770
771# AM_CONDITIONAL -*- Autoconf -*-
772
c651baf3 773# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
44e1791e
DB
774# Free Software Foundation, Inc.
775#
776# This file is free software; the Free Software Foundation
777# gives unlimited permission to copy and/or distribute it,
778# with or without modifications, as long as this notice is preserved.
779
c651baf3 780# serial 9
44e1791e
DB
781
782# AM_CONDITIONAL(NAME, SHELL-CONDITION)
783# -------------------------------------
784# Define a conditional.
785AC_DEFUN([AM_CONDITIONAL],
786[AC_PREREQ(2.52)dnl
787 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
788 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
789AC_SUBST([$1_TRUE])dnl
790AC_SUBST([$1_FALSE])dnl
791_AM_SUBST_NOTMAKE([$1_TRUE])dnl
792_AM_SUBST_NOTMAKE([$1_FALSE])dnl
c651baf3 793m4_define([_AM_COND_VALUE_$1], [$2])dnl
44e1791e
DB
794if $2; then
795 $1_TRUE=
796 $1_FALSE='#'
797else
798 $1_TRUE='#'
799 $1_FALSE=
800fi
801AC_CONFIG_COMMANDS_PRE(
802[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
803 AC_MSG_ERROR([[conditional "$1" was never defined.
804Usually this means the macro was only invoked conditionally.]])
805fi])])
806
c651baf3 807# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
44e1791e
DB
808# Free Software Foundation, Inc.
809#
810# This file is free software; the Free Software Foundation
811# gives unlimited permission to copy and/or distribute it,
812# with or without modifications, as long as this notice is preserved.
813
c651baf3 814# serial 10
44e1791e
DB
815
816# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
817# written in clear, in which case automake, when reading aclocal.m4,
818# will think it sees a *use*, and therefore will trigger all it's
819# C support machinery. Also note that it means that autoscan, seeing
820# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
821
822
823# _AM_DEPENDENCIES(NAME)
824# ----------------------
825# See how the compiler implements dependency checking.
826# NAME is "CC", "CXX", "GCJ", or "OBJC".
827# We try a few techniques and use that to set a single cache variable.
828#
829# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
830# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
831# dependency, and given that the user is not expected to run this macro,
832# just rely on AC_PROG_CC.
833AC_DEFUN([_AM_DEPENDENCIES],
834[AC_REQUIRE([AM_SET_DEPDIR])dnl
835AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
836AC_REQUIRE([AM_MAKE_INCLUDE])dnl
837AC_REQUIRE([AM_DEP_TRACK])dnl
838
839ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
840 [$1], CXX, [depcc="$CXX" am_compiler_list=],
841 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
842 [$1], UPC, [depcc="$UPC" am_compiler_list=],
843 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
844 [depcc="$$1" am_compiler_list=])
845
846AC_CACHE_CHECK([dependency style of $depcc],
847 [am_cv_$1_dependencies_compiler_type],
848[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
849 # We make a subdir and do the tests there. Otherwise we can end up
850 # making bogus files that we don't know about and never remove. For
851 # instance it was reported that on HP-UX the gcc test will end up
852 # making a dummy file named `D' -- because `-MD' means `put the output
853 # in D'.
854 mkdir conftest.dir
855 # Copy depcomp to subdir because otherwise we won't find it if we're
856 # using a relative directory.
857 cp "$am_depcomp" conftest.dir
858 cd conftest.dir
859 # We will build objects and dependencies in a subdirectory because
860 # it helps to detect inapplicable dependency modes. For instance
861 # both Tru64's cc and ICC support -MD to output dependencies as a
862 # side effect of compilation, but ICC will put the dependencies in
863 # the current directory while Tru64 will put them in the object
864 # directory.
865 mkdir sub
866
867 am_cv_$1_dependencies_compiler_type=none
868 if test "$am_compiler_list" = ""; then
869 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
870 fi
c651baf3
DB
871 am__universal=false
872 m4_case([$1], [CC],
873 [case " $depcc " in #(
874 *\ -arch\ *\ -arch\ *) am__universal=true ;;
875 esac],
876 [CXX],
877 [case " $depcc " in #(
878 *\ -arch\ *\ -arch\ *) am__universal=true ;;
879 esac])
880
44e1791e
DB
881 for depmode in $am_compiler_list; do
882 # Setup a source with many dependencies, because some compilers
883 # like to wrap large dependency lists on column 80 (with \), and
884 # we should not choose a depcomp mode which is confused by this.
885 #
886 # We need to recreate these files for each test, as the compiler may
887 # overwrite some of them when testing with obscure command lines.
888 # This happens at least with the AIX C compiler.
889 : > sub/conftest.c
890 for i in 1 2 3 4 5 6; do
891 echo '#include "conftst'$i'.h"' >> sub/conftest.c
892 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
893 # Solaris 8's {/usr,}/bin/sh.
894 touch sub/conftst$i.h
895 done
896 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
897
c651baf3
DB
898 # We check with `-c' and `-o' for the sake of the "dashmstdout"
899 # mode. It turns out that the SunPro C++ compiler does not properly
900 # handle `-M -o', and we need to detect this. Also, some Intel
901 # versions had trouble with output in subdirs
902 am__obj=sub/conftest.${OBJEXT-o}
903 am__minus_obj="-o $am__obj"
44e1791e 904 case $depmode in
c651baf3
DB
905 gcc)
906 # This depmode causes a compiler race in universal mode.
907 test "$am__universal" = false || continue
908 ;;
44e1791e
DB
909 nosideeffect)
910 # after this tag, mechanisms are not by side-effect, so they'll
911 # only be used when explicitly requested
912 if test "x$enable_dependency_tracking" = xyes; then
913 continue
914 else
915 break
916 fi
917 ;;
c651baf3
DB
918 msvisualcpp | msvcmsys)
919 # This compiler won't grok `-c -o', but also, the minuso test has
920 # not run yet. These depmodes are late enough in the game, and
921 # so weak that their functioning should not be impacted.
922 am__obj=conftest.${OBJEXT-o}
923 am__minus_obj=
924 ;;
44e1791e
DB
925 none) break ;;
926 esac
44e1791e 927 if depmode=$depmode \
c651baf3 928 source=sub/conftest.c object=$am__obj \
44e1791e 929 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
c651baf3 930 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
44e1791e
DB
931 >/dev/null 2>conftest.err &&
932 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
933 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
c651baf3 934 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
44e1791e
DB
935 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
936 # icc doesn't choke on unknown options, it will just issue warnings
937 # or remarks (even with -Werror). So we grep stderr for any message
938 # that says an option was ignored or not supported.
939 # When given -MP, icc 7.0 and 7.1 complain thusly:
940 # icc: Command line warning: ignoring option '-M'; no argument required
941 # The diagnosis changed in icc 8.0:
942 # icc: Command line remark: option '-MP' not supported
943 if (grep 'ignoring option' conftest.err ||
944 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
945 am_cv_$1_dependencies_compiler_type=$depmode
946 break
947 fi
948 fi
949 done
950
951 cd ..
952 rm -rf conftest.dir
953else
954 am_cv_$1_dependencies_compiler_type=none
955fi
956])
957AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
958AM_CONDITIONAL([am__fastdep$1], [
959 test "x$enable_dependency_tracking" != xno \
960 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
961])
962
963
964# AM_SET_DEPDIR
965# -------------
966# Choose a directory name for dependency files.
967# This macro is AC_REQUIREd in _AM_DEPENDENCIES
968AC_DEFUN([AM_SET_DEPDIR],
969[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
970AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
971])
972
973
974# AM_DEP_TRACK
975# ------------
976AC_DEFUN([AM_DEP_TRACK],
977[AC_ARG_ENABLE(dependency-tracking,
978[ --disable-dependency-tracking speeds up one-time build
979 --enable-dependency-tracking do not reject slow dependency extractors])
980if test "x$enable_dependency_tracking" != xno; then
981 am_depcomp="$ac_aux_dir/depcomp"
982 AMDEPBACKSLASH='\'
983fi
984AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
985AC_SUBST([AMDEPBACKSLASH])dnl
986_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
987])
988
989# Generate code to set up dependency tracking. -*- Autoconf -*-
990
c651baf3 991# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
44e1791e
DB
992# Free Software Foundation, Inc.
993#
994# This file is free software; the Free Software Foundation
995# gives unlimited permission to copy and/or distribute it,
996# with or without modifications, as long as this notice is preserved.
997
c651baf3 998#serial 5
44e1791e
DB
999
1000# _AM_OUTPUT_DEPENDENCY_COMMANDS
1001# ------------------------------
1002AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
c651baf3
DB
1003[{
1004 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1005 # are listed without --file. Let's play safe and only enable the eval
1006 # if we detect the quoting.
1007 case $CONFIG_FILES in
1008 *\'*) eval set x "$CONFIG_FILES" ;;
1009 *) set x $CONFIG_FILES ;;
1010 esac
1011 shift
1012 for mf
1013 do
1014 # Strip MF so we end up with the name of the file.
1015 mf=`echo "$mf" | sed -e 's/:.*$//'`
1016 # Check whether this is an Automake generated Makefile or not.
1017 # We used to match only the files named `Makefile.in', but
1018 # some people rename them; so instead we look at the file content.
1019 # Grep'ing the first line is not enough: some people post-process
1020 # each Makefile.in and add a new line on top of each file to say so.
1021 # Grep'ing the whole file is not good either: AIX grep has a line
1022 # limit of 2048, but all sed's we know have understand at least 4000.
1023 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1024 dirpart=`AS_DIRNAME("$mf")`
1025 else
1026 continue
1027 fi
1028 # Extract the definition of DEPDIR, am__include, and am__quote
1029 # from the Makefile without running `make'.
1030 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1031 test -z "$DEPDIR" && continue
1032 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1033 test -z "am__include" && continue
1034 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1035 # When using ansi2knr, U may be empty or an underscore; expand it
1036 U=`sed -n 's/^U = //p' < "$mf"`
1037 # Find all dependency output files, they are included files with
1038 # $(DEPDIR) in their names. We invoke sed twice because it is the
1039 # simplest approach to changing $(DEPDIR) to its actual value in the
1040 # expansion.
1041 for file in `sed -n "
1042 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1043 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1044 # Make sure the directory exists.
1045 test -f "$dirpart/$file" && continue
1046 fdir=`AS_DIRNAME(["$file"])`
1047 AS_MKDIR_P([$dirpart/$fdir])
1048 # echo "creating $dirpart/$file"
1049 echo '# dummy' > "$dirpart/$file"
1050 done
44e1791e 1051 done
c651baf3 1052}
44e1791e
DB
1053])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1054
1055
1056# AM_OUTPUT_DEPENDENCY_COMMANDS
1057# -----------------------------
1058# This macro should only be invoked once -- use via AC_REQUIRE.
1059#
1060# This code is only required when automatic dependency tracking
1061# is enabled. FIXME. This creates each `.P' file that we will
1062# need in order to bootstrap the dependency handling code.
1063AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1064[AC_CONFIG_COMMANDS([depfiles],
1065 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1066 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1067])
1068
1069# Do all the work for Automake. -*- Autoconf -*-
1070
1071# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
c651baf3 1072# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
44e1791e
DB
1073#
1074# This file is free software; the Free Software Foundation
1075# gives unlimited permission to copy and/or distribute it,
1076# with or without modifications, as long as this notice is preserved.
1077
c651baf3 1078# serial 16
44e1791e
DB
1079
1080# This macro actually does too much. Some checks are only needed if
1081# your package does certain things. But this isn't really a big deal.
1082
1083# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1084# AM_INIT_AUTOMAKE([OPTIONS])
1085# -----------------------------------------------
1086# The call with PACKAGE and VERSION arguments is the old style
1087# call (pre autoconf-2.50), which is being phased out. PACKAGE
1088# and VERSION should now be passed to AC_INIT and removed from
1089# the call to AM_INIT_AUTOMAKE.
1090# We support both call styles for the transition. After
1091# the next Automake release, Autoconf can make the AC_INIT
1092# arguments mandatory, and then we can depend on a new Autoconf
1093# release and drop the old call support.
1094AC_DEFUN([AM_INIT_AUTOMAKE],
c651baf3 1095[AC_PREREQ([2.62])dnl
44e1791e
DB
1096dnl Autoconf wants to disallow AM_ names. We explicitly allow
1097dnl the ones we care about.
1098m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1099AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1100AC_REQUIRE([AC_PROG_INSTALL])dnl
1101if test "`cd $srcdir && pwd`" != "`pwd`"; then
1102 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1103 # is not polluted with repeated "-I."
1104 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1105 # test to see if srcdir already configured
1106 if test -f $srcdir/config.status; then
1107 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1108 fi
1109fi
1110
1111# test whether we have cygpath
1112if test -z "$CYGPATH_W"; then
1113 if (cygpath --version) >/dev/null 2>/dev/null; then
1114 CYGPATH_W='cygpath -w'
1115 else
1116 CYGPATH_W=echo
1117 fi
1118fi
1119AC_SUBST([CYGPATH_W])
1120
1121# Define the identity of the package.
1122dnl Distinguish between old-style and new-style calls.
1123m4_ifval([$2],
1124[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1125 AC_SUBST([PACKAGE], [$1])dnl
1126 AC_SUBST([VERSION], [$2])],
1127[_AM_SET_OPTIONS([$1])dnl
1128dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1129m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1130 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1131 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1132 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1133
1134_AM_IF_OPTION([no-define],,
1135[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1136 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1137
1138# Some tools Automake needs.
1139AC_REQUIRE([AM_SANITY_CHECK])dnl
1140AC_REQUIRE([AC_ARG_PROGRAM])dnl
1141AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1142AM_MISSING_PROG(AUTOCONF, autoconf)
1143AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1144AM_MISSING_PROG(AUTOHEADER, autoheader)
1145AM_MISSING_PROG(MAKEINFO, makeinfo)
c651baf3
DB
1146AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1147AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
44e1791e
DB
1148AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1149# We need awk for the "check" target. The system "awk" is bad on
1150# some platforms.
1151AC_REQUIRE([AC_PROG_AWK])dnl
1152AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1153AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1154_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
c651baf3
DB
1155 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1156 [_AM_PROG_TAR([v7])])])
44e1791e
DB
1157_AM_IF_OPTION([no-dependencies],,
1158[AC_PROVIDE_IFELSE([AC_PROG_CC],
c651baf3
DB
1159 [_AM_DEPENDENCIES(CC)],
1160 [define([AC_PROG_CC],
1161 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
44e1791e 1162AC_PROVIDE_IFELSE([AC_PROG_CXX],
c651baf3
DB
1163 [_AM_DEPENDENCIES(CXX)],
1164 [define([AC_PROG_CXX],
1165 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
44e1791e 1166AC_PROVIDE_IFELSE([AC_PROG_OBJC],
c651baf3
DB
1167 [_AM_DEPENDENCIES(OBJC)],
1168 [define([AC_PROG_OBJC],
1169 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
44e1791e 1170])
c651baf3
DB
1171_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1172dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1173dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1174dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1175AC_CONFIG_COMMANDS_PRE(dnl
1176[m4_provide_if([_AM_COMPILER_EXEEXT],
1177 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
44e1791e
DB
1178])
1179
c651baf3
DB
1180dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1181dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1182dnl mangled by Autoconf and run in a shell conditional statement.
1183m4_define([_AC_COMPILER_EXEEXT],
1184m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1185
44e1791e
DB
1186
1187# When config.status generates a header, we must update the stamp-h file.
1188# This file resides in the same directory as the config header
1189# that is generated. The stamp files are numbered to have different names.
1190
1191# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1192# loop where config.status creates the headers, so we can generate
1193# our stamp files there.
1194AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1195[# Compute $1's index in $config_headers.
1196_am_arg=$1
1197_am_stamp_count=1
1198for _am_header in $config_headers :; do
1199 case $_am_header in
1200 $_am_arg | $_am_arg:* )
1201 break ;;
1202 * )
1203 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1204 esac
1205done
1206echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1207
c651baf3 1208# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
44e1791e
DB
1209#
1210# This file is free software; the Free Software Foundation
1211# gives unlimited permission to copy and/or distribute it,
1212# with or without modifications, as long as this notice is preserved.
1213
1214# AM_PROG_INSTALL_SH
1215# ------------------
1216# Define $install_sh.
1217AC_DEFUN([AM_PROG_INSTALL_SH],
1218[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
c651baf3
DB
1219if test x"${install_sh}" != xset; then
1220 case $am_aux_dir in
1221 *\ * | *\ *)
1222 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1223 *)
1224 install_sh="\${SHELL} $am_aux_dir/install-sh"
1225 esac
1226fi
44e1791e
DB
1227AC_SUBST(install_sh)])
1228
1229# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1230#
1231# This file is free software; the Free Software Foundation
1232# gives unlimited permission to copy and/or distribute it,
1233# with or without modifications, as long as this notice is preserved.
1234
1235# serial 2
1236
1237# Check whether the underlying file-system supports filenames
1238# with a leading dot. For instance MS-DOS doesn't.
1239AC_DEFUN([AM_SET_LEADING_DOT],
1240[rm -rf .tst 2>/dev/null
1241mkdir .tst 2>/dev/null
1242if test -d .tst; then
1243 am__leading_dot=.
1244else
1245 am__leading_dot=_
1246fi
1247rmdir .tst 2>/dev/null
1248AC_SUBST([am__leading_dot])])
1249
1250# Check to see how 'make' treats includes. -*- Autoconf -*-
1251
c651baf3 1252# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
44e1791e
DB
1253#
1254# This file is free software; the Free Software Foundation
1255# gives unlimited permission to copy and/or distribute it,
1256# with or without modifications, as long as this notice is preserved.
1257
c651baf3 1258# serial 4
44e1791e
DB
1259
1260# AM_MAKE_INCLUDE()
1261# -----------------
1262# Check to see how make treats includes.
1263AC_DEFUN([AM_MAKE_INCLUDE],
1264[am_make=${MAKE-make}
1265cat > confinc << 'END'
1266am__doit:
c651baf3 1267 @echo this is the am__doit target
44e1791e
DB
1268.PHONY: am__doit
1269END
1270# If we don't find an include directive, just comment out the code.
1271AC_MSG_CHECKING([for style of include used by $am_make])
1272am__include="#"
1273am__quote=
1274_am_result=none
1275# First try GNU make style include.
1276echo "include confinc" > confmf
c651baf3
DB
1277# Ignore all kinds of additional output from `make'.
1278case `$am_make -s -f confmf 2> /dev/null` in #(
1279*the\ am__doit\ target*)
1280 am__include=include
1281 am__quote=
1282 _am_result=GNU
1283 ;;
1284esac
44e1791e
DB
1285# Now try BSD make style include.
1286if test "$am__include" = "#"; then
1287 echo '.include "confinc"' > confmf
c651baf3
DB
1288 case `$am_make -s -f confmf 2> /dev/null` in #(
1289 *the\ am__doit\ target*)
1290 am__include=.include
1291 am__quote="\""
1292 _am_result=BSD
1293 ;;
1294 esac
44e1791e
DB
1295fi
1296AC_SUBST([am__include])
1297AC_SUBST([am__quote])
1298AC_MSG_RESULT([$_am_result])
1299rm -f confinc confmf
1300])
1301
1302# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1303
c651baf3 1304# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
44e1791e
DB
1305# Free Software Foundation, Inc.
1306#
1307# This file is free software; the Free Software Foundation
1308# gives unlimited permission to copy and/or distribute it,
1309# with or without modifications, as long as this notice is preserved.
1310
c651baf3 1311# serial 6
44e1791e
DB
1312
1313# AM_MISSING_PROG(NAME, PROGRAM)
1314# ------------------------------
1315AC_DEFUN([AM_MISSING_PROG],
1316[AC_REQUIRE([AM_MISSING_HAS_RUN])
1317$1=${$1-"${am_missing_run}$2"}
1318AC_SUBST($1)])
1319
1320
1321# AM_MISSING_HAS_RUN
1322# ------------------
1323# Define MISSING if not defined so far and test if it supports --run.
1324# If it does, set am_missing_run to use it, otherwise, to nothing.
1325AC_DEFUN([AM_MISSING_HAS_RUN],
1326[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1327AC_REQUIRE_AUX_FILE([missing])dnl
c651baf3
DB
1328if test x"${MISSING+set}" != xset; then
1329 case $am_aux_dir in
1330 *\ * | *\ *)
1331 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1332 *)
1333 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1334 esac
1335fi
44e1791e
DB
1336# Use eval to expand $SHELL
1337if eval "$MISSING --run true"; then
1338 am_missing_run="$MISSING --run "
1339else
1340 am_missing_run=
1341 AC_MSG_WARN([`missing' script is too old or missing])
1342fi
1343])
1344
1345# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1346#
1347# This file is free software; the Free Software Foundation
1348# gives unlimited permission to copy and/or distribute it,
1349# with or without modifications, as long as this notice is preserved.
1350
1351# AM_PROG_MKDIR_P
1352# ---------------
1353# Check for `mkdir -p'.
1354AC_DEFUN([AM_PROG_MKDIR_P],
1355[AC_PREREQ([2.60])dnl
1356AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1357dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1358dnl while keeping a definition of mkdir_p for backward compatibility.
1359dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1360dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1361dnl Makefile.ins that do not define MKDIR_P, so we do our own
1362dnl adjustment using top_builddir (which is defined more often than
1363dnl MKDIR_P).
1364AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1365case $mkdir_p in
1366 [[\\/$]]* | ?:[[\\/]]*) ;;
1367 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1368esac
1369])
1370
1371# Helper functions for option handling. -*- Autoconf -*-
1372
c651baf3 1373# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
44e1791e
DB
1374#
1375# This file is free software; the Free Software Foundation
1376# gives unlimited permission to copy and/or distribute it,
1377# with or without modifications, as long as this notice is preserved.
1378
c651baf3 1379# serial 4
44e1791e
DB
1380
1381# _AM_MANGLE_OPTION(NAME)
1382# -----------------------
1383AC_DEFUN([_AM_MANGLE_OPTION],
1384[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1385
1386# _AM_SET_OPTION(NAME)
1387# ------------------------------
1388# Set option NAME. Presently that only means defining a flag for this option.
1389AC_DEFUN([_AM_SET_OPTION],
1390[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1391
1392# _AM_SET_OPTIONS(OPTIONS)
1393# ----------------------------------
1394# OPTIONS is a space-separated list of Automake options.
1395AC_DEFUN([_AM_SET_OPTIONS],
c651baf3 1396[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
44e1791e
DB
1397
1398# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1399# -------------------------------------------
1400# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1401AC_DEFUN([_AM_IF_OPTION],
1402[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1403
1404# Check to make sure that the build environment is sane. -*- Autoconf -*-
1405
c651baf3 1406# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
44e1791e
DB
1407# Free Software Foundation, Inc.
1408#
1409# This file is free software; the Free Software Foundation
1410# gives unlimited permission to copy and/or distribute it,
1411# with or without modifications, as long as this notice is preserved.
1412
c651baf3 1413# serial 5
44e1791e
DB
1414
1415# AM_SANITY_CHECK
1416# ---------------
1417AC_DEFUN([AM_SANITY_CHECK],
1418[AC_MSG_CHECKING([whether build environment is sane])
1419# Just in case
1420sleep 1
1421echo timestamp > conftest.file
c651baf3
DB
1422# Reject unsafe characters in $srcdir or the absolute working directory
1423# name. Accept space and tab only in the latter.
1424am_lf='
1425'
1426case `pwd` in
1427 *[[\\\"\#\$\&\'\`$am_lf]]*)
1428 AC_MSG_ERROR([unsafe absolute working directory name]);;
1429esac
1430case $srcdir in
1431 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1432 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1433esac
1434
44e1791e
DB
1435# Do `set' in a subshell so we don't clobber the current shell's
1436# arguments. Must try -L first in case configure is actually a
1437# symlink; some systems play weird games with the mod time of symlinks
1438# (eg FreeBSD returns the mod time of the symlink's containing
1439# directory).
1440if (
c651baf3 1441 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
44e1791e
DB
1442 if test "$[*]" = "X"; then
1443 # -L didn't work.
c651baf3 1444 set X `ls -t "$srcdir/configure" conftest.file`
44e1791e
DB
1445 fi
1446 rm -f conftest.file
1447 if test "$[*]" != "X $srcdir/configure conftest.file" \
1448 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1449
1450 # If neither matched, then we have a broken ls. This can happen
1451 # if, for instance, CONFIG_SHELL is bash and it inherits a
1452 # broken ls alias from the environment. This has actually
1453 # happened. Such a system could not be considered "sane".
1454 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1455alias in your environment])
1456 fi
1457
1458 test "$[2]" = conftest.file
1459 )
1460then
1461 # Ok.
1462 :
1463else
1464 AC_MSG_ERROR([newly created file is older than distributed files!
1465Check your system clock])
1466fi
1467AC_MSG_RESULT(yes)])
1468
1469# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1470#
1471# This file is free software; the Free Software Foundation
1472# gives unlimited permission to copy and/or distribute it,
1473# with or without modifications, as long as this notice is preserved.
1474
1475# AM_PROG_INSTALL_STRIP
1476# ---------------------
1477# One issue with vendor `install' (even GNU) is that you can't
1478# specify the program used to strip binaries. This is especially
1479# annoying in cross-compiling environments, where the build's strip
1480# is unlikely to handle the host's binaries.
1481# Fortunately install-sh will honor a STRIPPROG variable, so we
1482# always use install-sh in `make install-strip', and initialize
1483# STRIPPROG with the value of the STRIP variable (set by the user).
1484AC_DEFUN([AM_PROG_INSTALL_STRIP],
1485[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1486# Installed binaries are usually stripped using `strip' when the user
1487# run `make install-strip'. However `strip' might not be the right
1488# tool to use in cross-compilation environments, therefore Automake
1489# will honor the `STRIP' environment variable to overrule this program.
1490dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1491if test "$cross_compiling" != no; then
1492 AC_CHECK_TOOL([STRIP], [strip], :)
1493fi
1494INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1495AC_SUBST([INSTALL_STRIP_PROGRAM])])
1496
c651baf3 1497# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
44e1791e
DB
1498#
1499# This file is free software; the Free Software Foundation
1500# gives unlimited permission to copy and/or distribute it,
1501# with or without modifications, as long as this notice is preserved.
1502
c651baf3
DB
1503# serial 2
1504
44e1791e
DB
1505# _AM_SUBST_NOTMAKE(VARIABLE)
1506# ---------------------------
1507# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1508# This macro is traced by Automake.
1509AC_DEFUN([_AM_SUBST_NOTMAKE])
1510
c651baf3
DB
1511# AM_SUBST_NOTMAKE(VARIABLE)
1512# ---------------------------
1513# Public sister of _AM_SUBST_NOTMAKE.
1514AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1515
44e1791e
DB
1516# Check how to create a tarball. -*- Autoconf -*-
1517
1518# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1519#
1520# This file is free software; the Free Software Foundation
1521# gives unlimited permission to copy and/or distribute it,
1522# with or without modifications, as long as this notice is preserved.
1523
1524# serial 2
1525
1526# _AM_PROG_TAR(FORMAT)
1527# --------------------
1528# Check how to create a tarball in format FORMAT.
1529# FORMAT should be one of `v7', `ustar', or `pax'.
1530#
1531# Substitute a variable $(am__tar) that is a command
1532# writing to stdout a FORMAT-tarball containing the directory
1533# $tardir.
1534# tardir=directory && $(am__tar) > result.tar
1535#
1536# Substitute a variable $(am__untar) that extract such
1537# a tarball read from stdin.
1538# $(am__untar) < result.tar
1539AC_DEFUN([_AM_PROG_TAR],
1540[# Always define AMTAR for backward compatibility.
1541AM_MISSING_PROG([AMTAR], [tar])
1542m4_if([$1], [v7],
1543 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1544 [m4_case([$1], [ustar],, [pax],,
1545 [m4_fatal([Unknown tar format])])
1546AC_MSG_CHECKING([how to create a $1 tar archive])
1547# Loop over all known methods to create a tar archive until one works.
1548_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1549_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1550# Do not fold the above two line into one, because Tru64 sh and
1551# Solaris sh will not grok spaces in the rhs of `-'.
1552for _am_tool in $_am_tools
1553do
1554 case $_am_tool in
1555 gnutar)
1556 for _am_tar in tar gnutar gtar;
1557 do
1558 AM_RUN_LOG([$_am_tar --version]) && break
1559 done
1560 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1561 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1562 am__untar="$_am_tar -xf -"
1563 ;;
1564 plaintar)
1565 # Must skip GNU tar: if it does not support --format= it doesn't create
1566 # ustar tarball either.
1567 (tar --version) >/dev/null 2>&1 && continue
1568 am__tar='tar chf - "$$tardir"'
1569 am__tar_='tar chf - "$tardir"'
1570 am__untar='tar xf -'
1571 ;;
1572 pax)
1573 am__tar='pax -L -x $1 -w "$$tardir"'
1574 am__tar_='pax -L -x $1 -w "$tardir"'
1575 am__untar='pax -r'
1576 ;;
1577 cpio)
1578 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1579 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1580 am__untar='cpio -i -H $1 -d'
1581 ;;
1582 none)
1583 am__tar=false
1584 am__tar_=false
1585 am__untar=false
1586 ;;
1587 esac
1588
1589 # If the value was cached, stop now. We just wanted to have am__tar
1590 # and am__untar set.
1591 test -n "${am_cv_prog_tar_$1}" && break
1592
1593 # tar/untar a dummy directory, and stop if the command works
1594 rm -rf conftest.dir
1595 mkdir conftest.dir
1596 echo GrepMe > conftest.dir/file
1597 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1598 rm -rf conftest.dir
1599 if test -s conftest.tar; then
1600 AM_RUN_LOG([$am__untar <conftest.tar])
1601 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1602 fi
1603done
1604rm -rf conftest.dir
1605
1606AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1607AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1608AC_SUBST([am__tar])
1609AC_SUBST([am__untar])
1610]) # _AM_PROG_TAR
1611