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