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