Adding debian version 0.4.0-1.
[debian/lxappearance.git] / aclocal.m4
CommitLineData
eddc0c49 1# generated automatically by aclocal 1.11 -*- Autoconf -*-
08024023
DB
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
eddc0c49 4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
08024023
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
eddc0c49
DB
14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
c93a68c7
DB
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17[m4_warning([this file was generated for autoconf 2.65.
eddc0c49
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'.])])
08024023
DB
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
eddc0c49 125 [USE_NLS=yes
08024023
DB
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
304 dnl in configure.in.
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
433ifdef(glib_configure_in,[],[
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
8df2f63a
DB
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
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)
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
544AC_PATH_PROG(INTLTOOL_PERL, perl)
545if test -z "$INTLTOOL_PERL"; then
546 AC_MSG_ERROR([perl not found])
547fi
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])
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
606dnl The following CONFIG_COMMANDS should be exetuted at the very end
607dnl of config.status.
608AC_CONFIG_COMMANDS_PRE([
609 AC_CONFIG_COMMANDS([$1/stamp-it], [
610 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
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
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
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
649# nls.m4 serial 3 (gettext-0.15)
650dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
651dnl This file is free software; the Free Software Foundation
652dnl gives unlimited permission to copy and/or distribute it,
653dnl with or without modifications, as long as this notice is preserved.
654dnl
655dnl This file can can be used in projects which are not available under
656dnl the GNU General Public License or the GNU Library General Public
657dnl License but which still want to provide support for the GNU gettext
658dnl functionality.
659dnl Please note that the actual code of the GNU gettext library is covered
660dnl by the GNU Library General Public License, and the rest of the GNU
661dnl gettext package package is covered by the GNU General Public License.
662dnl They are *not* in the public domain.
663
664dnl Authors:
665dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
666dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
667
668AC_PREREQ(2.50)
669
670AC_DEFUN([AM_NLS],
671[
672 AC_MSG_CHECKING([whether NLS is requested])
673 dnl Default is enabled NLS
674 AC_ARG_ENABLE(nls,
675 [ --disable-nls do not use Native Language Support],
676 USE_NLS=$enableval, USE_NLS=yes)
677 AC_MSG_RESULT($USE_NLS)
678 AC_SUBST(USE_NLS)
679])
680
08024023
DB
681# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
682#
683# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
684#
685# This program is free software; you can redistribute it and/or modify
686# it under the terms of the GNU General Public License as published by
687# the Free Software Foundation; either version 2 of the License, or
688# (at your option) any later version.
689#
690# This program is distributed in the hope that it will be useful, but
691# WITHOUT ANY WARRANTY; without even the implied warranty of
692# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
693# General Public License for more details.
694#
695# You should have received a copy of the GNU General Public License
696# along with this program; if not, write to the Free Software
697# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
698#
699# As a special exception to the GNU General Public License, if you
700# distribute this file as part of a program that contains a
701# configuration script generated by Autoconf, you may include it under
702# the same distribution terms that you use for the rest of that program.
703
704# PKG_PROG_PKG_CONFIG([MIN-VERSION])
705# ----------------------------------
706AC_DEFUN([PKG_PROG_PKG_CONFIG],
707[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
708m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
709AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
710if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
711 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
712fi
713if test -n "$PKG_CONFIG"; then
714 _pkg_min_version=m4_default([$1], [0.9.0])
715 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
716 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
717 AC_MSG_RESULT([yes])
718 else
719 AC_MSG_RESULT([no])
720 PKG_CONFIG=""
721 fi
722
723fi[]dnl
724])# PKG_PROG_PKG_CONFIG
725
726# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
727#
728# Check to see whether a particular set of modules exists. Similar
729# to PKG_CHECK_MODULES(), but does not set variables or print errors.
730#
731#
732# Similar to PKG_CHECK_MODULES, make sure that the first instance of
733# this or PKG_CHECK_MODULES is called, or make sure to call
734# PKG_CHECK_EXISTS manually
735# --------------------------------------------------------------
736AC_DEFUN([PKG_CHECK_EXISTS],
737[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
738if test -n "$PKG_CONFIG" && \
739 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
740 m4_ifval([$2], [$2], [:])
741m4_ifvaln([$3], [else
742 $3])dnl
743fi])
744
745
746# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
747# ---------------------------------------------
748m4_define([_PKG_CONFIG],
8df2f63a
DB
749[if test -n "$PKG_CONFIG"; then
750 if test -n "$$1"; then
751 pkg_cv_[]$1="$$1"
752 else
753 PKG_CHECK_EXISTS([$3],
754 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
755 [pkg_failed=yes])
756 fi
757else
758 pkg_failed=untried
08024023
DB
759fi[]dnl
760])# _PKG_CONFIG
761
762# _PKG_SHORT_ERRORS_SUPPORTED
763# -----------------------------
764AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
765[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
766if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
767 _pkg_short_errors_supported=yes
768else
769 _pkg_short_errors_supported=no
770fi[]dnl
771])# _PKG_SHORT_ERRORS_SUPPORTED
772
773
774# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
775# [ACTION-IF-NOT-FOUND])
776#
777#
778# Note that if there is a possibility the first call to
779# PKG_CHECK_MODULES might not happen, you should be sure to include an
780# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
781#
782#
783# --------------------------------------------------------------
784AC_DEFUN([PKG_CHECK_MODULES],
785[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
786AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
787AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
788
789pkg_failed=no
790AC_MSG_CHECKING([for $1])
791
792_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
793_PKG_CONFIG([$1][_LIBS], [libs], [$2])
794
795m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
796and $1[]_LIBS to avoid the need to call pkg-config.
797See the pkg-config man page for more details.])
798
799if test $pkg_failed = yes; then
800 _PKG_SHORT_ERRORS_SUPPORTED
801 if test $_pkg_short_errors_supported = yes; then
8df2f63a 802 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
08024023 803 else
8df2f63a 804 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
08024023
DB
805 fi
806 # Put the nasty error message in config.log where it belongs
807 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
808
809 ifelse([$4], , [AC_MSG_ERROR(dnl
810[Package requirements ($2) were not met:
811
812$$1_PKG_ERRORS
813
814Consider adjusting the PKG_CONFIG_PATH environment variable if you
815installed software in a non-standard prefix.
816
817_PKG_TEXT
818])],
819 [AC_MSG_RESULT([no])
820 $4])
821elif test $pkg_failed = untried; then
822 ifelse([$4], , [AC_MSG_FAILURE(dnl
823[The pkg-config script could not be found or is too old. Make sure it
824is in your PATH or set the PKG_CONFIG environment variable to the full
825path to pkg-config.
826
827_PKG_TEXT
828
829To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
830 [$4])
831else
832 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
833 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
834 AC_MSG_RESULT([yes])
835 ifelse([$3], , :, [$3])
836fi[]dnl
837])# PKG_CHECK_MODULES
838
eddc0c49 839# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
08024023
DB
840#
841# This file is free software; the Free Software Foundation
842# gives unlimited permission to copy and/or distribute it,
843# with or without modifications, as long as this notice is preserved.
844
845# AM_AUTOMAKE_VERSION(VERSION)
846# ----------------------------
847# Automake X.Y traces this macro to ensure aclocal.m4 has been
848# generated from the m4 files accompanying Automake X.Y.
849# (This private macro should not be called outside this file.)
850AC_DEFUN([AM_AUTOMAKE_VERSION],
eddc0c49 851[am__api_version='1.11'
08024023
DB
852dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
853dnl require some minimum version. Point them to the right macro.
eddc0c49 854m4_if([$1], [1.11], [],
08024023
DB
855 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
856])
857
858# _AM_AUTOCONF_VERSION(VERSION)
859# -----------------------------
860# aclocal traces this macro to find the Autoconf version.
861# This is a private macro too. Using m4_define simplifies
862# the logic in aclocal, which can simply ignore this definition.
863m4_define([_AM_AUTOCONF_VERSION], [])
864
865# AM_SET_CURRENT_AUTOMAKE_VERSION
866# -------------------------------
867# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
eddc0c49 868# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
08024023 869AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
eddc0c49
DB
870[AM_AUTOMAKE_VERSION([1.11])dnl
871m4_ifndef([AC_AUTOCONF_VERSION],
872 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
873_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
08024023
DB
874
875# AM_AUX_DIR_EXPAND -*- Autoconf -*-
876
877# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
878#
879# This file is free software; the Free Software Foundation
880# gives unlimited permission to copy and/or distribute it,
881# with or without modifications, as long as this notice is preserved.
882
883# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
884# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
885# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
886#
887# Of course, Automake must honor this variable whenever it calls a
888# tool from the auxiliary directory. The problem is that $srcdir (and
889# therefore $ac_aux_dir as well) can be either absolute or relative,
890# depending on how configure is run. This is pretty annoying, since
891# it makes $ac_aux_dir quite unusable in subdirectories: in the top
892# source directory, any form will work fine, but in subdirectories a
893# relative path needs to be adjusted first.
894#
895# $ac_aux_dir/missing
896# fails when called from a subdirectory if $ac_aux_dir is relative
897# $top_srcdir/$ac_aux_dir/missing
898# fails if $ac_aux_dir is absolute,
899# fails when called from a subdirectory in a VPATH build with
900# a relative $ac_aux_dir
901#
902# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
903# are both prefixed by $srcdir. In an in-source build this is usually
904# harmless because $srcdir is `.', but things will broke when you
905# start a VPATH build or use an absolute $srcdir.
906#
907# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
908# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
909# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
910# and then we would define $MISSING as
911# MISSING="\${SHELL} $am_aux_dir/missing"
912# This will work as long as MISSING is not called from configure, because
913# unfortunately $(top_srcdir) has no meaning in configure.
914# However there are other variables, like CC, which are often used in
915# configure, and could therefore not use this "fixed" $ac_aux_dir.
916#
917# Another solution, used here, is to always expand $ac_aux_dir to an
918# absolute PATH. The drawback is that using absolute paths prevent a
919# configured tree to be moved without reconfiguration.
920
921AC_DEFUN([AM_AUX_DIR_EXPAND],
922[dnl Rely on autoconf to set up CDPATH properly.
923AC_PREREQ([2.50])dnl
924# expand $ac_aux_dir to an absolute path
925am_aux_dir=`cd $ac_aux_dir && pwd`
926])
927
928
929# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
930# 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# serial 4
937
938# This was merged into AC_PROG_CC in Autoconf.
939
940AU_DEFUN([AM_PROG_CC_STDC],
941[AC_PROG_CC
942AC_DIAGNOSE([obsolete], [$0:
943 your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
944 `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
945 you adjust the code. You can also remove the above call to
946 AC_PROG_CC if you already called it elsewhere.])
947am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
948])
949AU_DEFUN([fp_PROG_CC_STDC])
950
951# AM_CONDITIONAL -*- Autoconf -*-
952
eddc0c49 953# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
08024023
DB
954# Free Software Foundation, Inc.
955#
956# This file is free software; the Free Software Foundation
957# gives unlimited permission to copy and/or distribute it,
958# with or without modifications, as long as this notice is preserved.
959
eddc0c49 960# serial 9
08024023
DB
961
962# AM_CONDITIONAL(NAME, SHELL-CONDITION)
963# -------------------------------------
964# Define a conditional.
965AC_DEFUN([AM_CONDITIONAL],
966[AC_PREREQ(2.52)dnl
967 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
968 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
969AC_SUBST([$1_TRUE])dnl
970AC_SUBST([$1_FALSE])dnl
971_AM_SUBST_NOTMAKE([$1_TRUE])dnl
972_AM_SUBST_NOTMAKE([$1_FALSE])dnl
eddc0c49 973m4_define([_AM_COND_VALUE_$1], [$2])dnl
08024023
DB
974if $2; then
975 $1_TRUE=
976 $1_FALSE='#'
977else
978 $1_TRUE='#'
979 $1_FALSE=
980fi
981AC_CONFIG_COMMANDS_PRE(
982[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
983 AC_MSG_ERROR([[conditional "$1" was never defined.
984Usually this means the macro was only invoked conditionally.]])
985fi])])
986
eddc0c49 987# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
08024023
DB
988# Free Software Foundation, Inc.
989#
990# This file is free software; the Free Software Foundation
991# gives unlimited permission to copy and/or distribute it,
992# with or without modifications, as long as this notice is preserved.
993
eddc0c49 994# serial 10
08024023
DB
995
996# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
997# written in clear, in which case automake, when reading aclocal.m4,
998# will think it sees a *use*, and therefore will trigger all it's
999# C support machinery. Also note that it means that autoscan, seeing
1000# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1001
1002
1003# _AM_DEPENDENCIES(NAME)
1004# ----------------------
1005# See how the compiler implements dependency checking.
1006# NAME is "CC", "CXX", "GCJ", or "OBJC".
1007# We try a few techniques and use that to set a single cache variable.
1008#
1009# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1010# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1011# dependency, and given that the user is not expected to run this macro,
1012# just rely on AC_PROG_CC.
1013AC_DEFUN([_AM_DEPENDENCIES],
1014[AC_REQUIRE([AM_SET_DEPDIR])dnl
1015AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1016AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1017AC_REQUIRE([AM_DEP_TRACK])dnl
1018
1019ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1020 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1021 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1022 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1023 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1024 [depcc="$$1" am_compiler_list=])
1025
1026AC_CACHE_CHECK([dependency style of $depcc],
1027 [am_cv_$1_dependencies_compiler_type],
1028[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1029 # We make a subdir and do the tests there. Otherwise we can end up
1030 # making bogus files that we don't know about and never remove. For
1031 # instance it was reported that on HP-UX the gcc test will end up
1032 # making a dummy file named `D' -- because `-MD' means `put the output
1033 # in D'.
1034 mkdir conftest.dir
1035 # Copy depcomp to subdir because otherwise we won't find it if we're
1036 # using a relative directory.
1037 cp "$am_depcomp" conftest.dir
1038 cd conftest.dir
1039 # We will build objects and dependencies in a subdirectory because
1040 # it helps to detect inapplicable dependency modes. For instance
1041 # both Tru64's cc and ICC support -MD to output dependencies as a
1042 # side effect of compilation, but ICC will put the dependencies in
1043 # the current directory while Tru64 will put them in the object
1044 # directory.
1045 mkdir sub
1046
1047 am_cv_$1_dependencies_compiler_type=none
1048 if test "$am_compiler_list" = ""; then
1049 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1050 fi
eddc0c49
DB
1051 am__universal=false
1052 m4_case([$1], [CC],
1053 [case " $depcc " in #(
1054 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1055 esac],
1056 [CXX],
1057 [case " $depcc " in #(
1058 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1059 esac])
1060
08024023
DB
1061 for depmode in $am_compiler_list; do
1062 # Setup a source with many dependencies, because some compilers
1063 # like to wrap large dependency lists on column 80 (with \), and
1064 # we should not choose a depcomp mode which is confused by this.
1065 #
1066 # We need to recreate these files for each test, as the compiler may
1067 # overwrite some of them when testing with obscure command lines.
1068 # This happens at least with the AIX C compiler.
1069 : > sub/conftest.c
1070 for i in 1 2 3 4 5 6; do
1071 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1072 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1073 # Solaris 8's {/usr,}/bin/sh.
1074 touch sub/conftst$i.h
1075 done
1076 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1077
eddc0c49
DB
1078 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1079 # mode. It turns out that the SunPro C++ compiler does not properly
1080 # handle `-M -o', and we need to detect this. Also, some Intel
1081 # versions had trouble with output in subdirs
1082 am__obj=sub/conftest.${OBJEXT-o}
1083 am__minus_obj="-o $am__obj"
08024023 1084 case $depmode in
eddc0c49
DB
1085 gcc)
1086 # This depmode causes a compiler race in universal mode.
1087 test "$am__universal" = false || continue
1088 ;;
08024023
DB
1089 nosideeffect)
1090 # after this tag, mechanisms are not by side-effect, so they'll
1091 # only be used when explicitly requested
1092 if test "x$enable_dependency_tracking" = xyes; then
1093 continue
1094 else
1095 break
1096 fi
1097 ;;
eddc0c49
DB
1098 msvisualcpp | msvcmsys)
1099 # This compiler won't grok `-c -o', but also, the minuso test has
1100 # not run yet. These depmodes are late enough in the game, and
1101 # so weak that their functioning should not be impacted.
1102 am__obj=conftest.${OBJEXT-o}
1103 am__minus_obj=
1104 ;;
08024023
DB
1105 none) break ;;
1106 esac
08024023 1107 if depmode=$depmode \
eddc0c49 1108 source=sub/conftest.c object=$am__obj \
08024023 1109 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
eddc0c49 1110 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
08024023
DB
1111 >/dev/null 2>conftest.err &&
1112 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1113 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
eddc0c49 1114 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
08024023
DB
1115 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1116 # icc doesn't choke on unknown options, it will just issue warnings
1117 # or remarks (even with -Werror). So we grep stderr for any message
1118 # that says an option was ignored or not supported.
1119 # When given -MP, icc 7.0 and 7.1 complain thusly:
1120 # icc: Command line warning: ignoring option '-M'; no argument required
1121 # The diagnosis changed in icc 8.0:
1122 # icc: Command line remark: option '-MP' not supported
1123 if (grep 'ignoring option' conftest.err ||
1124 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1125 am_cv_$1_dependencies_compiler_type=$depmode
1126 break
1127 fi
1128 fi
1129 done
1130
1131 cd ..
1132 rm -rf conftest.dir
1133else
1134 am_cv_$1_dependencies_compiler_type=none
1135fi
1136])
1137AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1138AM_CONDITIONAL([am__fastdep$1], [
1139 test "x$enable_dependency_tracking" != xno \
1140 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1141])
1142
1143
1144# AM_SET_DEPDIR
1145# -------------
1146# Choose a directory name for dependency files.
1147# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1148AC_DEFUN([AM_SET_DEPDIR],
1149[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1150AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1151])
1152
1153
1154# AM_DEP_TRACK
1155# ------------
1156AC_DEFUN([AM_DEP_TRACK],
1157[AC_ARG_ENABLE(dependency-tracking,
1158[ --disable-dependency-tracking speeds up one-time build
1159 --enable-dependency-tracking do not reject slow dependency extractors])
1160if test "x$enable_dependency_tracking" != xno; then
1161 am_depcomp="$ac_aux_dir/depcomp"
1162 AMDEPBACKSLASH='\'
1163fi
1164AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1165AC_SUBST([AMDEPBACKSLASH])dnl
1166_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1167])
1168
1169# Generate code to set up dependency tracking. -*- Autoconf -*-
1170
eddc0c49 1171# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
08024023
DB
1172# Free Software Foundation, Inc.
1173#
1174# This file is free software; the Free Software Foundation
1175# gives unlimited permission to copy and/or distribute it,
1176# with or without modifications, as long as this notice is preserved.
1177
eddc0c49 1178#serial 5
08024023
DB
1179
1180# _AM_OUTPUT_DEPENDENCY_COMMANDS
1181# ------------------------------
1182AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
eddc0c49
DB
1183[{
1184 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1185 # are listed without --file. Let's play safe and only enable the eval
1186 # if we detect the quoting.
1187 case $CONFIG_FILES in
1188 *\'*) eval set x "$CONFIG_FILES" ;;
1189 *) set x $CONFIG_FILES ;;
1190 esac
1191 shift
1192 for mf
1193 do
1194 # Strip MF so we end up with the name of the file.
1195 mf=`echo "$mf" | sed -e 's/:.*$//'`
1196 # Check whether this is an Automake generated Makefile or not.
1197 # We used to match only the files named `Makefile.in', but
1198 # some people rename them; so instead we look at the file content.
1199 # Grep'ing the first line is not enough: some people post-process
1200 # each Makefile.in and add a new line on top of each file to say so.
1201 # Grep'ing the whole file is not good either: AIX grep has a line
1202 # limit of 2048, but all sed's we know have understand at least 4000.
1203 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1204 dirpart=`AS_DIRNAME("$mf")`
1205 else
1206 continue
1207 fi
1208 # Extract the definition of DEPDIR, am__include, and am__quote
1209 # from the Makefile without running `make'.
1210 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1211 test -z "$DEPDIR" && continue
1212 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1213 test -z "am__include" && continue
1214 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1215 # When using ansi2knr, U may be empty or an underscore; expand it
1216 U=`sed -n 's/^U = //p' < "$mf"`
1217 # Find all dependency output files, they are included files with
1218 # $(DEPDIR) in their names. We invoke sed twice because it is the
1219 # simplest approach to changing $(DEPDIR) to its actual value in the
1220 # expansion.
1221 for file in `sed -n "
1222 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1223 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1224 # Make sure the directory exists.
1225 test -f "$dirpart/$file" && continue
1226 fdir=`AS_DIRNAME(["$file"])`
1227 AS_MKDIR_P([$dirpart/$fdir])
1228 # echo "creating $dirpart/$file"
1229 echo '# dummy' > "$dirpart/$file"
1230 done
08024023 1231 done
eddc0c49 1232}
08024023
DB
1233])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1234
1235
1236# AM_OUTPUT_DEPENDENCY_COMMANDS
1237# -----------------------------
1238# This macro should only be invoked once -- use via AC_REQUIRE.
1239#
1240# This code is only required when automatic dependency tracking
1241# is enabled. FIXME. This creates each `.P' file that we will
1242# need in order to bootstrap the dependency handling code.
1243AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1244[AC_CONFIG_COMMANDS([depfiles],
1245 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1246 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1247])
1248
1249# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1250# Free Software Foundation, Inc.
1251#
1252# This file is free software; the Free Software Foundation
1253# gives unlimited permission to copy and/or distribute it,
1254# with or without modifications, as long as this notice is preserved.
1255
1256# serial 8
1257
1258# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1259AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1260
1261# Do all the work for Automake. -*- Autoconf -*-
1262
1263# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
eddc0c49 1264# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
08024023
DB
1265#
1266# This file is free software; the Free Software Foundation
1267# gives unlimited permission to copy and/or distribute it,
1268# with or without modifications, as long as this notice is preserved.
1269
eddc0c49 1270# serial 16
08024023
DB
1271
1272# This macro actually does too much. Some checks are only needed if
1273# your package does certain things. But this isn't really a big deal.
1274
1275# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1276# AM_INIT_AUTOMAKE([OPTIONS])
1277# -----------------------------------------------
1278# The call with PACKAGE and VERSION arguments is the old style
1279# call (pre autoconf-2.50), which is being phased out. PACKAGE
1280# and VERSION should now be passed to AC_INIT and removed from
1281# the call to AM_INIT_AUTOMAKE.
1282# We support both call styles for the transition. After
1283# the next Automake release, Autoconf can make the AC_INIT
1284# arguments mandatory, and then we can depend on a new Autoconf
1285# release and drop the old call support.
1286AC_DEFUN([AM_INIT_AUTOMAKE],
eddc0c49 1287[AC_PREREQ([2.62])dnl
08024023
DB
1288dnl Autoconf wants to disallow AM_ names. We explicitly allow
1289dnl the ones we care about.
1290m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1291AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1292AC_REQUIRE([AC_PROG_INSTALL])dnl
1293if test "`cd $srcdir && pwd`" != "`pwd`"; then
1294 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1295 # is not polluted with repeated "-I."
1296 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1297 # test to see if srcdir already configured
1298 if test -f $srcdir/config.status; then
1299 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1300 fi
1301fi
1302
1303# test whether we have cygpath
1304if test -z "$CYGPATH_W"; then
1305 if (cygpath --version) >/dev/null 2>/dev/null; then
1306 CYGPATH_W='cygpath -w'
1307 else
1308 CYGPATH_W=echo
1309 fi
1310fi
1311AC_SUBST([CYGPATH_W])
1312
1313# Define the identity of the package.
1314dnl Distinguish between old-style and new-style calls.
1315m4_ifval([$2],
1316[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1317 AC_SUBST([PACKAGE], [$1])dnl
1318 AC_SUBST([VERSION], [$2])],
1319[_AM_SET_OPTIONS([$1])dnl
1320dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1321m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1322 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1323 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1324 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1325
1326_AM_IF_OPTION([no-define],,
1327[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1328 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1329
1330# Some tools Automake needs.
1331AC_REQUIRE([AM_SANITY_CHECK])dnl
1332AC_REQUIRE([AC_ARG_PROGRAM])dnl
1333AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1334AM_MISSING_PROG(AUTOCONF, autoconf)
1335AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1336AM_MISSING_PROG(AUTOHEADER, autoheader)
1337AM_MISSING_PROG(MAKEINFO, makeinfo)
eddc0c49
DB
1338AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1339AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
08024023
DB
1340AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1341# We need awk for the "check" target. The system "awk" is bad on
1342# some platforms.
1343AC_REQUIRE([AC_PROG_AWK])dnl
1344AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1345AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1346_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
eddc0c49
DB
1347 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1348 [_AM_PROG_TAR([v7])])])
08024023
DB
1349_AM_IF_OPTION([no-dependencies],,
1350[AC_PROVIDE_IFELSE([AC_PROG_CC],
eddc0c49
DB
1351 [_AM_DEPENDENCIES(CC)],
1352 [define([AC_PROG_CC],
1353 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
08024023 1354AC_PROVIDE_IFELSE([AC_PROG_CXX],
eddc0c49
DB
1355 [_AM_DEPENDENCIES(CXX)],
1356 [define([AC_PROG_CXX],
1357 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
08024023 1358AC_PROVIDE_IFELSE([AC_PROG_OBJC],
eddc0c49
DB
1359 [_AM_DEPENDENCIES(OBJC)],
1360 [define([AC_PROG_OBJC],
1361 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
08024023 1362])
eddc0c49
DB
1363_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1364dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1365dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1366dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1367AC_CONFIG_COMMANDS_PRE(dnl
1368[m4_provide_if([_AM_COMPILER_EXEEXT],
1369 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
08024023
DB
1370])
1371
eddc0c49
DB
1372dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1373dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1374dnl mangled by Autoconf and run in a shell conditional statement.
1375m4_define([_AC_COMPILER_EXEEXT],
1376m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1377
08024023
DB
1378
1379# When config.status generates a header, we must update the stamp-h file.
1380# This file resides in the same directory as the config header
1381# that is generated. The stamp files are numbered to have different names.
1382
1383# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1384# loop where config.status creates the headers, so we can generate
1385# our stamp files there.
1386AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1387[# Compute $1's index in $config_headers.
eddc0c49 1388_am_arg=$1
08024023
DB
1389_am_stamp_count=1
1390for _am_header in $config_headers :; do
1391 case $_am_header in
eddc0c49 1392 $_am_arg | $_am_arg:* )
08024023
DB
1393 break ;;
1394 * )
1395 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1396 esac
1397done
eddc0c49 1398echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
08024023 1399
eddc0c49 1400# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
08024023
DB
1401#
1402# This file is free software; the Free Software Foundation
1403# gives unlimited permission to copy and/or distribute it,
1404# with or without modifications, as long as this notice is preserved.
1405
1406# AM_PROG_INSTALL_SH
1407# ------------------
1408# Define $install_sh.
1409AC_DEFUN([AM_PROG_INSTALL_SH],
1410[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
eddc0c49
DB
1411if test x"${install_sh}" != xset; then
1412 case $am_aux_dir in
1413 *\ * | *\ *)
1414 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1415 *)
1416 install_sh="\${SHELL} $am_aux_dir/install-sh"
1417 esac
1418fi
08024023
DB
1419AC_SUBST(install_sh)])
1420
1421# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1422#
1423# This file is free software; the Free Software Foundation
1424# gives unlimited permission to copy and/or distribute it,
1425# with or without modifications, as long as this notice is preserved.
1426
1427# serial 2
1428
1429# Check whether the underlying file-system supports filenames
1430# with a leading dot. For instance MS-DOS doesn't.
1431AC_DEFUN([AM_SET_LEADING_DOT],
1432[rm -rf .tst 2>/dev/null
1433mkdir .tst 2>/dev/null
1434if test -d .tst; then
1435 am__leading_dot=.
1436else
1437 am__leading_dot=_
1438fi
1439rmdir .tst 2>/dev/null
1440AC_SUBST([am__leading_dot])])
1441
1442# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1443# From Jim Meyering
1444
eddc0c49 1445# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
08024023
DB
1446# Free Software Foundation, Inc.
1447#
1448# This file is free software; the Free Software Foundation
1449# gives unlimited permission to copy and/or distribute it,
1450# with or without modifications, as long as this notice is preserved.
1451
eddc0c49 1452# serial 5
08024023 1453
eddc0c49
DB
1454# AM_MAINTAINER_MODE([DEFAULT-MODE])
1455# ----------------------------------
1456# Control maintainer-specific portions of Makefiles.
1457# Default is to disable them, unless `enable' is passed literally.
1458# For symmetry, `disable' may be passed as well. Anyway, the user
1459# can override the default with the --enable/--disable switch.
08024023 1460AC_DEFUN([AM_MAINTAINER_MODE],
eddc0c49
DB
1461[m4_case(m4_default([$1], [disable]),
1462 [enable], [m4_define([am_maintainer_other], [disable])],
1463 [disable], [m4_define([am_maintainer_other], [enable])],
1464 [m4_define([am_maintainer_other], [enable])
1465 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1466AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1467 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1468 AC_ARG_ENABLE([maintainer-mode],
1469[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
08024023 1470 (and sometimes confusing) to the casual installer],
eddc0c49
DB
1471 [USE_MAINTAINER_MODE=$enableval],
1472 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
08024023 1473 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
eddc0c49 1474 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
08024023 1475 MAINT=$MAINTAINER_MODE_TRUE
eddc0c49 1476 AC_SUBST([MAINT])dnl
08024023
DB
1477]
1478)
1479
1480AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1481
1482# Check to see how 'make' treats includes. -*- Autoconf -*-
1483
eddc0c49 1484# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
08024023
DB
1485#
1486# This file is free software; the Free Software Foundation
1487# gives unlimited permission to copy and/or distribute it,
1488# with or without modifications, as long as this notice is preserved.
1489
eddc0c49 1490# serial 4
08024023
DB
1491
1492# AM_MAKE_INCLUDE()
1493# -----------------
1494# Check to see how make treats includes.
1495AC_DEFUN([AM_MAKE_INCLUDE],
1496[am_make=${MAKE-make}
1497cat > confinc << 'END'
1498am__doit:
eddc0c49 1499 @echo this is the am__doit target
08024023
DB
1500.PHONY: am__doit
1501END
1502# If we don't find an include directive, just comment out the code.
1503AC_MSG_CHECKING([for style of include used by $am_make])
1504am__include="#"
1505am__quote=
1506_am_result=none
1507# First try GNU make style include.
1508echo "include confinc" > confmf
eddc0c49
DB
1509# Ignore all kinds of additional output from `make'.
1510case `$am_make -s -f confmf 2> /dev/null` in #(
1511*the\ am__doit\ target*)
1512 am__include=include
1513 am__quote=
1514 _am_result=GNU
1515 ;;
1516esac
08024023
DB
1517# Now try BSD make style include.
1518if test "$am__include" = "#"; then
1519 echo '.include "confinc"' > confmf
eddc0c49
DB
1520 case `$am_make -s -f confmf 2> /dev/null` in #(
1521 *the\ am__doit\ target*)
1522 am__include=.include
1523 am__quote="\""
1524 _am_result=BSD
1525 ;;
1526 esac
08024023
DB
1527fi
1528AC_SUBST([am__include])
1529AC_SUBST([am__quote])
1530AC_MSG_RESULT([$_am_result])
1531rm -f confinc confmf
1532])
1533
1534# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1535
eddc0c49 1536# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
08024023
DB
1537# Free Software Foundation, Inc.
1538#
1539# This file is free software; the Free Software Foundation
1540# gives unlimited permission to copy and/or distribute it,
1541# with or without modifications, as long as this notice is preserved.
1542
eddc0c49 1543# serial 6
08024023
DB
1544
1545# AM_MISSING_PROG(NAME, PROGRAM)
1546# ------------------------------
1547AC_DEFUN([AM_MISSING_PROG],
1548[AC_REQUIRE([AM_MISSING_HAS_RUN])
1549$1=${$1-"${am_missing_run}$2"}
1550AC_SUBST($1)])
1551
1552
1553# AM_MISSING_HAS_RUN
1554# ------------------
1555# Define MISSING if not defined so far and test if it supports --run.
1556# If it does, set am_missing_run to use it, otherwise, to nothing.
1557AC_DEFUN([AM_MISSING_HAS_RUN],
1558[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1559AC_REQUIRE_AUX_FILE([missing])dnl
eddc0c49
DB
1560if test x"${MISSING+set}" != xset; then
1561 case $am_aux_dir in
1562 *\ * | *\ *)
1563 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1564 *)
1565 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1566 esac
1567fi
08024023
DB
1568# Use eval to expand $SHELL
1569if eval "$MISSING --run true"; then
1570 am_missing_run="$MISSING --run "
1571else
1572 am_missing_run=
1573 AC_MSG_WARN([`missing' script is too old or missing])
1574fi
1575])
1576
1577# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1578#
1579# This file is free software; the Free Software Foundation
1580# gives unlimited permission to copy and/or distribute it,
1581# with or without modifications, as long as this notice is preserved.
1582
1583# AM_PROG_MKDIR_P
1584# ---------------
1585# Check for `mkdir -p'.
1586AC_DEFUN([AM_PROG_MKDIR_P],
1587[AC_PREREQ([2.60])dnl
1588AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1589dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1590dnl while keeping a definition of mkdir_p for backward compatibility.
1591dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1592dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1593dnl Makefile.ins that do not define MKDIR_P, so we do our own
1594dnl adjustment using top_builddir (which is defined more often than
1595dnl MKDIR_P).
1596AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1597case $mkdir_p in
1598 [[\\/$]]* | ?:[[\\/]]*) ;;
1599 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1600esac
1601])
1602
1603# Helper functions for option handling. -*- Autoconf -*-
1604
eddc0c49 1605# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
08024023
DB
1606#
1607# This file is free software; the Free Software Foundation
1608# gives unlimited permission to copy and/or distribute it,
1609# with or without modifications, as long as this notice is preserved.
1610
eddc0c49 1611# serial 4
08024023
DB
1612
1613# _AM_MANGLE_OPTION(NAME)
1614# -----------------------
1615AC_DEFUN([_AM_MANGLE_OPTION],
1616[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1617
1618# _AM_SET_OPTION(NAME)
1619# ------------------------------
1620# Set option NAME. Presently that only means defining a flag for this option.
1621AC_DEFUN([_AM_SET_OPTION],
1622[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1623
1624# _AM_SET_OPTIONS(OPTIONS)
1625# ----------------------------------
1626# OPTIONS is a space-separated list of Automake options.
1627AC_DEFUN([_AM_SET_OPTIONS],
eddc0c49 1628[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
08024023
DB
1629
1630# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1631# -------------------------------------------
1632# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1633AC_DEFUN([_AM_IF_OPTION],
1634[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1635
1636# Check to make sure that the build environment is sane. -*- Autoconf -*-
1637
eddc0c49 1638# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
08024023
DB
1639# Free Software Foundation, Inc.
1640#
1641# This file is free software; the Free Software Foundation
1642# gives unlimited permission to copy and/or distribute it,
1643# with or without modifications, as long as this notice is preserved.
1644
eddc0c49 1645# serial 5
08024023
DB
1646
1647# AM_SANITY_CHECK
1648# ---------------
1649AC_DEFUN([AM_SANITY_CHECK],
1650[AC_MSG_CHECKING([whether build environment is sane])
1651# Just in case
1652sleep 1
1653echo timestamp > conftest.file
eddc0c49
DB
1654# Reject unsafe characters in $srcdir or the absolute working directory
1655# name. Accept space and tab only in the latter.
1656am_lf='
1657'
1658case `pwd` in
1659 *[[\\\"\#\$\&\'\`$am_lf]]*)
1660 AC_MSG_ERROR([unsafe absolute working directory name]);;
1661esac
1662case $srcdir in
1663 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1664 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1665esac
1666
08024023
DB
1667# Do `set' in a subshell so we don't clobber the current shell's
1668# arguments. Must try -L first in case configure is actually a
1669# symlink; some systems play weird games with the mod time of symlinks
1670# (eg FreeBSD returns the mod time of the symlink's containing
1671# directory).
1672if (
eddc0c49 1673 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
08024023
DB
1674 if test "$[*]" = "X"; then
1675 # -L didn't work.
eddc0c49 1676 set X `ls -t "$srcdir/configure" conftest.file`
08024023
DB
1677 fi
1678 rm -f conftest.file
1679 if test "$[*]" != "X $srcdir/configure conftest.file" \
1680 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1681
1682 # If neither matched, then we have a broken ls. This can happen
1683 # if, for instance, CONFIG_SHELL is bash and it inherits a
1684 # broken ls alias from the environment. This has actually
1685 # happened. Such a system could not be considered "sane".
1686 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1687alias in your environment])
1688 fi
1689
1690 test "$[2]" = conftest.file
1691 )
1692then
1693 # Ok.
1694 :
1695else
1696 AC_MSG_ERROR([newly created file is older than distributed files!
1697Check your system clock])
1698fi
1699AC_MSG_RESULT(yes)])
1700
1701# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1702#
1703# This file is free software; the Free Software Foundation
1704# gives unlimited permission to copy and/or distribute it,
1705# with or without modifications, as long as this notice is preserved.
1706
1707# AM_PROG_INSTALL_STRIP
1708# ---------------------
1709# One issue with vendor `install' (even GNU) is that you can't
1710# specify the program used to strip binaries. This is especially
1711# annoying in cross-compiling environments, where the build's strip
1712# is unlikely to handle the host's binaries.
1713# Fortunately install-sh will honor a STRIPPROG variable, so we
1714# always use install-sh in `make install-strip', and initialize
1715# STRIPPROG with the value of the STRIP variable (set by the user).
1716AC_DEFUN([AM_PROG_INSTALL_STRIP],
1717[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1718# Installed binaries are usually stripped using `strip' when the user
1719# run `make install-strip'. However `strip' might not be the right
1720# tool to use in cross-compilation environments, therefore Automake
1721# will honor the `STRIP' environment variable to overrule this program.
1722dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1723if test "$cross_compiling" != no; then
1724 AC_CHECK_TOOL([STRIP], [strip], :)
1725fi
1726INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1727AC_SUBST([INSTALL_STRIP_PROGRAM])])
1728
eddc0c49 1729# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
08024023
DB
1730#
1731# This file is free software; the Free Software Foundation
1732# gives unlimited permission to copy and/or distribute it,
1733# with or without modifications, as long as this notice is preserved.
1734
eddc0c49
DB
1735# serial 2
1736
08024023
DB
1737# _AM_SUBST_NOTMAKE(VARIABLE)
1738# ---------------------------
eddc0c49 1739# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
08024023
DB
1740# This macro is traced by Automake.
1741AC_DEFUN([_AM_SUBST_NOTMAKE])
1742
eddc0c49
DB
1743# AM_SUBST_NOTMAKE(VARIABLE)
1744# ---------------------------
1745# Public sister of _AM_SUBST_NOTMAKE.
1746AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1747
08024023
DB
1748# Check how to create a tarball. -*- Autoconf -*-
1749
1750# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1751#
1752# This file is free software; the Free Software Foundation
1753# gives unlimited permission to copy and/or distribute it,
1754# with or without modifications, as long as this notice is preserved.
1755
1756# serial 2
1757
1758# _AM_PROG_TAR(FORMAT)
1759# --------------------
1760# Check how to create a tarball in format FORMAT.
1761# FORMAT should be one of `v7', `ustar', or `pax'.
1762#
1763# Substitute a variable $(am__tar) that is a command
1764# writing to stdout a FORMAT-tarball containing the directory
1765# $tardir.
1766# tardir=directory && $(am__tar) > result.tar
1767#
1768# Substitute a variable $(am__untar) that extract such
1769# a tarball read from stdin.
1770# $(am__untar) < result.tar
1771AC_DEFUN([_AM_PROG_TAR],
1772[# Always define AMTAR for backward compatibility.
1773AM_MISSING_PROG([AMTAR], [tar])
1774m4_if([$1], [v7],
1775 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1776 [m4_case([$1], [ustar],, [pax],,
1777 [m4_fatal([Unknown tar format])])
1778AC_MSG_CHECKING([how to create a $1 tar archive])
1779# Loop over all known methods to create a tar archive until one works.
1780_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1781_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1782# Do not fold the above two line into one, because Tru64 sh and
1783# Solaris sh will not grok spaces in the rhs of `-'.
1784for _am_tool in $_am_tools
1785do
1786 case $_am_tool in
1787 gnutar)
1788 for _am_tar in tar gnutar gtar;
1789 do
1790 AM_RUN_LOG([$_am_tar --version]) && break
1791 done
1792 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1793 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1794 am__untar="$_am_tar -xf -"
1795 ;;
1796 plaintar)
1797 # Must skip GNU tar: if it does not support --format= it doesn't create
1798 # ustar tarball either.
1799 (tar --version) >/dev/null 2>&1 && continue
1800 am__tar='tar chf - "$$tardir"'
1801 am__tar_='tar chf - "$tardir"'
1802 am__untar='tar xf -'
1803 ;;
1804 pax)
1805 am__tar='pax -L -x $1 -w "$$tardir"'
1806 am__tar_='pax -L -x $1 -w "$tardir"'
1807 am__untar='pax -r'
1808 ;;
1809 cpio)
1810 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1811 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1812 am__untar='cpio -i -H $1 -d'
1813 ;;
1814 none)
1815 am__tar=false
1816 am__tar_=false
1817 am__untar=false
1818 ;;
1819 esac
1820
1821 # If the value was cached, stop now. We just wanted to have am__tar
1822 # and am__untar set.
1823 test -n "${am_cv_prog_tar_$1}" && break
1824
1825 # tar/untar a dummy directory, and stop if the command works
1826 rm -rf conftest.dir
1827 mkdir conftest.dir
1828 echo GrepMe > conftest.dir/file
1829 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1830 rm -rf conftest.dir
1831 if test -s conftest.tar; then
1832 AM_RUN_LOG([$am__untar <conftest.tar])
1833 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1834 fi
1835done
1836rm -rf conftest.dir
1837
1838AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1839AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1840AC_SUBST([am__tar])
1841AC_SUBST([am__untar])
1842]) # _AM_PROG_TAR
1843
eddc0c49 1844m4_include([acinclude.m4])