1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
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
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
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.
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.
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38
# Modified to never use included libintl.
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44
# Added better handling of ALL_LINGUAS from GNU gettext version
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
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
56
dnl We go to great lengths to make sure that aclocal won't
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
69
glib_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.])
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
92
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
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
100
ac_cv_path_$1="$ac_dir/$ac_word"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
123
glib_DEFUN([GLIB_WITH_NLS],
124
dnl NLS is obligatory
128
gt_cv_have_gettext=no
134
AC_CHECK_HEADER(libintl.h,
135
[gt_cv_func_dgettext_libintl="no"
136
libintl_extra_libs=""
139
# First check in libc
141
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
145
[return !ngettext ("","", 1)],
146
gt_cv_func_ngettext_libc=yes,
147
gt_cv_func_ngettext_libc=no)
150
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
155
[return !dgettext ("","")],
156
gt_cv_func_dgettext_libc=yes,
157
gt_cv_func_dgettext_libc=no)
161
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
AC_CHECK_FUNCS(bind_textdomain_codeset)
166
# If we don't have everything we want, check in libintl
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
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)])])
177
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
AC_MSG_CHECKING([if -liconv is needed to use gettext])
180
AC_CHECK_LIB(intl, ngettext,
181
[AC_CHECK_LIB(intl, dcgettext,
182
[gt_cv_func_dgettext_libintl=yes
183
libintl_extra_libs=-liconv],
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
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"
200
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
gt_cv_func_dgettext_libc=no
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
211
if test "$gt_cv_func_dgettext_libc" = "yes" \
212
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
gt_cv_have_gettext=yes
216
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
INTLLIBS="-lintl $libintl_extra_libs"
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)
230
AC_MSG_CHECKING([if msgfmt accepts -c])
231
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
AC_SUBST(MSGFMT_OPTS)
243
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
return _nl_msg_cat_cntr],
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,
268
LIBS="$glib_save_LIBS"
271
gt_cv_have_gettext=no
276
if test "$gt_cv_have_gettext" = "yes" ; then
277
AC_DEFINE(ENABLE_NLS, 1,
278
[always defined to indicate that i18n is enabled])
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
289
[found xgettext program is not GNU xgettext; ignore it])
294
# We need to process the po/ directory.
298
[case "$CONFIG_FILES" in *po/Makefile.in*)
299
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
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
305
for lang in $ALL_LINGUAS; do
306
GMOFILES="$GMOFILES $lang.gmo"
307
POFILES="$POFILES $lang.po"
310
dnl Make all variables we use known to autoconf.
313
AC_SUBST(DATADIRNAME)
317
AC_SUBST(PO_IN_DATADIR_TRUE)
318
AC_SUBST(PO_IN_DATADIR_FALSE)
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
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
[AC_REQUIRE([AC_PROG_CC])dnl
335
AC_REQUIRE([AC_HEADER_STDC])dnl
340
if test "$gt_cv_have_gettext" = "yes"; then
341
if test "x$ALL_LINGUAS" = "x"; then
344
AC_MSG_CHECKING(for catalogs to be installed)
346
for presentlang in $ALL_LINGUAS; do
348
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
desiredlanguages="$LINGUAS"
351
desiredlanguages="$ALL_LINGUAS"
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;;
363
if test $useit = yes; then
364
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
368
AC_MSG_RESULT($LINGUAS)
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
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.
381
if test -n "$ac_aux_dir"; then
382
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
384
if test -z "$MKINSTALLDIRS"; then
385
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
387
AC_SUBST(MKINSTALLDIRS)
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/"
396
posrcprefix="../$srcdir/"
402
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
< $srcdir/po/POTFILES.in > po/POTFILES
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
localedir=`eval echo "${libdir}/locale"`
421
localedir=`eval echo "${datadir}/locale"`
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
[Define the location where the catalogs will be installed])
431
dnl Now the definitions that aclocal will find
433
ifdef(glib_configure_ac,[],[
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
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.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
455
# nls.m4 serial 5 (gettext-0.18)
456
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
458
dnl This file is free software; the Free Software Foundation
459
dnl gives unlimited permission to copy and/or distribute it,
460
dnl with or without modifications, as long as this notice is preserved.
462
dnl This file can can be used in projects which are not available under
463
dnl the GNU General Public License or the GNU Library General Public
464
dnl License but which still want to provide support for the GNU gettext
466
dnl Please note that the actual code of the GNU gettext library is covered
467
dnl by the GNU Library General Public License, and the rest of the GNU
468
dnl gettext package package is covered by the GNU General Public License.
469
dnl They are *not* in the public domain.
472
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
473
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
479
AC_MSG_CHECKING([whether NLS is requested])
480
dnl Default is enabled NLS
482
[ --disable-nls do not use Native Language Support],
483
USE_NLS=$enableval, USE_NLS=yes)
484
AC_MSG_RESULT([$USE_NLS])
488
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
489
# serial 1 (pkg-config-0.24)
491
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
493
# This program is free software; you can redistribute it and/or modify
494
# it under the terms of the GNU General Public License as published by
495
# the Free Software Foundation; either version 2 of the License, or
496
# (at your option) any later version.
498
# This program is distributed in the hope that it will be useful, but
499
# WITHOUT ANY WARRANTY; without even the implied warranty of
500
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
501
# General Public License for more details.
503
# You should have received a copy of the GNU General Public License
504
# along with this program; if not, write to the Free Software
505
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
507
# As a special exception to the GNU General Public License, if you
508
# distribute this file as part of a program that contains a
509
# configuration script generated by Autoconf, you may include it under
510
# the same distribution terms that you use for the rest of that program.
512
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
513
# ----------------------------------
514
AC_DEFUN([PKG_PROG_PKG_CONFIG],
515
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
516
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
517
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
518
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
519
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
521
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
522
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
524
if test -n "$PKG_CONFIG"; then
525
_pkg_min_version=m4_default([$1], [0.9.0])
526
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
527
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
534
])# PKG_PROG_PKG_CONFIG
536
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
538
# Check to see whether a particular set of modules exists. Similar
539
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
541
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
542
# only at the first occurence in configure.ac, so if the first place
543
# it's called might be skipped (such as if it is within an "if", you
544
# have to call PKG_CHECK_EXISTS manually
545
# --------------------------------------------------------------
546
AC_DEFUN([PKG_CHECK_EXISTS],
547
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
548
if test -n "$PKG_CONFIG" && \
549
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
550
m4_default([$2], [:])
551
m4_ifvaln([$3], [else
555
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
556
# ---------------------------------------------
557
m4_define([_PKG_CONFIG],
558
[if test -n "$$1"; then
560
elif test -n "$PKG_CONFIG"; then
561
PKG_CHECK_EXISTS([$3],
562
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
569
# _PKG_SHORT_ERRORS_SUPPORTED
570
# -----------------------------
571
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
572
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
573
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
574
_pkg_short_errors_supported=yes
576
_pkg_short_errors_supported=no
578
])# _PKG_SHORT_ERRORS_SUPPORTED
581
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
582
# [ACTION-IF-NOT-FOUND])
585
# Note that if there is a possibility the first call to
586
# PKG_CHECK_MODULES might not happen, you should be sure to include an
587
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
590
# --------------------------------------------------------------
591
AC_DEFUN([PKG_CHECK_MODULES],
592
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
593
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
594
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
597
AC_MSG_CHECKING([for $1])
599
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
600
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
602
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
603
and $1[]_LIBS to avoid the need to call pkg-config.
604
See the pkg-config man page for more details.])
606
if test $pkg_failed = yes; then
608
_PKG_SHORT_ERRORS_SUPPORTED
609
if test $_pkg_short_errors_supported = yes; then
610
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
612
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
614
# Put the nasty error message in config.log where it belongs
615
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
617
m4_default([$4], [AC_MSG_ERROR(
618
[Package requirements ($2) were not met:
622
Consider adjusting the PKG_CONFIG_PATH environment variable if you
623
installed software in a non-standard prefix.
627
elif test $pkg_failed = untried; then
629
m4_default([$4], [AC_MSG_FAILURE(
630
[The pkg-config script could not be found or is too old. Make sure it
631
is in your PATH or set the PKG_CONFIG environment variable to the full
636
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
639
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
640
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
644
])# PKG_CHECK_MODULES
646
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
648
# This file is free software; the Free Software Foundation
649
# gives unlimited permission to copy and/or distribute it,
650
# with or without modifications, as long as this notice is preserved.
652
# AM_AUTOMAKE_VERSION(VERSION)
653
# ----------------------------
654
# Automake X.Y traces this macro to ensure aclocal.m4 has been
655
# generated from the m4 files accompanying Automake X.Y.
656
# (This private macro should not be called outside this file.)
657
AC_DEFUN([AM_AUTOMAKE_VERSION],
658
[am__api_version='1.11'
659
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
660
dnl require some minimum version. Point them to the right macro.
661
m4_if([$1], [1.11.1], [],
662
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
665
# _AM_AUTOCONF_VERSION(VERSION)
666
# -----------------------------
667
# aclocal traces this macro to find the Autoconf version.
668
# This is a private macro too. Using m4_define simplifies
669
# the logic in aclocal, which can simply ignore this definition.
670
m4_define([_AM_AUTOCONF_VERSION], [])
672
# AM_SET_CURRENT_AUTOMAKE_VERSION
673
# -------------------------------
674
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
675
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
676
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
677
[AM_AUTOMAKE_VERSION([1.11.1])dnl
678
m4_ifndef([AC_AUTOCONF_VERSION],
679
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
680
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
682
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
684
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
686
# This file is free software; the Free Software Foundation
687
# gives unlimited permission to copy and/or distribute it,
688
# with or without modifications, as long as this notice is preserved.
690
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
691
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
692
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
694
# Of course, Automake must honor this variable whenever it calls a
695
# tool from the auxiliary directory. The problem is that $srcdir (and
696
# therefore $ac_aux_dir as well) can be either absolute or relative,
697
# depending on how configure is run. This is pretty annoying, since
698
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
699
# source directory, any form will work fine, but in subdirectories a
700
# relative path needs to be adjusted first.
702
# $ac_aux_dir/missing
703
# fails when called from a subdirectory if $ac_aux_dir is relative
704
# $top_srcdir/$ac_aux_dir/missing
705
# fails if $ac_aux_dir is absolute,
706
# fails when called from a subdirectory in a VPATH build with
707
# a relative $ac_aux_dir
709
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
710
# are both prefixed by $srcdir. In an in-source build this is usually
711
# harmless because $srcdir is `.', but things will broke when you
712
# start a VPATH build or use an absolute $srcdir.
714
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
715
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
716
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
717
# and then we would define $MISSING as
718
# MISSING="\${SHELL} $am_aux_dir/missing"
719
# This will work as long as MISSING is not called from configure, because
720
# unfortunately $(top_srcdir) has no meaning in configure.
721
# However there are other variables, like CC, which are often used in
722
# configure, and could therefore not use this "fixed" $ac_aux_dir.
724
# Another solution, used here, is to always expand $ac_aux_dir to an
725
# absolute PATH. The drawback is that using absolute paths prevent a
726
# configured tree to be moved without reconfiguration.
728
AC_DEFUN([AM_AUX_DIR_EXPAND],
729
[dnl Rely on autoconf to set up CDPATH properly.
731
# expand $ac_aux_dir to an absolute path
732
am_aux_dir=`cd $ac_aux_dir && pwd`
735
# AM_CONDITIONAL -*- Autoconf -*-
737
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
738
# Free Software Foundation, Inc.
740
# This file is free software; the Free Software Foundation
741
# gives unlimited permission to copy and/or distribute it,
742
# with or without modifications, as long as this notice is preserved.
746
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
747
# -------------------------------------
748
# Define a conditional.
749
AC_DEFUN([AM_CONDITIONAL],
751
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
752
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
753
AC_SUBST([$1_TRUE])dnl
754
AC_SUBST([$1_FALSE])dnl
755
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
756
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
757
m4_define([_AM_COND_VALUE_$1], [$2])dnl
765
AC_CONFIG_COMMANDS_PRE(
766
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
767
AC_MSG_ERROR([[conditional "$1" was never defined.
768
Usually this means the macro was only invoked conditionally.]])
771
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
772
# Free Software Foundation, Inc.
774
# This file is free software; the Free Software Foundation
775
# gives unlimited permission to copy and/or distribute it,
776
# with or without modifications, as long as this notice is preserved.
780
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
781
# written in clear, in which case automake, when reading aclocal.m4,
782
# will think it sees a *use*, and therefore will trigger all it's
783
# C support machinery. Also note that it means that autoscan, seeing
784
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
787
# _AM_DEPENDENCIES(NAME)
788
# ----------------------
789
# See how the compiler implements dependency checking.
790
# NAME is "CC", "CXX", "GCJ", or "OBJC".
791
# We try a few techniques and use that to set a single cache variable.
793
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
794
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
795
# dependency, and given that the user is not expected to run this macro,
796
# just rely on AC_PROG_CC.
797
AC_DEFUN([_AM_DEPENDENCIES],
798
[AC_REQUIRE([AM_SET_DEPDIR])dnl
799
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
800
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
801
AC_REQUIRE([AM_DEP_TRACK])dnl
803
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
804
[$1], CXX, [depcc="$CXX" am_compiler_list=],
805
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
806
[$1], UPC, [depcc="$UPC" am_compiler_list=],
807
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
808
[depcc="$$1" am_compiler_list=])
810
AC_CACHE_CHECK([dependency style of $depcc],
811
[am_cv_$1_dependencies_compiler_type],
812
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
813
# We make a subdir and do the tests there. Otherwise we can end up
814
# making bogus files that we don't know about and never remove. For
815
# instance it was reported that on HP-UX the gcc test will end up
816
# making a dummy file named `D' -- because `-MD' means `put the output
819
# Copy depcomp to subdir because otherwise we won't find it if we're
820
# using a relative directory.
821
cp "$am_depcomp" conftest.dir
823
# We will build objects and dependencies in a subdirectory because
824
# it helps to detect inapplicable dependency modes. For instance
825
# both Tru64's cc and ICC support -MD to output dependencies as a
826
# side effect of compilation, but ICC will put the dependencies in
827
# the current directory while Tru64 will put them in the object
831
am_cv_$1_dependencies_compiler_type=none
832
if test "$am_compiler_list" = ""; then
833
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
837
[case " $depcc " in #(
838
*\ -arch\ *\ -arch\ *) am__universal=true ;;
841
[case " $depcc " in #(
842
*\ -arch\ *\ -arch\ *) am__universal=true ;;
845
for depmode in $am_compiler_list; do
846
# Setup a source with many dependencies, because some compilers
847
# like to wrap large dependency lists on column 80 (with \), and
848
# we should not choose a depcomp mode which is confused by this.
850
# We need to recreate these files for each test, as the compiler may
851
# overwrite some of them when testing with obscure command lines.
852
# This happens at least with the AIX C compiler.
854
for i in 1 2 3 4 5 6; do
855
echo '#include "conftst'$i'.h"' >> sub/conftest.c
856
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
857
# Solaris 8's {/usr,}/bin/sh.
858
touch sub/conftst$i.h
860
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
862
# We check with `-c' and `-o' for the sake of the "dashmstdout"
863
# mode. It turns out that the SunPro C++ compiler does not properly
864
# handle `-M -o', and we need to detect this. Also, some Intel
865
# versions had trouble with output in subdirs
866
am__obj=sub/conftest.${OBJEXT-o}
867
am__minus_obj="-o $am__obj"
870
# This depmode causes a compiler race in universal mode.
871
test "$am__universal" = false || continue
874
# after this tag, mechanisms are not by side-effect, so they'll
875
# only be used when explicitly requested
876
if test "x$enable_dependency_tracking" = xyes; then
882
msvisualcpp | msvcmsys)
883
# This compiler won't grok `-c -o', but also, the minuso test has
884
# not run yet. These depmodes are late enough in the game, and
885
# so weak that their functioning should not be impacted.
886
am__obj=conftest.${OBJEXT-o}
891
if depmode=$depmode \
892
source=sub/conftest.c object=$am__obj \
893
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
894
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
895
>/dev/null 2>conftest.err &&
896
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
897
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
898
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
899
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
900
# icc doesn't choke on unknown options, it will just issue warnings
901
# or remarks (even with -Werror). So we grep stderr for any message
902
# that says an option was ignored or not supported.
903
# When given -MP, icc 7.0 and 7.1 complain thusly:
904
# icc: Command line warning: ignoring option '-M'; no argument required
905
# The diagnosis changed in icc 8.0:
906
# icc: Command line remark: option '-MP' not supported
907
if (grep 'ignoring option' conftest.err ||
908
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
909
am_cv_$1_dependencies_compiler_type=$depmode
918
am_cv_$1_dependencies_compiler_type=none
921
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
922
AM_CONDITIONAL([am__fastdep$1], [
923
test "x$enable_dependency_tracking" != xno \
924
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
930
# Choose a directory name for dependency files.
931
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
932
AC_DEFUN([AM_SET_DEPDIR],
933
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
934
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
940
AC_DEFUN([AM_DEP_TRACK],
941
[AC_ARG_ENABLE(dependency-tracking,
942
[ --disable-dependency-tracking speeds up one-time build
943
--enable-dependency-tracking do not reject slow dependency extractors])
944
if test "x$enable_dependency_tracking" != xno; then
945
am_depcomp="$ac_aux_dir/depcomp"
948
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
949
AC_SUBST([AMDEPBACKSLASH])dnl
950
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
953
# Generate code to set up dependency tracking. -*- Autoconf -*-
955
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
956
# Free Software Foundation, Inc.
958
# This file is free software; the Free Software Foundation
959
# gives unlimited permission to copy and/or distribute it,
960
# with or without modifications, as long as this notice is preserved.
964
# _AM_OUTPUT_DEPENDENCY_COMMANDS
965
# ------------------------------
966
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
968
# Autoconf 2.62 quotes --file arguments for eval, but not when files
969
# are listed without --file. Let's play safe and only enable the eval
970
# if we detect the quoting.
971
case $CONFIG_FILES in
972
*\'*) eval set x "$CONFIG_FILES" ;;
973
*) set x $CONFIG_FILES ;;
978
# Strip MF so we end up with the name of the file.
979
mf=`echo "$mf" | sed -e 's/:.*$//'`
980
# Check whether this is an Automake generated Makefile or not.
981
# We used to match only the files named `Makefile.in', but
982
# some people rename them; so instead we look at the file content.
983
# Grep'ing the first line is not enough: some people post-process
984
# each Makefile.in and add a new line on top of each file to say so.
985
# Grep'ing the whole file is not good either: AIX grep has a line
986
# limit of 2048, but all sed's we know have understand at least 4000.
987
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
988
dirpart=`AS_DIRNAME("$mf")`
992
# Extract the definition of DEPDIR, am__include, and am__quote
993
# from the Makefile without running `make'.
994
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
995
test -z "$DEPDIR" && continue
996
am__include=`sed -n 's/^am__include = //p' < "$mf"`
997
test -z "am__include" && continue
998
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
999
# When using ansi2knr, U may be empty or an underscore; expand it
1000
U=`sed -n 's/^U = //p' < "$mf"`
1001
# Find all dependency output files, they are included files with
1002
# $(DEPDIR) in their names. We invoke sed twice because it is the
1003
# simplest approach to changing $(DEPDIR) to its actual value in the
1005
for file in `sed -n "
1006
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1007
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1008
# Make sure the directory exists.
1009
test -f "$dirpart/$file" && continue
1010
fdir=`AS_DIRNAME(["$file"])`
1011
AS_MKDIR_P([$dirpart/$fdir])
1012
# echo "creating $dirpart/$file"
1013
echo '# dummy' > "$dirpart/$file"
1017
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1020
# AM_OUTPUT_DEPENDENCY_COMMANDS
1021
# -----------------------------
1022
# This macro should only be invoked once -- use via AC_REQUIRE.
1024
# This code is only required when automatic dependency tracking
1025
# is enabled. FIXME. This creates each `.P' file that we will
1026
# need in order to bootstrap the dependency handling code.
1027
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1028
[AC_CONFIG_COMMANDS([depfiles],
1029
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1030
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1033
# Do all the work for Automake. -*- Autoconf -*-
1035
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1036
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1038
# This file is free software; the Free Software Foundation
1039
# gives unlimited permission to copy and/or distribute it,
1040
# with or without modifications, as long as this notice is preserved.
1044
# This macro actually does too much. Some checks are only needed if
1045
# your package does certain things. But this isn't really a big deal.
1047
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1048
# AM_INIT_AUTOMAKE([OPTIONS])
1049
# -----------------------------------------------
1050
# The call with PACKAGE and VERSION arguments is the old style
1051
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1052
# and VERSION should now be passed to AC_INIT and removed from
1053
# the call to AM_INIT_AUTOMAKE.
1054
# We support both call styles for the transition. After
1055
# the next Automake release, Autoconf can make the AC_INIT
1056
# arguments mandatory, and then we can depend on a new Autoconf
1057
# release and drop the old call support.
1058
AC_DEFUN([AM_INIT_AUTOMAKE],
1059
[AC_PREREQ([2.62])dnl
1060
dnl Autoconf wants to disallow AM_ names. We explicitly allow
1061
dnl the ones we care about.
1062
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1063
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1064
AC_REQUIRE([AC_PROG_INSTALL])dnl
1065
if test "`cd $srcdir && pwd`" != "`pwd`"; then
1066
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1067
# is not polluted with repeated "-I."
1068
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1069
# test to see if srcdir already configured
1070
if test -f $srcdir/config.status; then
1071
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1075
# test whether we have cygpath
1076
if test -z "$CYGPATH_W"; then
1077
if (cygpath --version) >/dev/null 2>/dev/null; then
1078
CYGPATH_W='cygpath -w'
1083
AC_SUBST([CYGPATH_W])
1085
# Define the identity of the package.
1086
dnl Distinguish between old-style and new-style calls.
1088
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1089
AC_SUBST([PACKAGE], [$1])dnl
1090
AC_SUBST([VERSION], [$2])],
1091
[_AM_SET_OPTIONS([$1])dnl
1092
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1093
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1094
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1095
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1096
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1098
_AM_IF_OPTION([no-define],,
1099
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1100
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1102
# Some tools Automake needs.
1103
AC_REQUIRE([AM_SANITY_CHECK])dnl
1104
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1105
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1106
AM_MISSING_PROG(AUTOCONF, autoconf)
1107
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1108
AM_MISSING_PROG(AUTOHEADER, autoheader)
1109
AM_MISSING_PROG(MAKEINFO, makeinfo)
1110
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1111
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1112
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1113
# We need awk for the "check" target. The system "awk" is bad on
1115
AC_REQUIRE([AC_PROG_AWK])dnl
1116
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1117
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1118
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1119
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1120
[_AM_PROG_TAR([v7])])])
1121
_AM_IF_OPTION([no-dependencies],,
1122
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1123
[_AM_DEPENDENCIES(CC)],
1124
[define([AC_PROG_CC],
1125
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1126
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1127
[_AM_DEPENDENCIES(CXX)],
1128
[define([AC_PROG_CXX],
1129
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1130
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1131
[_AM_DEPENDENCIES(OBJC)],
1132
[define([AC_PROG_OBJC],
1133
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1135
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1136
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1137
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1138
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1139
AC_CONFIG_COMMANDS_PRE(dnl
1140
[m4_provide_if([_AM_COMPILER_EXEEXT],
1141
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1144
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1145
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1146
dnl mangled by Autoconf and run in a shell conditional statement.
1147
m4_define([_AC_COMPILER_EXEEXT],
1148
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1151
# When config.status generates a header, we must update the stamp-h file.
1152
# This file resides in the same directory as the config header
1153
# that is generated. The stamp files are numbered to have different names.
1155
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1156
# loop where config.status creates the headers, so we can generate
1157
# our stamp files there.
1158
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1159
[# Compute $1's index in $config_headers.
1162
for _am_header in $config_headers :; do
1164
$_am_arg | $_am_arg:* )
1167
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
1170
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1172
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1174
# This file is free software; the Free Software Foundation
1175
# gives unlimited permission to copy and/or distribute it,
1176
# with or without modifications, as long as this notice is preserved.
1178
# AM_PROG_INSTALL_SH
1179
# ------------------
1180
# Define $install_sh.
1181
AC_DEFUN([AM_PROG_INSTALL_SH],
1182
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1183
if test x"${install_sh}" != xset; then
1186
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1188
install_sh="\${SHELL} $am_aux_dir/install-sh"
1191
AC_SUBST(install_sh)])
1193
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1195
# This file is free software; the Free Software Foundation
1196
# gives unlimited permission to copy and/or distribute it,
1197
# with or without modifications, as long as this notice is preserved.
1201
# Check whether the underlying file-system supports filenames
1202
# with a leading dot. For instance MS-DOS doesn't.
1203
AC_DEFUN([AM_SET_LEADING_DOT],
1204
[rm -rf .tst 2>/dev/null
1205
mkdir .tst 2>/dev/null
1206
if test -d .tst; then
1211
rmdir .tst 2>/dev/null
1212
AC_SUBST([am__leading_dot])])
1214
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1217
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1218
# Free Software Foundation, Inc.
1220
# This file is free software; the Free Software Foundation
1221
# gives unlimited permission to copy and/or distribute it,
1222
# with or without modifications, as long as this notice is preserved.
1226
# AM_MAINTAINER_MODE([DEFAULT-MODE])
1227
# ----------------------------------
1228
# Control maintainer-specific portions of Makefiles.
1229
# Default is to disable them, unless `enable' is passed literally.
1230
# For symmetry, `disable' may be passed as well. Anyway, the user
1231
# can override the default with the --enable/--disable switch.
1232
AC_DEFUN([AM_MAINTAINER_MODE],
1233
[m4_case(m4_default([$1], [disable]),
1234
[enable], [m4_define([am_maintainer_other], [disable])],
1235
[disable], [m4_define([am_maintainer_other], [enable])],
1236
[m4_define([am_maintainer_other], [enable])
1237
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1238
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1239
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1240
AC_ARG_ENABLE([maintainer-mode],
1241
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
1242
(and sometimes confusing) to the casual installer],
1243
[USE_MAINTAINER_MODE=$enableval],
1244
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1245
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1246
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1247
MAINT=$MAINTAINER_MODE_TRUE
1248
AC_SUBST([MAINT])dnl
1252
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1254
# Check to see how 'make' treats includes. -*- Autoconf -*-
1256
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1258
# This file is free software; the Free Software Foundation
1259
# gives unlimited permission to copy and/or distribute it,
1260
# with or without modifications, as long as this notice is preserved.
1266
# Check to see how make treats includes.
1267
AC_DEFUN([AM_MAKE_INCLUDE],
1268
[am_make=${MAKE-make}
1269
cat > confinc << 'END'
1271
@echo this is the am__doit target
1274
# If we don't find an include directive, just comment out the code.
1275
AC_MSG_CHECKING([for style of include used by $am_make])
1279
# First try GNU make style include.
1280
echo "include confinc" > confmf
1281
# Ignore all kinds of additional output from `make'.
1282
case `$am_make -s -f confmf 2> /dev/null` in #(
1283
*the\ am__doit\ target*)
1289
# Now try BSD make style include.
1290
if test "$am__include" = "#"; then
1291
echo '.include "confinc"' > confmf
1292
case `$am_make -s -f confmf 2> /dev/null` in #(
1293
*the\ am__doit\ target*)
1294
am__include=.include
1300
AC_SUBST([am__include])
1301
AC_SUBST([am__quote])
1302
AC_MSG_RESULT([$_am_result])
1303
rm -f confinc confmf
1306
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1307
# Free Software Foundation, Inc.
1309
# This file is free software; the Free Software Foundation
1310
# gives unlimited permission to copy and/or distribute it,
1311
# with or without modifications, as long as this notice is preserved.
1317
# Like AC_PROG_CC_C_O, but changed for automake.
1318
AC_DEFUN([AM_PROG_CC_C_O],
1319
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
1320
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1321
AC_REQUIRE_AUX_FILE([compile])dnl
1322
# FIXME: we rely on the cache variable name because
1323
# there is no other way.
1325
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1326
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1327
if test "$am_t" != yes; then
1328
# Losing compiler, so override with the script.
1329
# FIXME: It is wrong to rewrite CC.
1330
# But if we don't then we get into trouble of one sort or another.
1331
# A longer-term fix would be to have automake use am__CC in this case,
1332
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1333
CC="$am_aux_dir/compile $CC"
1335
dnl Make sure AC_PROG_CC is never called again, or it will override our
1337
m4_define([AC_PROG_CC],
1338
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1341
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1343
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1344
# Free Software Foundation, Inc.
1346
# This file is free software; the Free Software Foundation
1347
# gives unlimited permission to copy and/or distribute it,
1348
# with or without modifications, as long as this notice is preserved.
1352
# AM_MISSING_PROG(NAME, PROGRAM)
1353
# ------------------------------
1354
AC_DEFUN([AM_MISSING_PROG],
1355
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1356
$1=${$1-"${am_missing_run}$2"}
1360
# AM_MISSING_HAS_RUN
1361
# ------------------
1362
# Define MISSING if not defined so far and test if it supports --run.
1363
# If it does, set am_missing_run to use it, otherwise, to nothing.
1364
AC_DEFUN([AM_MISSING_HAS_RUN],
1365
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1366
AC_REQUIRE_AUX_FILE([missing])dnl
1367
if test x"${MISSING+set}" != xset; then
1370
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1372
MISSING="\${SHELL} $am_aux_dir/missing" ;;
1375
# Use eval to expand $SHELL
1376
if eval "$MISSING --run true"; then
1377
am_missing_run="$MISSING --run "
1380
AC_MSG_WARN([`missing' script is too old or missing])
1384
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1386
# This file is free software; the Free Software Foundation
1387
# gives unlimited permission to copy and/or distribute it,
1388
# with or without modifications, as long as this notice is preserved.
1392
# Check for `mkdir -p'.
1393
AC_DEFUN([AM_PROG_MKDIR_P],
1394
[AC_PREREQ([2.60])dnl
1395
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1396
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1397
dnl while keeping a definition of mkdir_p for backward compatibility.
1398
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1399
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1400
dnl Makefile.ins that do not define MKDIR_P, so we do our own
1401
dnl adjustment using top_builddir (which is defined more often than
1403
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1405
[[\\/$]]* | ?:[[\\/]]*) ;;
1406
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1410
# Helper functions for option handling. -*- Autoconf -*-
1412
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
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.
1420
# _AM_MANGLE_OPTION(NAME)
1421
# -----------------------
1422
AC_DEFUN([_AM_MANGLE_OPTION],
1423
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1425
# _AM_SET_OPTION(NAME)
1426
# ------------------------------
1427
# Set option NAME. Presently that only means defining a flag for this option.
1428
AC_DEFUN([_AM_SET_OPTION],
1429
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1431
# _AM_SET_OPTIONS(OPTIONS)
1432
# ----------------------------------
1433
# OPTIONS is a space-separated list of Automake options.
1434
AC_DEFUN([_AM_SET_OPTIONS],
1435
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1437
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1438
# -------------------------------------------
1439
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1440
AC_DEFUN([_AM_IF_OPTION],
1441
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1443
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1445
# This file is free software; the Free Software Foundation
1446
# gives unlimited permission to copy and/or distribute it,
1447
# with or without modifications, as long as this notice is preserved.
1449
# AM_RUN_LOG(COMMAND)
1450
# -------------------
1451
# Run COMMAND, save the exit status in ac_status, and log it.
1452
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1453
AC_DEFUN([AM_RUN_LOG],
1454
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1455
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1457
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1458
(exit $ac_status); }])
1460
# Check to make sure that the build environment is sane. -*- Autoconf -*-
1462
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1463
# Free Software Foundation, Inc.
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.
1473
AC_DEFUN([AM_SANITY_CHECK],
1474
[AC_MSG_CHECKING([whether build environment is sane])
1477
echo timestamp > conftest.file
1478
# Reject unsafe characters in $srcdir or the absolute working directory
1479
# name. Accept space and tab only in the latter.
1483
*[[\\\"\#\$\&\'\`$am_lf]]*)
1484
AC_MSG_ERROR([unsafe absolute working directory name]);;
1487
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1488
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1491
# Do `set' in a subshell so we don't clobber the current shell's
1492
# arguments. Must try -L first in case configure is actually a
1493
# symlink; some systems play weird games with the mod time of symlinks
1494
# (eg FreeBSD returns the mod time of the symlink's containing
1497
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1498
if test "$[*]" = "X"; then
1500
set X `ls -t "$srcdir/configure" conftest.file`
1503
if test "$[*]" != "X $srcdir/configure conftest.file" \
1504
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1506
# If neither matched, then we have a broken ls. This can happen
1507
# if, for instance, CONFIG_SHELL is bash and it inherits a
1508
# broken ls alias from the environment. This has actually
1509
# happened. Such a system could not be considered "sane".
1510
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1511
alias in your environment])
1514
test "$[2]" = conftest.file
1520
AC_MSG_ERROR([newly created file is older than distributed files!
1521
Check your system clock])
1523
AC_MSG_RESULT(yes)])
1525
# Copyright (C) 2009 Free Software Foundation, Inc.
1527
# This file is free software; the Free Software Foundation
1528
# gives unlimited permission to copy and/or distribute it,
1529
# with or without modifications, as long as this notice is preserved.
1533
# AM_SILENT_RULES([DEFAULT])
1534
# --------------------------
1535
# Enable less verbose build rules; with the default set to DEFAULT
1536
# (`yes' being less verbose, `no' or empty being verbose).
1537
AC_DEFUN([AM_SILENT_RULES],
1538
[AC_ARG_ENABLE([silent-rules],
1539
[ --enable-silent-rules less verbose build output (undo: `make V=1')
1540
--disable-silent-rules verbose build output (undo: `make V=0')])
1541
case $enable_silent_rules in
1542
yes) AM_DEFAULT_VERBOSITY=0;;
1543
no) AM_DEFAULT_VERBOSITY=1;;
1544
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1546
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1548
AC_SUBST([AM_BACKSLASH])dnl
1549
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1552
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1554
# This file is free software; the Free Software Foundation
1555
# gives unlimited permission to copy and/or distribute it,
1556
# with or without modifications, as long as this notice is preserved.
1558
# AM_PROG_INSTALL_STRIP
1559
# ---------------------
1560
# One issue with vendor `install' (even GNU) is that you can't
1561
# specify the program used to strip binaries. This is especially
1562
# annoying in cross-compiling environments, where the build's strip
1563
# is unlikely to handle the host's binaries.
1564
# Fortunately install-sh will honor a STRIPPROG variable, so we
1565
# always use install-sh in `make install-strip', and initialize
1566
# STRIPPROG with the value of the STRIP variable (set by the user).
1567
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1568
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1569
# Installed binaries are usually stripped using `strip' when the user
1570
# run `make install-strip'. However `strip' might not be the right
1571
# tool to use in cross-compilation environments, therefore Automake
1572
# will honor the `STRIP' environment variable to overrule this program.
1573
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1574
if test "$cross_compiling" != no; then
1575
AC_CHECK_TOOL([STRIP], [strip], :)
1577
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1578
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1580
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1582
# This file is free software; the Free Software Foundation
1583
# gives unlimited permission to copy and/or distribute it,
1584
# with or without modifications, as long as this notice is preserved.
1588
# _AM_SUBST_NOTMAKE(VARIABLE)
1589
# ---------------------------
1590
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1591
# This macro is traced by Automake.
1592
AC_DEFUN([_AM_SUBST_NOTMAKE])
1594
# AM_SUBST_NOTMAKE(VARIABLE)
1595
# ---------------------------
1596
# Public sister of _AM_SUBST_NOTMAKE.
1597
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1599
# Check how to create a tarball. -*- Autoconf -*-
1601
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1603
# This file is free software; the Free Software Foundation
1604
# gives unlimited permission to copy and/or distribute it,
1605
# with or without modifications, as long as this notice is preserved.
1609
# _AM_PROG_TAR(FORMAT)
1610
# --------------------
1611
# Check how to create a tarball in format FORMAT.
1612
# FORMAT should be one of `v7', `ustar', or `pax'.
1614
# Substitute a variable $(am__tar) that is a command
1615
# writing to stdout a FORMAT-tarball containing the directory
1617
# tardir=directory && $(am__tar) > result.tar
1619
# Substitute a variable $(am__untar) that extract such
1620
# a tarball read from stdin.
1621
# $(am__untar) < result.tar
1622
AC_DEFUN([_AM_PROG_TAR],
1623
[# Always define AMTAR for backward compatibility.
1624
AM_MISSING_PROG([AMTAR], [tar])
1626
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1627
[m4_case([$1], [ustar],, [pax],,
1628
[m4_fatal([Unknown tar format])])
1629
AC_MSG_CHECKING([how to create a $1 tar archive])
1630
# Loop over all known methods to create a tar archive until one works.
1631
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1632
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1633
# Do not fold the above two line into one, because Tru64 sh and
1634
# Solaris sh will not grok spaces in the rhs of `-'.
1635
for _am_tool in $_am_tools
1639
for _am_tar in tar gnutar gtar;
1641
AM_RUN_LOG([$_am_tar --version]) && break
1643
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1644
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1645
am__untar="$_am_tar -xf -"
1648
# Must skip GNU tar: if it does not support --format= it doesn't create
1649
# ustar tarball either.
1650
(tar --version) >/dev/null 2>&1 && continue
1651
am__tar='tar chf - "$$tardir"'
1652
am__tar_='tar chf - "$tardir"'
1653
am__untar='tar xf -'
1656
am__tar='pax -L -x $1 -w "$$tardir"'
1657
am__tar_='pax -L -x $1 -w "$tardir"'
1661
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1662
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1663
am__untar='cpio -i -H $1 -d'
1672
# If the value was cached, stop now. We just wanted to have am__tar
1673
# and am__untar set.
1674
test -n "${am_cv_prog_tar_$1}" && break
1676
# tar/untar a dummy directory, and stop if the command works
1679
echo GrepMe > conftest.dir/file
1680
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1682
if test -s conftest.tar; then
1683
AM_RUN_LOG([$am__untar <conftest.tar])
1684
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1689
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1690
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1692
AC_SUBST([am__untar])
1695
m4_include([m4/compiler_warnings.m4])
1696
m4_include([m4/intltool.m4])
1697
m4_include([m4/libtool.m4])
1698
m4_include([m4/ltoptions.m4])
1699
m4_include([m4/ltsugar.m4])
1700
m4_include([m4/ltversion.m4])
1701
m4_include([m4/lt~obsolete.m4])