11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
14
# Do all the work for Automake. -*- Autoconf -*-
16
# This macro actually does too much some checks are only needed if
17
# your package does certain things. But this isn't really a big deal.
19
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
20
# Free Software Foundation, Inc.
22
# This program is free software; you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
24
# the Free Software Foundation; either version 2, or (at your option)
27
# This program is distributed in the hope that it will be useful,
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
# GNU General Public License for more details.
32
# You should have received a copy of the GNU General Public License
33
# along with this program; if not, write to the Free Software
34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
39
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
40
# written in clear, in which case automake, when reading aclocal.m4,
41
# will think it sees a *use*, and therefore will trigger all it's
42
# C support machinery. Also note that it means that autoscan, seeing
43
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
48
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
49
# the ones we care about.
50
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
52
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
53
# AM_INIT_AUTOMAKE([OPTIONS])
54
# -----------------------------------------------
55
# The call with PACKAGE and VERSION arguments is the old style
56
# call (pre autoconf-2.50), which is being phased out. PACKAGE
57
# and VERSION should now be passed to AC_INIT and removed from
58
# the call to AM_INIT_AUTOMAKE.
59
# We support both call styles for the transition. After
60
# the next Automake release, Autoconf can make the AC_INIT
61
# arguments mandatory, and then we can depend on a new Autoconf
62
# release and drop the old call support.
63
AC_DEFUN([AM_INIT_AUTOMAKE],
64
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
65
AC_REQUIRE([AC_PROG_INSTALL])dnl
66
# test to see if srcdir already configured
67
if test "`cd $srcdir && pwd`" != "`pwd`" &&
68
test -f $srcdir/config.status; then
69
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
72
# Define the identity of the package.
73
dnl Distinguish between old-style and new-style calls.
75
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
76
AC_SUBST([PACKAGE], [$1])dnl
77
AC_SUBST([VERSION], [$2])],
78
[_AM_SET_OPTIONS([$1])dnl
79
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
80
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
82
_AM_IF_OPTION([no-define],,
83
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
84
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
86
# Some tools Automake needs.
87
AC_REQUIRE([AM_SANITY_CHECK])dnl
88
AC_REQUIRE([AC_ARG_PROGRAM])dnl
89
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
90
AM_MISSING_PROG(AUTOCONF, autoconf)
91
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
92
AM_MISSING_PROG(AUTOHEADER, autoheader)
93
AM_MISSING_PROG(MAKEINFO, makeinfo)
94
AM_MISSING_PROG(AMTAR, tar)
97
# We need awk for the "check" target. The system "awk" is bad on
99
AC_REQUIRE([AC_PROG_AWK])dnl
100
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
102
_AM_IF_OPTION([no-dependencies],,
103
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
104
[_AM_DEPENDENCIES(CC)],
105
[define([AC_PROG_][CC],
106
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
107
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
108
[_AM_DEPENDENCIES(CXX)],
109
[define([AC_PROG_][CXX],
110
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
114
# Copyright 2002 Free Software Foundation, Inc.
116
# This program is free software; you can redistribute it and/or modify
117
# it under the terms of the GNU General Public License as published by
118
# the Free Software Foundation; either version 2, or (at your option)
121
# This program is distributed in the hope that it will be useful,
122
# but WITHOUT ANY WARRANTY; without even the implied warranty of
123
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
124
# GNU General Public License for more details.
126
# You should have received a copy of the GNU General Public License
127
# along with this program; if not, write to the Free Software
128
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
130
# AM_AUTOMAKE_VERSION(VERSION)
131
# ----------------------------
132
# Automake X.Y traces this macro to ensure aclocal.m4 has been
133
# generated from the m4 files accompanying Automake X.Y.
134
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
136
# AM_SET_CURRENT_AUTOMAKE_VERSION
137
# -------------------------------
138
# Call AM_AUTOMAKE_VERSION so it can be traced.
139
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
140
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
141
[AM_AUTOMAKE_VERSION([1.6.3])])
143
# Helper functions for option handling. -*- Autoconf -*-
145
# Copyright 2001, 2002 Free Software Foundation, Inc.
147
# This program is free software; you can redistribute it and/or modify
148
# it under the terms of the GNU General Public License as published by
149
# the Free Software Foundation; either version 2, or (at your option)
152
# This program is distributed in the hope that it will be useful,
153
# but WITHOUT ANY WARRANTY; without even the implied warranty of
154
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
155
# GNU General Public License for more details.
157
# You should have received a copy of the GNU General Public License
158
# along with this program; if not, write to the Free Software
159
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
164
# _AM_MANGLE_OPTION(NAME)
165
# -----------------------
166
AC_DEFUN([_AM_MANGLE_OPTION],
167
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
169
# _AM_SET_OPTION(NAME)
170
# ------------------------------
171
# Set option NAME. Presently that only means defining a flag for this option.
172
AC_DEFUN([_AM_SET_OPTION],
173
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
175
# _AM_SET_OPTIONS(OPTIONS)
176
# ----------------------------------
177
# OPTIONS is a space-separated list of Automake options.
178
AC_DEFUN([_AM_SET_OPTIONS],
179
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
181
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
182
# -------------------------------------------
183
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
184
AC_DEFUN([_AM_IF_OPTION],
185
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
188
# Check to make sure that the build environment is sane.
191
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
193
# This program is free software; you can redistribute it and/or modify
194
# it under the terms of the GNU General Public License as published by
195
# the Free Software Foundation; either version 2, or (at your option)
198
# This program is distributed in the hope that it will be useful,
199
# but WITHOUT ANY WARRANTY; without even the implied warranty of
200
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
201
# GNU General Public License for more details.
203
# You should have received a copy of the GNU General Public License
204
# along with this program; if not, write to the Free Software
205
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
212
AC_DEFUN([AM_SANITY_CHECK],
213
[AC_MSG_CHECKING([whether build environment is sane])
216
echo timestamp > conftest.file
217
# Do `set' in a subshell so we don't clobber the current shell's
218
# arguments. Must try -L first in case configure is actually a
219
# symlink; some systems play weird games with the mod time of symlinks
220
# (eg FreeBSD returns the mod time of the symlink's containing
223
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
224
if test "$[*]" = "X"; then
226
set X `ls -t $srcdir/configure conftest.file`
229
if test "$[*]" != "X $srcdir/configure conftest.file" \
230
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
232
# If neither matched, then we have a broken ls. This can happen
233
# if, for instance, CONFIG_SHELL is bash and it inherits a
234
# broken ls alias from the environment. This has actually
235
# happened. Such a system could not be considered "sane".
236
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
237
alias in your environment])
240
test "$[2]" = conftest.file
246
AC_MSG_ERROR([newly created file is older than distributed files!
247
Check your system clock])
254
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
256
# This program is free software; you can redistribute it and/or modify
257
# it under the terms of the GNU General Public License as published by
258
# the Free Software Foundation; either version 2, or (at your option)
261
# This program is distributed in the hope that it will be useful,
262
# but WITHOUT ANY WARRANTY; without even the implied warranty of
263
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
264
# GNU General Public License for more details.
266
# You should have received a copy of the GNU General Public License
267
# along with this program; if not, write to the Free Software
268
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
273
# AM_MISSING_PROG(NAME, PROGRAM)
274
# ------------------------------
275
AC_DEFUN([AM_MISSING_PROG],
276
[AC_REQUIRE([AM_MISSING_HAS_RUN])
277
$1=${$1-"${am_missing_run}$2"}
283
# Define MISSING if not defined so far and test if it supports --run.
284
# If it does, set am_missing_run to use it, otherwise, to nothing.
285
AC_DEFUN([AM_MISSING_HAS_RUN],
286
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
287
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
288
# Use eval to expand $SHELL
289
if eval "$MISSING --run true"; then
290
am_missing_run="$MISSING --run "
293
AC_MSG_WARN([`missing' script is too old or missing])
299
# Copyright 2001 Free Software Foundation, Inc.
301
# This program is free software; you can redistribute it and/or modify
302
# it under the terms of the GNU General Public License as published by
303
# the Free Software Foundation; either version 2, or (at your option)
306
# This program is distributed in the hope that it will be useful,
307
# but WITHOUT ANY WARRANTY; without even the implied warranty of
308
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
309
# GNU General Public License for more details.
311
# You should have received a copy of the GNU General Public License
312
# along with this program; if not, write to the Free Software
313
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
316
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
317
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
318
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
320
# Of course, Automake must honor this variable whenever it calls a
321
# tool from the auxiliary directory. The problem is that $srcdir (and
322
# therefore $ac_aux_dir as well) can be either absolute or relative,
323
# depending on how configure is run. This is pretty annoying, since
324
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
325
# source directory, any form will work fine, but in subdirectories a
326
# relative path needs to be adjusted first.
328
# $ac_aux_dir/missing
329
# fails when called from a subdirectory if $ac_aux_dir is relative
330
# $top_srcdir/$ac_aux_dir/missing
331
# fails if $ac_aux_dir is absolute,
332
# fails when called from a subdirectory in a VPATH build with
333
# a relative $ac_aux_dir
335
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
336
# are both prefixed by $srcdir. In an in-source build this is usually
337
# harmless because $srcdir is `.', but things will broke when you
338
# start a VPATH build or use an absolute $srcdir.
340
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
341
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
342
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
343
# and then we would define $MISSING as
344
# MISSING="\${SHELL} $am_aux_dir/missing"
345
# This will work as long as MISSING is not called from configure, because
346
# unfortunately $(top_srcdir) has no meaning in configure.
347
# However there are other variables, like CC, which are often used in
348
# configure, and could therefore not use this "fixed" $ac_aux_dir.
350
# Another solution, used here, is to always expand $ac_aux_dir to an
351
# absolute PATH. The drawback is that using absolute paths prevent a
352
# configured tree to be moved without reconfiguration.
354
# Rely on autoconf to set up CDPATH properly.
357
AC_DEFUN([AM_AUX_DIR_EXPAND], [
358
# expand $ac_aux_dir to an absolute path
359
am_aux_dir=`cd $ac_aux_dir && pwd`
364
# Define $install_sh.
366
# Copyright 2001 Free Software Foundation, Inc.
368
# This program is free software; you can redistribute it and/or modify
369
# it under the terms of the GNU General Public License as published by
370
# the Free Software Foundation; either version 2, or (at your option)
373
# This program is distributed in the hope that it will be useful,
374
# but WITHOUT ANY WARRANTY; without even the implied warranty of
375
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376
# GNU General Public License for more details.
378
# You should have received a copy of the GNU General Public License
379
# along with this program; if not, write to the Free Software
380
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
383
AC_DEFUN([AM_PROG_INSTALL_SH],
384
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
385
install_sh=${install_sh-"$am_aux_dir/install-sh"}
386
AC_SUBST(install_sh)])
388
# AM_PROG_INSTALL_STRIP
390
# Copyright 2001 Free Software Foundation, Inc.
392
# This program is free software; you can redistribute it and/or modify
393
# it under the terms of the GNU General Public License as published by
394
# the Free Software Foundation; either version 2, or (at your option)
397
# This program is distributed in the hope that it will be useful,
398
# but WITHOUT ANY WARRANTY; without even the implied warranty of
399
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
400
# GNU General Public License for more details.
402
# You should have received a copy of the GNU General Public License
403
# along with this program; if not, write to the Free Software
404
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
407
# One issue with vendor `install' (even GNU) is that you can't
408
# specify the program used to strip binaries. This is especially
409
# annoying in cross-compiling environments, where the build's strip
410
# is unlikely to handle the host's binaries.
411
# Fortunately install-sh will honor a STRIPPROG variable, so we
412
# always use install-sh in `make install-strip', and initialize
413
# STRIPPROG with the value of the STRIP variable (set by the user).
414
AC_DEFUN([AM_PROG_INSTALL_STRIP],
415
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
416
# Installed binaries are usually stripped using `strip' when the user
417
# run `make install-strip'. However `strip' might not be the right
418
# tool to use in cross-compilation environments, therefore Automake
419
# will honor the `STRIP' environment variable to overrule this program.
420
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
421
if test "$cross_compiling" != no; then
422
AC_CHECK_TOOL([STRIP], [strip], :)
424
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
425
AC_SUBST([INSTALL_STRIP_PROGRAM])])
427
# serial 4 -*- Autoconf -*-
429
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
431
# This program is free software; you can redistribute it and/or modify
432
# it under the terms of the GNU General Public License as published by
433
# the Free Software Foundation; either version 2, or (at your option)
436
# This program is distributed in the hope that it will be useful,
437
# but WITHOUT ANY WARRANTY; without even the implied warranty of
438
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
439
# GNU General Public License for more details.
441
# You should have received a copy of the GNU General Public License
442
# along with this program; if not, write to the Free Software
443
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
447
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
448
# written in clear, in which case automake, when reading aclocal.m4,
449
# will think it sees a *use*, and therefore will trigger all it's
450
# C support machinery. Also note that it means that autoscan, seeing
451
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
455
# _AM_DEPENDENCIES(NAME)
456
# ----------------------
457
# See how the compiler implements dependency checking.
458
# NAME is "CC", "CXX", "GCJ", or "OBJC".
459
# We try a few techniques and use that to set a single cache variable.
461
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
462
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
463
# dependency, and given that the user is not expected to run this macro,
464
# just rely on AC_PROG_CC.
465
AC_DEFUN([_AM_DEPENDENCIES],
466
[AC_REQUIRE([AM_SET_DEPDIR])dnl
467
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
468
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
469
AC_REQUIRE([AM_DEP_TRACK])dnl
471
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
472
[$1], CXX, [depcc="$CXX" am_compiler_list=],
473
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
474
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
475
[depcc="$$1" am_compiler_list=])
477
AC_CACHE_CHECK([dependency style of $depcc],
478
[am_cv_$1_dependencies_compiler_type],
479
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
480
# We make a subdir and do the tests there. Otherwise we can end up
481
# making bogus files that we don't know about and never remove. For
482
# instance it was reported that on HP-UX the gcc test will end up
483
# making a dummy file named `D' -- because `-MD' means `put the output
486
# Copy depcomp to subdir because otherwise we won't find it if we're
487
# using a relative directory.
488
cp "$am_depcomp" conftest.dir
491
am_cv_$1_dependencies_compiler_type=none
492
if test "$am_compiler_list" = ""; then
493
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
495
for depmode in $am_compiler_list; do
496
# We need to recreate these files for each test, as the compiler may
497
# overwrite some of them when testing with obscure command lines.
498
# This happens at least with the AIX C compiler.
499
echo '#include "conftest.h"' > conftest.c
500
echo 'int i;' > conftest.h
501
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
505
# after this tag, mechanisms are not by side-effect, so they'll
506
# only be used when explicitly requested
507
if test "x$enable_dependency_tracking" = xyes; then
515
# We check with `-c' and `-o' for the sake of the "dashmstdout"
516
# mode. It turns out that the SunPro C++ compiler does not properly
517
# handle `-M -o', and we need to detect this.
518
if depmode=$depmode \
519
source=conftest.c object=conftest.o \
520
depfile=conftest.Po tmpdepfile=conftest.TPo \
521
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
522
grep conftest.h conftest.Po > /dev/null 2>&1 &&
523
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
524
am_cv_$1_dependencies_compiler_type=$depmode
532
am_cv_$1_dependencies_compiler_type=none
535
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
541
# Choose a directory name for dependency files.
542
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
543
AC_DEFUN([AM_SET_DEPDIR],
544
[rm -f .deps 2>/dev/null
545
mkdir .deps 2>/dev/null
546
if test -d .deps; then
549
# MS-DOS does not allow filenames that begin with a dot.
552
rmdir .deps 2>/dev/null
559
AC_DEFUN([AM_DEP_TRACK],
560
[AC_ARG_ENABLE(dependency-tracking,
561
[ --disable-dependency-tracking Speeds up one-time builds
562
--enable-dependency-tracking Do not reject slow dependency extractors])
563
if test "x$enable_dependency_tracking" != xno; then
564
am_depcomp="$ac_aux_dir/depcomp"
567
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
568
AC_SUBST([AMDEPBACKSLASH])
571
# Generate code to set up dependency tracking. -*- Autoconf -*-
573
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
575
# This program is free software; you can redistribute it and/or modify
576
# it under the terms of the GNU General Public License as published by
577
# the Free Software Foundation; either version 2, or (at your option)
580
# This program is distributed in the hope that it will be useful,
581
# but WITHOUT ANY WARRANTY; without even the implied warranty of
582
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
583
# GNU General Public License for more details.
585
# You should have received a copy of the GNU General Public License
586
# along with this program; if not, write to the Free Software
587
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
592
# _AM_OUTPUT_DEPENDENCY_COMMANDS
593
# ------------------------------
594
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
595
[for mf in $CONFIG_FILES; do
596
# Strip MF so we end up with the name of the file.
597
mf=`echo "$mf" | sed -e 's/:.*$//'`
598
# Check whether this is an Automake generated Makefile or not.
599
# We used to match only the files named `Makefile.in', but
600
# some people rename them; so instead we look at the file content.
601
# Grep'ing the first line is not enough: some people post-process
602
# each Makefile.in and add a new line on top of each file to say so.
603
# So let's grep whole file.
604
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
605
dirpart=`AS_DIRNAME("$mf")`
609
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
610
# Extract the definition of DEP_FILES from the Makefile without
612
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
613
test -z "$DEPDIR" && continue
614
# When using ansi2knr, U may be empty or an underscore; expand it
615
U=`sed -n -e '/^U = / s///p' < "$mf"`
616
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
617
# We invoke sed twice because it is the simplest approach to
618
# changing $(DEPDIR) to its actual value in the expansion.
619
for file in `sed -n -e '
620
/^DEP_FILES = .*\\\\$/ {
629
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
630
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
631
# Make sure the directory exists.
632
test -f "$dirpart/$file" && continue
633
fdir=`AS_DIRNAME(["$file"])`
634
AS_MKDIR_P([$dirpart/$fdir])
635
# echo "creating $dirpart/$file"
636
echo '# dummy' > "$dirpart/$file"
639
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
642
# AM_OUTPUT_DEPENDENCY_COMMANDS
643
# -----------------------------
644
# This macro should only be invoked once -- use via AC_REQUIRE.
646
# This code is only required when automatic dependency tracking
647
# is enabled. FIXME. This creates each `.P' file that we will
648
# need in order to bootstrap the dependency handling code.
649
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
650
[AC_CONFIG_COMMANDS([depfiles],
651
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
652
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
655
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
657
# This program is free software; you can redistribute it and/or modify
658
# it under the terms of the GNU General Public License as published by
659
# the Free Software Foundation; either version 2, or (at your option)
662
# This program is distributed in the hope that it will be useful,
663
# but WITHOUT ANY WARRANTY; without even the implied warranty of
664
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
665
# GNU General Public License for more details.
667
# You should have received a copy of the GNU General Public License
668
# along with this program; if not, write to the Free Software
669
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
676
# Check to see how make treats includes.
677
AC_DEFUN([AM_MAKE_INCLUDE],
678
[am_make=${MAKE-make}
679
cat > confinc << 'END'
683
# If we don't find an include directive, just comment out the code.
684
AC_MSG_CHECKING([for style of include used by $am_make])
688
# First try GNU make style include.
689
echo "include confinc" > confmf
690
# We grep out `Entering directory' and `Leaving directory'
691
# messages which can occur if `w' ends up in MAKEFLAGS.
692
# In particular we don't look at `^make:' because GNU make might
693
# be invoked under some other name (usually "gmake"), in which
694
# case it prints its new name instead of `make'.
695
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
700
# Now try BSD make style include.
701
if test "$am__include" = "#"; then
702
echo '.include "confinc"' > confmf
703
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
709
AC_SUBST(am__include)
711
AC_MSG_RESULT($_am_result)
715
# AM_CONDITIONAL -*- Autoconf -*-
717
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
719
# This program is free software; you can redistribute it and/or modify
720
# it under the terms of the GNU General Public License as published by
721
# the Free Software Foundation; either version 2, or (at your option)
724
# This program is distributed in the hope that it will be useful,
725
# but WITHOUT ANY WARRANTY; without even the implied warranty of
726
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
727
# GNU General Public License for more details.
729
# You should have received a copy of the GNU General Public License
730
# along with this program; if not, write to the Free Software
731
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
738
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
739
# -------------------------------------
740
# Define a conditional.
741
AC_DEFUN([AM_CONDITIONAL],
742
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
743
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
753
AC_CONFIG_COMMANDS_PRE(
754
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
755
AC_MSG_ERROR([conditional \"$1\" was never defined.
756
Usually this means the macro was only invoked conditionally.])
759
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
761
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
763
# This program is free software; you can redistribute it and/or modify
764
# it under the terms of the GNU General Public License as published by
765
# the Free Software Foundation; either version 2, or (at your option)
768
# This program is distributed in the hope that it will be useful,
769
# but WITHOUT ANY WARRANTY; without even the implied warranty of
770
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
771
# GNU General Public License for more details.
773
# You should have received a copy of the GNU General Public License
774
# along with this program; if not, write to the Free Software
775
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
782
# When config.status generates a header, we must update the stamp-h file.
783
# This file resides in the same directory as the config header
784
# that is generated. We must strip everything past the first ":",
785
# and everything past the last "/".
789
# Like AS_DIRNAME, only do it during macro expansion
790
AC_DEFUN([_AM_DIRNAME],
791
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
792
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
793
m4_if(regexp([$1], [^/.*]), -1,
795
patsubst([$1], [^\(/\).*], [\1])),
796
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
797
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
801
# The stamp files are numbered to have different names.
802
# We could number them on a directory basis, but that's additional
803
# complications, let's have a unique counter.
804
m4_define([_AM_STAMP_Count], [0])
809
# The name of the stamp file for HEADER.
810
AC_DEFUN([_AM_STAMP],
811
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
812
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
813
[:.*])))/stamp-h[]_AM_STAMP_Count])
816
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
817
# ------------------------------------------------------------
818
# We used to try to get a real timestamp in stamp-h. But the fear is that
819
# that will cause unnecessary cvs conflicts.
820
AC_DEFUN([_AM_CONFIG_HEADER],
821
[# Add the stamp file to the list of files AC keeps track of,
822
# along with our hook.
823
AC_CONFIG_HEADERS([$1],
824
[# update the timestamp
825
echo 'timestamp for $1' >"_AM_STAMP([$1])"
828
])# _AM_CONFIG_HEADER
831
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
832
# --------------------------------------------------------------
833
AC_DEFUN([AM_CONFIG_HEADER],
834
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
14
837
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
16
# serial 47 AC_PROG_LIBTOOL
839
# serial 48 AC_PROG_LIBTOOL
19
842
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5934
7210
SED=$lt_cv_path_SED
5936
7211
AC_MSG_RESULT([$SED])
5940
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
5941
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
5942
dnl also defines GSTUFF_PKG_ERRORS on error
5943
AC_DEFUN([PKG_CHECK_MODULES], [
5946
if test -z "$PKG_CONFIG"; then
5947
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
5950
if test "$PKG_CONFIG" = "no" ; then
5951
echo "*** The pkg-config script could not be found. Make sure it is"
5952
echo "*** in your path, or set the PKG_CONFIG environment variable"
5953
echo "*** to the full path to pkg-config."
5954
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
5956
PKG_CONFIG_MIN_VERSION=0.9.0
5957
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5958
AC_MSG_CHECKING(for $2)
5960
if $PKG_CONFIG --exists "$2" ; then
5964
AC_MSG_CHECKING($1_CFLAGS)
5965
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
5966
AC_MSG_RESULT($$1_CFLAGS)
5968
AC_MSG_CHECKING($1_LIBS)
5969
$1_LIBS=`$PKG_CONFIG --libs "$2"`
5970
AC_MSG_RESULT($$1_LIBS)
5974
## If we have a custom action on failure, don't print errors, but
5975
## do set a variable so people can do so.
5976
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
5977
ifelse([$4], ,echo $$1_PKG_ERRORS,)
5983
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5984
echo "*** See http://www.freedesktop.org/software/pkgconfig"
5988
if test $succeeded = yes; then
5989
ifelse([$3], , :, [$3])
5991
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
5998
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
5999
# Generated from amversion.in; do not edit by hand.
6001
# This program is free software; you can redistribute it and/or modify
6002
# it under the terms of the GNU General Public License as published by
6003
# the Free Software Foundation; either version 2, or (at your option)
6004
# any later version.
6006
# This program is distributed in the hope that it will be useful,
6007
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6008
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6009
# GNU General Public License for more details.
6011
# You should have received a copy of the GNU General Public License
6012
# along with this program; if not, write to the Free Software
6013
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6015
# AM_AUTOMAKE_VERSION(VERSION)
6016
# ----------------------------
6017
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6018
# generated from the m4 files accompanying Automake X.Y.
6019
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6021
# AM_SET_CURRENT_AUTOMAKE_VERSION
6022
# -------------------------------
6023
# Call AM_AUTOMAKE_VERSION so it can be traced.
6024
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6025
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6026
[AM_AUTOMAKE_VERSION([1.9.2])])
6030
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6032
# This program is free software; you can redistribute it and/or modify
6033
# it under the terms of the GNU General Public License as published by
6034
# the Free Software Foundation; either version 2, or (at your option)
6035
# any later version.
6037
# This program is distributed in the hope that it will be useful,
6038
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6039
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6040
# GNU General Public License for more details.
6042
# You should have received a copy of the GNU General Public License
6043
# along with this program; if not, write to the Free Software
6044
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6047
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6048
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6049
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6051
# Of course, Automake must honor this variable whenever it calls a
6052
# tool from the auxiliary directory. The problem is that $srcdir (and
6053
# therefore $ac_aux_dir as well) can be either absolute or relative,
6054
# depending on how configure is run. This is pretty annoying, since
6055
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6056
# source directory, any form will work fine, but in subdirectories a
6057
# relative path needs to be adjusted first.
6059
# $ac_aux_dir/missing
6060
# fails when called from a subdirectory if $ac_aux_dir is relative
6061
# $top_srcdir/$ac_aux_dir/missing
6062
# fails if $ac_aux_dir is absolute,
6063
# fails when called from a subdirectory in a VPATH build with
6064
# a relative $ac_aux_dir
6066
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6067
# are both prefixed by $srcdir. In an in-source build this is usually
6068
# harmless because $srcdir is `.', but things will broke when you
6069
# start a VPATH build or use an absolute $srcdir.
6071
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6072
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6073
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6074
# and then we would define $MISSING as
6075
# MISSING="\${SHELL} $am_aux_dir/missing"
6076
# This will work as long as MISSING is not called from configure, because
6077
# unfortunately $(top_srcdir) has no meaning in configure.
6078
# However there are other variables, like CC, which are often used in
6079
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6081
# Another solution, used here, is to always expand $ac_aux_dir to an
6082
# absolute PATH. The drawback is that using absolute paths prevent a
6083
# configured tree to be moved without reconfiguration.
6085
AC_DEFUN([AM_AUX_DIR_EXPAND],
6086
[dnl Rely on autoconf to set up CDPATH properly.
6087
AC_PREREQ([2.50])dnl
6088
# expand $ac_aux_dir to an absolute path
6089
am_aux_dir=`cd $ac_aux_dir && pwd`
6092
# AM_CONDITIONAL -*- Autoconf -*-
6094
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
6096
# This program is free software; you can redistribute it and/or modify
6097
# it under the terms of the GNU General Public License as published by
6098
# the Free Software Foundation; either version 2, or (at your option)
6099
# any later version.
6101
# This program is distributed in the hope that it will be useful,
6102
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6103
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6104
# GNU General Public License for more details.
6106
# You should have received a copy of the GNU General Public License
6107
# along with this program; if not, write to the Free Software
6108
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6113
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6114
# -------------------------------------
6115
# Define a conditional.
6116
AC_DEFUN([AM_CONDITIONAL],
6118
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6119
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6121
AC_SUBST([$1_FALSE])
7214
AC_DEFUN([TORRENT_CHECK_CXXFLAGS], [
7216
AC_MSG_CHECKING([for user-defined CXXFLAGS])
7218
if test -n "$CXXFLAGS"; then
7219
AC_MSG_RESULT([user-defined "$CXXFLAGS"])
7221
CXXFLAGS="-O2 -Wall"
7222
AC_MSG_RESULT([default "$CXXFLAGS"])
7227
AC_DEFUN([TORRENT_ENABLE_DEBUG], [
7228
AC_ARG_ENABLE(debug,
7229
[ --enable-debug enable debug information [[default=yes]]],
7231
if test "$enableval" = "yes"; then
7232
CXXFLAGS="$CXXFLAGS -g -DDEBUG"
7234
CXXFLAGS="$CXXFLAGS -DNDEBUG"
7237
CXXFLAGS="$CXXFLAGS -g -DDEBUG"
7242
AC_DEFUN([TORRENT_ENABLE_WERROR], [
7243
AC_ARG_ENABLE(werror,
7244
[ --enable-werror enable the -Werror and -Wall flag [[default=no]]],
7246
if test "$enableval" = "yes"; then
7247
CXXFLAGS="$CXXFLAGS -Werror -Wall"
7253
AC_DEFUN([TORRENT_ENABLE_EXTRA_DEBUG], [
7254
AC_ARG_ENABLE(extra-debug,
7255
[ --enable-extra-debug enable extra debugging checks. [[default=no]]],
7257
if test "$enableval" = "yes"; then
7258
AC_DEFINE(USE_EXTRA_DEBUG, 1, Enable extra debugging checks.)
7264
AC_DEFUN([TORRENT_OTFD], [
7266
AC_MSG_CHECKING(for proper overloaded template function disambiguation)
7269
[[template <typename T> void f(T&) {}
7270
template <typename T> void f(T*) {}
7271
int main() { int *i = 0; f(*i); f(i); }
7277
AC_MSG_ERROR([your compiler does not properly handle overloaded template function disambiguation])
7284
AC_DEFUN([TORRENT_MINCORE_SIGNEDNESS], [
7286
AC_MSG_CHECKING(signedness of mincore parameter)
7289
[[#include <sys/types.h>
7290
#include <sys/mman.h>
7292
void f() { mincore((char*)0, 0, (unsigned char*)0); }
7295
AC_DEFINE(USE_MINCORE, 1, Use mincore)
7296
AC_DEFINE(USE_MINCORE_UNSIGNED, 1, use unsigned char* in mincore)
7297
AC_MSG_RESULT(unsigned)
7301
[[#include <sys/types.h>
7302
#include <sys/mman.h>
7304
void f() { mincore((char*)0, 0, (char*)0); }
7307
AC_DEFINE(USE_MINCORE, 1, Use mincore)
7308
AC_DEFINE(USE_MINCORE_UNSIGNED, 0, use char* in mincore)
7309
AC_MSG_RESULT(signed)
7312
AC_MSG_ERROR([failed, do *not* attempt to use --disable-mincore unless you are running Win32.])
7319
AC_DEFUN([TORRENT_MINCORE], [
7320
AC_ARG_ENABLE(mincore,
7321
[ --disable-mincore disable mincore check [[default=enable]]],
7323
if test "$enableval" = "yes"; then
7324
TORRENT_MINCORE_SIGNEDNESS()
7326
AC_MSG_CHECKING(for mincore)
7327
AC_MSG_RESULT(disabled)
7330
TORRENT_MINCORE_SIGNEDNESS()
7334
AC_DEFUN([TORRENT_CHECK_MADVISE], [
7335
AC_MSG_CHECKING(for madvise)
7338
[[#include <sys/types.h>
7339
#include <sys/mman.h>
7340
void f() { static char test[1024]; madvise((void *)test, sizeof(test), MADV_NORMAL); }
7344
AC_DEFINE(USE_MADVISE, 1, Use madvise)
7350
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
7351
AC_MSG_CHECKING(for execinfo.h)
7354
[[#include <execinfo.h>
7355
int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
7359
AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
7365
AC_DEFUN([TORRENT_CHECK_ALIGNED], [
7366
AC_MSG_CHECKING(the byte alignment)
7369
[[#include <inttypes.h>
7371
char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 };
7373
for (i = 1; i < 4; ++i)
7374
if (*(uint32_t*)(buf + i) == 0) return -1;
7379
AC_MSG_RESULT(none needed)
7381
AC_DEFINE(USE_ALIGNED, 1, Require byte alignment)
7382
AC_MSG_RESULT(required)
7387
AC_DEFUN([TORRENT_ENABLE_ALIGNED], [
7388
AC_ARG_ENABLE(aligned,
7389
[ --enable-aligned enable alignment safe code [[default=check]]],
7391
if test "$enableval" = "yes"; then
7392
AC_DEFINE(USE_ALIGNED, 1, Require byte alignment)
7395
TORRENT_CHECK_ALIGNED
7400
AC_DEFUN([TORRENT_DISABLE_IPV6], [
7402
[ --enable-ipv6 disable ipv6 [[default=no]]],
7404
if test "$enableval" = "yes"; then
7405
AC_DEFINE(RAK_USE_INET6, 1, enable ipv6 stuff)
7410
AC_DEFUN([TORRENT_CHECK_XFS], [
7411
AC_MSG_CHECKING(for XFS support)
7414
[[#include <xfs/libxfs.h>
7415
#include <sys/ioctl.h>
7417
struct xfs_flock64 l;
7418
ioctl(0, XFS_IOC_RESVSP64, &l);
7423
AC_DEFINE(USE_XFS, 1, Use XFS filesystem stuff.)
7431
AC_DEFUN([TORRENT_WITHOUT_XFS], [
7433
[ --without-xfs Do not check for XFS filesystem support],
7435
if test "$withval" = "yes"; then
7444
AC_DEFUN([TORRENT_WITH_XFS], [
7446
[ --with-xfs Check for XFS filesystem support],
7448
if test "$withval" = "yes"; then
7455
AC_DEFUN([TORRENT_CHECK_EPOLL], [
7456
AC_MSG_CHECKING(for epoll support)
7459
[[#include <sys/epoll.h>
7461
int fd = epoll_create(100);
7466
AC_DEFINE(USE_EPOLL, 1, Use epoll.)
7474
AC_DEFUN([TORRENT_WITHOUT_EPOLL], [
7476
[ --without-epoll Do not check for epoll support.],
7478
if test "$withval" = "yes"; then
7487
AC_DEFUN([TORRENT_WITH_KQUEUE], [
7489
[ --with-kqueue enable kqueue. [[default=no]]],
7491
if test "$withval" = "yes"; then
7492
AC_DEFINE(USE_KQUEUE, 1, Enable kqueue.)
7498
AC_DEFUN([TORRENT_WITHOUT_VARIABLE_FDSET], [
7499
AC_ARG_WITH(variable-fdset,
7501
[ --without-variable-fdset do not use non-portable variable sized fd_set's.],
7503
if test "$withval" = "yes"; then
7504
AC_DEFINE(USE_VARIABLE_FDSET, 1, defined when we allow the use of fd_set's of any size)
7507
AC_DEFINE(USE_VARIABLE_FDSET, 1, defined when we allow the use of fd_set's of any size)
7512
AC_DEFUN([TORRENT_CHECK_POSIX_FALLOCATE], [
7513
AC_MSG_CHECKING(for posix_fallocate)
7516
[[#include <fcntl.h>
7518
posix_fallocate(0, 0, 0);
7523
AC_DEFINE(USE_POSIX_FALLOCATE, 1, posix_fallocate supported.)
7531
AC_DEFUN([TORRENT_WITH_POSIX_FALLOCATE], [
7532
AC_ARG_WITH(posix-fallocate,
7533
[ --with-posix-fallocate Check for and use posix_fallocate to allocate files.],
7535
if test "$withval" = "yes"; then
7536
TORRENT_CHECK_POSIX_FALLOCATE
7541
AC_DEFUN([TORRENT_WITHOUT_NCURSESW], [
7542
AC_ARG_WITH(ncursesw,
7543
[ --without-ncursesw Don't try to use wide char ncurses.],
7545
if test "$withval" = "no"; then
7546
AC_SEARCH_LIBS(add_wch, ncursesw,
7547
AC_DEFINE(HAVE_NCURSESW, 1, defined if ncurses wide character support is available),
7548
AC_SEARCH_LIBS(wbkgdset, ncurses curses,,echo "*** The ncurses library is required!";exit 1)
7551
AC_SEARCH_LIBS(wbkgdset, ncurses curses,,echo "*** The ncurses library is required!";exit 1)
7554
AC_SEARCH_LIBS(add_wch, ncursesw,
7555
AC_DEFINE(HAVE_NCURSESW, 1, defined if ncurses wide character support is available),
7556
AC_SEARCH_LIBS(wbkgdset, ncurses curses,,echo "*** The ncurses library is required!";exit 1)
7561
AC_DEFUN([TORRENT_CHECK_STATVFS], [
7562
AC_CHECK_HEADERS(sys/vfs.h sys/statvfs.h sys/statfs.h)
7564
AC_MSG_CHECKING(for statvfs)
7569
#include <sys/vfs.h>
7571
#if HAVE_SYS_STATVFS_H
7572
#include <sys/statvfs.h>
7574
#if HAVE_SYS_STATFS_H
7575
#include <sys/statfs.h>
7578
struct statvfs s; fsblkcnt_t c;
7583
AC_DEFINE(FS_STAT_FD, [fstatvfs(fd, &m_stat) == 0], Function to determine filesystem stats from fd)
7584
AC_DEFINE(FS_STAT_FN, [statvfs(fn, &m_stat) == 0], Function to determine filesystem stats from filename)
7585
AC_DEFINE(FS_STAT_STRUCT, [struct statvfs], Type of second argument to statfs function)
7586
AC_DEFINE(FS_STAT_SIZE_TYPE, [unsigned long], Type of block size member in stat struct)
7587
AC_DEFINE(FS_STAT_COUNT_TYPE, [fsblkcnt_t], Type of block count member in stat struct)
7588
AC_DEFINE(FS_STAT_BLOCK_SIZE, [(m_stat.f_frsize)], Determine the block size)
7598
AC_DEFUN([TORRENT_CHECK_STATFS], [
7599
AC_CHECK_HEADERS(sys/statfs.h sys/param.h sys/mount.h)
7601
AC_MSG_CHECKING(for statfs)
7605
#if HAVE_SYS_STATFS_H
7606
#include <sys/statfs.h>
7608
#if HAVE_SYS_PARAM_H
7609
#include <sys/param.h>
7611
#if HAVE_SYS_MOUNT_H
7612
#include <sys/mount.h>
7620
AC_DEFINE(FS_STAT_FD, [fstatfs(fd, &m_stat) == 0], Function to determine filesystem stats from fd)
7621
AC_DEFINE(FS_STAT_FN, [statfs(fn, &m_stat) == 0], Function to determine filesystem stats from filename)
7622
AC_DEFINE(FS_STAT_STRUCT, [struct statfs], Type of second argument to statfs function)
7623
AC_DEFINE(FS_STAT_SIZE_TYPE, [long], Type of block size member in stat struct)
7624
AC_DEFINE(FS_STAT_COUNT_TYPE, [long], Type of block count member in stat struct)
7625
AC_DEFINE(FS_STAT_BLOCK_SIZE, [(m_stat.f_bsize)], Determine the block size)
7633
AC_DEFUN([TORRENT_DISABLED_STATFS], [
7634
AC_DEFINE(FS_STAT_FD, [(errno = ENOSYS) == 0], Function to determine filesystem stats from fd)
7635
AC_DEFINE(FS_STAT_FN, [(errno = ENOSYS) == 0], Function to determine filesystem stats from filename)
7636
AC_DEFINE(FS_STAT_STRUCT, [struct {blocksize_type f_bsize; blockcount_type f_bavail;}], Type of second argument to statfs function)
7637
AC_DEFINE(FS_STAT_SIZE_TYPE, [int], Type of block size member in stat struct)
7638
AC_DEFINE(FS_STAT_COUNT_TYPE, [int], Type of block count member in stat struct)
7639
AC_DEFINE(FS_STAT_BLOCK_SIZE, [(4096)], Determine the block size)
7640
AC_MSG_RESULT(No filesystem stats available)
7643
AC_DEFUN([TORRENT_WITHOUT_STATVFS], [
7644
AC_ARG_WITH(statvfs,
7645
[ --without-statvfs Don't try to use statvfs to find free diskspace.],
7647
if test "$withval" = "yes"; then
7648
TORRENT_CHECK_STATVFS
7654
TORRENT_CHECK_STATVFS
7658
AC_DEFUN([TORRENT_WITHOUT_STATFS], [
7660
[ --without-statfs Don't try to use statfs to find free diskspace.],
7662
if test "$have_stat_vfs" = "no"; then
7663
if test "$withval" = "yes"; then
7664
TORRENT_CHECK_STATFS
7666
TORRENT_DISABLED_STATFS
7671
if test "$have_stat_vfs" = "no"; then
7672
TORRENT_CHECK_STATFS
7673
if test "$have_stat_vfs" = "no"; then
7674
TORRENT_DISABLED_STATFS
7680
AC_DEFUN([TORRENT_WITH_ADDRESS_SPACE], [
7681
AC_ARG_WITH(address-space,
7682
AC_HELP_STRING([--with-address-space=MB], [Change the default address space size, default 1024 MB.]),
7684
if test ! -z $withval -a "$withval" != "yes" -a "$withval" != "no"; then
7685
AC_DEFINE_UNQUOTED(DEFAULT_ADDRESS_SPACE_SIZE, [$withval])
7687
AC_MSG_ERROR(--with-address-space requires a parameter.)
7691
AC_CHECK_SIZEOF(long)
7693
if test $ac_cv_sizeof_long = 8; then
7694
AC_DEFINE(DEFAULT_ADDRESS_SPACE_SIZE, 4096, Default address space size.)
7696
AC_DEFINE(DEFAULT_ADDRESS_SPACE_SIZE, 1024, Default address space size.)
7701
# Functions to check for attributes support in compiler
7703
AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
7704
AC_CACHE_CHECK([if compiler supports __attribute__((constructor))],
7705
[cc_cv_attribute_constructor],
7706
[AC_COMPILE_IFELSE([
7707
void ctor() __attribute__((constructor));
7710
[cc_cv_attribute_constructor=yes],
7711
[cc_cv_attribute_constructor=no])
7714
if test "x$cc_cv_attribute_constructor" = "xyes"; then
7715
AC_DEFINE([SUPPORT_ATTRIBUTE_CONSTRUCTOR], 1, [Define this if the compiler supports the constructor attribute])
7723
AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
7724
AC_CACHE_CHECK([if compiler supports __attribute__((format(printf, n, n)))],
7725
[cc_cv_attribute_format],
7726
[AC_COMPILE_IFELSE([
7727
void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { }
7729
[cc_cv_attribute_format=yes],
7730
[cc_cv_attribute_format=no])
7733
if test "x$cc_cv_attribute_format" = "xyes"; then
7734
AC_DEFINE([SUPPORT_ATTRIBUTE_FORMAT], 1, [Define this if the compiler supports the format attribute])
7742
AC_DEFUN([CC_ATTRIBUTE_INTERNAL], [
7743
AC_CACHE_CHECK([if compiler supports __attribute__((visibility("internal")))],
7744
[cc_cv_attribute_internal],
7745
[AC_COMPILE_IFELSE([
7746
void __attribute__((visibility("internal"))) internal_function() { }
7748
[cc_cv_attribute_internal=yes],
7749
[cc_cv_attribute_internal=no])
7752
if test "x$cc_cv_attribute_internal" = "xyes"; then
7753
AC_DEFINE([SUPPORT_ATTRIBUTE_INTERNAL], 1, [Define this if the compiler supports the internal visibility attribute])
7761
AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
7764
tmp_CXXFLAGS=$CXXFLAGS
7765
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
7767
AC_CACHE_CHECK([if compiler supports __attribute__((visibility("default")))],
7768
[cc_cv_attribute_visibility],
7769
[AC_COMPILE_IFELSE([
7770
void __attribute__((visibility("default"))) visibility_function() { }
7772
[cc_cv_attribute_visibility=yes],
7773
[cc_cv_attribute_visibility=no])
7776
CXXFLAGS=$tmp_CXXFLAGS
7779
if test "x$cc_cv_attribute_visibility" = "xyes"; then
7780
AC_DEFINE([SUPPORT_ATTRIBUTE_VISIBILITY], 1, [Define this if the compiler supports the visibility attributes.])
7781
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
7790
AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
7791
AC_CACHE_CHECK([if compiler supports __attribute__((nonnull()))],
7792
[cc_cv_attribute_nonnull],
7793
[AC_COMPILE_IFELSE([
7794
void some_function(void *foo, void *bar) __attribute__((nonnull()));
7795
void some_function(void *foo, void *bar) { }
7797
[cc_cv_attribute_nonnull=yes],
7798
[cc_cv_attribute_nonnull=no])
7801
if test "x$cc_cv_attribute_nonnull" = "xyes"; then
7802
AC_DEFINE([SUPPORT_ATTRIBUTE_NONNULL], 1, [Define this if the compiler supports the nonnull attribute])
7810
AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
7811
AC_CACHE_CHECK([if compiler supports __attribute__((unused))],
7812
[cc_cv_attribute_unused],
7813
[AC_COMPILE_IFELSE([
7814
void some_function(void *foo, __attribute__((unused)) void *bar);
7816
[cc_cv_attribute_unused=yes],
7817
[cc_cv_attribute_unused=no])
7820
if test "x$cc_cv_attribute_unused" = "xyes"; then
7821
AC_DEFINE([SUPPORT_ATTRIBUTE_UNUSED], 1, [Define this if the compiler supports the unused attribute])
7829
AC_DEFUN([CC_FUNC_EXPECT], [
7830
AC_CACHE_CHECK([if compiler has __builtin_expect function],
7831
[cc_cv_func_expect],
7832
[AC_COMPILE_IFELSE([
7836
return (int)__builtin_expect(a, 3);
7839
[cc_cv_func_expect=yes],
7840
[cc_cv_func_expect=no])
7843
if test "x$cc_cv_func_expect" = "xyes"; then
7844
AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1, [Define this if the compiler supports __builtin_expect() function])
7852
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7854
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
7856
# This program is free software; you can redistribute it and/or modify
7857
# it under the terms of the GNU General Public License as published by
7858
# the Free Software Foundation; either version 2 of the License, or
7859
# (at your option) any later version.
7861
# This program is distributed in the hope that it will be useful, but
7862
# WITHOUT ANY WARRANTY; without even the implied warranty of
7863
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7864
# General Public License for more details.
7866
# You should have received a copy of the GNU General Public License
7867
# along with this program; if not, write to the Free Software
7868
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7870
# As a special exception to the GNU General Public License, if you
7871
# distribute this file as part of a program that contains a
7872
# configuration script generated by Autoconf, you may include it under
7873
# the same distribution terms that you use for the rest of that program.
7875
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7876
# ----------------------------------
7877
AC_DEFUN([PKG_PROG_PKG_CONFIG],
7878
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7879
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7880
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7881
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7882
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6129
AC_CONFIG_COMMANDS_PRE(
6130
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6131
AC_MSG_ERROR([[conditional "$1" was never defined.
6132
Usually this means the macro was only invoked conditionally.]])
6135
# serial 7 -*- Autoconf -*-
6137
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6138
# Free Software Foundation, Inc.
6140
# This program is free software; you can redistribute it and/or modify
6141
# it under the terms of the GNU General Public License as published by
6142
# the Free Software Foundation; either version 2, or (at your option)
6143
# any later version.
6145
# This program is distributed in the hope that it will be useful,
6146
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6147
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6148
# GNU General Public License for more details.
6150
# You should have received a copy of the GNU General Public License
6151
# along with this program; if not, write to the Free Software
6152
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6156
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6157
# written in clear, in which case automake, when reading aclocal.m4,
6158
# will think it sees a *use*, and therefore will trigger all it's
6159
# C support machinery. Also note that it means that autoscan, seeing
6160
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6164
# _AM_DEPENDENCIES(NAME)
6165
# ----------------------
6166
# See how the compiler implements dependency checking.
6167
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6168
# We try a few techniques and use that to set a single cache variable.
6170
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6171
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6172
# dependency, and given that the user is not expected to run this macro,
6173
# just rely on AC_PROG_CC.
6174
AC_DEFUN([_AM_DEPENDENCIES],
6175
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6176
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6177
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6178
AC_REQUIRE([AM_DEP_TRACK])dnl
6180
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6181
[$1], CXX, [depcc="$CXX" am_compiler_list=],
6182
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6183
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6184
[depcc="$$1" am_compiler_list=])
6186
AC_CACHE_CHECK([dependency style of $depcc],
6187
[am_cv_$1_dependencies_compiler_type],
6188
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6189
# We make a subdir and do the tests there. Otherwise we can end up
6190
# making bogus files that we don't know about and never remove. For
6191
# instance it was reported that on HP-UX the gcc test will end up
6192
# making a dummy file named `D' -- because `-MD' means `put the output
6195
# Copy depcomp to subdir because otherwise we won't find it if we're
6196
# using a relative directory.
6197
cp "$am_depcomp" conftest.dir
6199
# We will build objects and dependencies in a subdirectory because
6200
# it helps to detect inapplicable dependency modes. For instance
6201
# both Tru64's cc and ICC support -MD to output dependencies as a
6202
# side effect of compilation, but ICC will put the dependencies in
6203
# the current directory while Tru64 will put them in the object
6207
am_cv_$1_dependencies_compiler_type=none
6208
if test "$am_compiler_list" = ""; then
6209
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6211
for depmode in $am_compiler_list; do
6212
# Setup a source with many dependencies, because some compilers
6213
# like to wrap large dependency lists on column 80 (with \), and
6214
# we should not choose a depcomp mode which is confused by this.
6216
# We need to recreate these files for each test, as the compiler may
6217
# overwrite some of them when testing with obscure command lines.
6218
# This happens at least with the AIX C compiler.
6220
for i in 1 2 3 4 5 6; do
6221
echo '#include "conftst'$i'.h"' >> sub/conftest.c
6222
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6223
# Solaris 8's {/usr,}/bin/sh.
6224
touch sub/conftst$i.h
6226
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6230
# after this tag, mechanisms are not by side-effect, so they'll
6231
# only be used when explicitly requested
6232
if test "x$enable_dependency_tracking" = xyes; then
6240
# We check with `-c' and `-o' for the sake of the "dashmstdout"
6241
# mode. It turns out that the SunPro C++ compiler does not properly
6242
# handle `-M -o', and we need to detect this.
6243
if depmode=$depmode \
6244
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6245
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6246
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6247
>/dev/null 2>conftest.err &&
6248
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6249
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6250
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6251
# icc doesn't choke on unknown options, it will just issue warnings
6252
# or remarks (even with -Werror). So we grep stderr for any message
6253
# that says an option was ignored or not supported.
6254
# When given -MP, icc 7.0 and 7.1 complain thusly:
6255
# icc: Command line warning: ignoring option '-M'; no argument required
6256
# The diagnosis changed in icc 8.0:
6257
# icc: Command line remark: option '-MP' not supported
6258
if (grep 'ignoring option' conftest.err ||
6259
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6260
am_cv_$1_dependencies_compiler_type=$depmode
7884
if test -n "$PKG_CONFIG"; then
7885
_pkg_min_version=m4_default([$1], [0.9.0])
7886
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7887
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7888
AC_MSG_RESULT([yes])
7895
])# PKG_PROG_PKG_CONFIG
7897
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7899
# Check to see whether a particular set of modules exists. Similar
7900
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
7903
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
7904
# this or PKG_CHECK_MODULES is called, or make sure to call
7905
# PKG_CHECK_EXISTS manually
7906
# --------------------------------------------------------------
7907
AC_DEFUN([PKG_CHECK_EXISTS],
7908
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7909
if test -n "$PKG_CONFIG" && \
7910
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7911
m4_ifval([$2], [$2], [:])
7912
m4_ifvaln([$3], [else
7917
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7918
# ---------------------------------------------
7919
m4_define([_PKG_CONFIG],
7920
[if test -n "$PKG_CONFIG"; then
7921
if test -n "$$1"; then
7924
PKG_CHECK_EXISTS([$3],
7925
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6269
am_cv_$1_dependencies_compiler_type=none
6272
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6273
AM_CONDITIONAL([am__fastdep$1], [
6274
test "x$enable_dependency_tracking" != xno \
6275
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6281
# Choose a directory name for dependency files.
6282
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6283
AC_DEFUN([AM_SET_DEPDIR],
6284
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6285
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6291
AC_DEFUN([AM_DEP_TRACK],
6292
[AC_ARG_ENABLE(dependency-tracking,
6293
[ --disable-dependency-tracking speeds up one-time build
6294
--enable-dependency-tracking do not reject slow dependency extractors])
6295
if test "x$enable_dependency_tracking" != xno; then
6296
am_depcomp="$ac_aux_dir/depcomp"
6299
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6300
AC_SUBST([AMDEPBACKSLASH])
6303
# Generate code to set up dependency tracking. -*- Autoconf -*-
6305
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6306
# Free Software Foundation, Inc.
6308
# This program is free software; you can redistribute it and/or modify
6309
# it under the terms of the GNU General Public License as published by
6310
# the Free Software Foundation; either version 2, or (at your option)
6311
# any later version.
6313
# This program is distributed in the hope that it will be useful,
6314
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6315
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6316
# GNU General Public License for more details.
6318
# You should have received a copy of the GNU General Public License
6319
# along with this program; if not, write to the Free Software
6320
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6325
# _AM_OUTPUT_DEPENDENCY_COMMANDS
6326
# ------------------------------
6327
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6328
[for mf in $CONFIG_FILES; do
6329
# Strip MF so we end up with the name of the file.
6330
mf=`echo "$mf" | sed -e 's/:.*$//'`
6331
# Check whether this is an Automake generated Makefile or not.
6332
# We used to match only the files named `Makefile.in', but
6333
# some people rename them; so instead we look at the file content.
6334
# Grep'ing the first line is not enough: some people post-process
6335
# each Makefile.in and add a new line on top of each file to say so.
6336
# So let's grep whole file.
6337
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6338
dirpart=`AS_DIRNAME("$mf")`
6342
# Extract the definition of DEPDIR, am__include, and am__quote
6343
# from the Makefile without running `make'.
6344
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6345
test -z "$DEPDIR" && continue
6346
am__include=`sed -n 's/^am__include = //p' < "$mf"`
6347
test -z "am__include" && continue
6348
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6349
# When using ansi2knr, U may be empty or an underscore; expand it
6350
U=`sed -n 's/^U = //p' < "$mf"`
6351
# Find all dependency output files, they are included files with
6352
# $(DEPDIR) in their names. We invoke sed twice because it is the
6353
# simplest approach to changing $(DEPDIR) to its actual value in the
6355
for file in `sed -n "
6356
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6357
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6358
# Make sure the directory exists.
6359
test -f "$dirpart/$file" && continue
6360
fdir=`AS_DIRNAME(["$file"])`
6361
AS_MKDIR_P([$dirpart/$fdir])
6362
# echo "creating $dirpart/$file"
6363
echo '# dummy' > "$dirpart/$file"
6366
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6369
# AM_OUTPUT_DEPENDENCY_COMMANDS
7933
# _PKG_SHORT_ERRORS_SUPPORTED
6370
7934
# -----------------------------
6371
# This macro should only be invoked once -- use via AC_REQUIRE.
6373
# This code is only required when automatic dependency tracking
6374
# is enabled. FIXME. This creates each `.P' file that we will
6375
# need in order to bootstrap the dependency handling code.
6376
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6377
[AC_CONFIG_COMMANDS([depfiles],
6378
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6379
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6382
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
6384
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6386
# This program is free software; you can redistribute it and/or modify
6387
# it under the terms of the GNU General Public License as published by
6388
# the Free Software Foundation; either version 2, or (at your option)
6389
# any later version.
6391
# This program is distributed in the hope that it will be useful,
6392
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6393
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6394
# GNU General Public License for more details.
6396
# You should have received a copy of the GNU General Public License
6397
# along with this program; if not, write to the Free Software
6398
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6403
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6404
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6406
# Do all the work for Automake. -*- Autoconf -*-
6408
# This macro actually does too much some checks are only needed if
6409
# your package does certain things. But this isn't really a big deal.
6411
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
6412
# Free Software Foundation, Inc.
6414
# This program is free software; you can redistribute it and/or modify
6415
# it under the terms of the GNU General Public License as published by
6416
# the Free Software Foundation; either version 2, or (at your option)
6417
# any later version.
6419
# This program is distributed in the hope that it will be useful,
6420
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6421
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6422
# GNU General Public License for more details.
6424
# You should have received a copy of the GNU General Public License
6425
# along with this program; if not, write to the Free Software
6426
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6431
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6432
# AM_INIT_AUTOMAKE([OPTIONS])
6433
# -----------------------------------------------
6434
# The call with PACKAGE and VERSION arguments is the old style
6435
# call (pre autoconf-2.50), which is being phased out. PACKAGE
6436
# and VERSION should now be passed to AC_INIT and removed from
6437
# the call to AM_INIT_AUTOMAKE.
6438
# We support both call styles for the transition. After
6439
# the next Automake release, Autoconf can make the AC_INIT
6440
# arguments mandatory, and then we can depend on a new Autoconf
6441
# release and drop the old call support.
6442
AC_DEFUN([AM_INIT_AUTOMAKE],
6443
[AC_PREREQ([2.58])dnl
6444
dnl Autoconf wants to disallow AM_ names. We explicitly allow
6445
dnl the ones we care about.
6446
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6447
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6448
AC_REQUIRE([AC_PROG_INSTALL])dnl
6449
# test to see if srcdir already configured
6450
if test "`cd $srcdir && pwd`" != "`pwd`" &&
6451
test -f $srcdir/config.status; then
6452
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6455
# test whether we have cygpath
6456
if test -z "$CYGPATH_W"; then
6457
if (cygpath --version) >/dev/null 2>/dev/null; then
6458
CYGPATH_W='cygpath -w'
6463
AC_SUBST([CYGPATH_W])
6465
# Define the identity of the package.
6466
dnl Distinguish between old-style and new-style calls.
6468
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6469
AC_SUBST([PACKAGE], [$1])dnl
6470
AC_SUBST([VERSION], [$2])],
6471
[_AM_SET_OPTIONS([$1])dnl
6472
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6473
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6475
_AM_IF_OPTION([no-define],,
6476
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6477
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6479
# Some tools Automake needs.
6480
AC_REQUIRE([AM_SANITY_CHECK])dnl
6481
AC_REQUIRE([AC_ARG_PROGRAM])dnl
6482
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6483
AM_MISSING_PROG(AUTOCONF, autoconf)
6484
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6485
AM_MISSING_PROG(AUTOHEADER, autoheader)
6486
AM_MISSING_PROG(MAKEINFO, makeinfo)
6488
AM_PROG_INSTALL_STRIP
6489
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6490
# We need awk for the "check" target. The system "awk" is bad on
6492
AC_REQUIRE([AC_PROG_AWK])dnl
6493
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6494
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6495
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6496
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6497
[_AM_PROG_TAR([v7])])])
6498
_AM_IF_OPTION([no-dependencies],,
6499
[AC_PROVIDE_IFELSE([AC_PROG_CC],
6500
[_AM_DEPENDENCIES(CC)],
6501
[define([AC_PROG_CC],
6502
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6503
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6504
[_AM_DEPENDENCIES(CXX)],
6505
[define([AC_PROG_CXX],
6506
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6511
# When config.status generates a header, we must update the stamp-h file.
6512
# This file resides in the same directory as the config header
6513
# that is generated. The stamp files are numbered to have different names.
6515
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6516
# loop where config.status creates the headers, so we can generate
6517
# our stamp files there.
6518
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6519
[# Compute $1's index in $config_headers.
6521
for _am_header in $config_headers :; do
6526
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
6529
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6531
# AM_PROG_INSTALL_SH
6532
# ------------------
6533
# Define $install_sh.
6535
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6537
# This program is free software; you can redistribute it and/or modify
6538
# it under the terms of the GNU General Public License as published by
6539
# the Free Software Foundation; either version 2, or (at your option)
6540
# any later version.
6542
# This program is distributed in the hope that it will be useful,
6543
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6544
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6545
# GNU General Public License for more details.
6547
# You should have received a copy of the GNU General Public License
6548
# along with this program; if not, write to the Free Software
6549
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6552
AC_DEFUN([AM_PROG_INSTALL_SH],
6553
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6554
install_sh=${install_sh-"$am_aux_dir/install-sh"}
6555
AC_SUBST(install_sh)])
6558
# Copyright (C) 2003 Free Software Foundation, Inc.
6560
# This program is free software; you can redistribute it and/or modify
6561
# it under the terms of the GNU General Public License as published by
6562
# the Free Software Foundation; either version 2, or (at your option)
6563
# any later version.
6565
# This program is distributed in the hope that it will be useful,
6566
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6567
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6568
# GNU General Public License for more details.
6570
# You should have received a copy of the GNU General Public License
6571
# along with this program; if not, write to the Free Software
6572
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6577
# Check whether the underlying file-system supports filenames
6578
# with a leading dot. For instance MS-DOS doesn't.
6579
AC_DEFUN([AM_SET_LEADING_DOT],
6580
[rm -rf .tst 2>/dev/null
6581
mkdir .tst 2>/dev/null
6582
if test -d .tst; then
6587
rmdir .tst 2>/dev/null
6588
AC_SUBST([am__leading_dot])])
6590
# Check to see how 'make' treats includes. -*- Autoconf -*-
6592
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
6594
# This program is free software; you can redistribute it and/or modify
6595
# it under the terms of the GNU General Public License as published by
6596
# the Free Software Foundation; either version 2, or (at your option)
6597
# any later version.
6599
# This program is distributed in the hope that it will be useful,
6600
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6601
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6602
# GNU General Public License for more details.
6604
# You should have received a copy of the GNU General Public License
6605
# along with this program; if not, write to the Free Software
6606
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6613
# Check to see how make treats includes.
6614
AC_DEFUN([AM_MAKE_INCLUDE],
6615
[am_make=${MAKE-make}
6616
cat > confinc << 'END'
6621
# If we don't find an include directive, just comment out the code.
6622
AC_MSG_CHECKING([for style of include used by $am_make])
6626
# First try GNU make style include.
6627
echo "include confinc" > confmf
6628
# We grep out `Entering directory' and `Leaving directory'
6629
# messages which can occur if `w' ends up in MAKEFLAGS.
6630
# In particular we don't look at `^make:' because GNU make might
6631
# be invoked under some other name (usually "gmake"), in which
6632
# case it prints its new name instead of `make'.
6633
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6638
# Now try BSD make style include.
6639
if test "$am__include" = "#"; then
6640
echo '.include "confinc"' > confmf
6641
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6642
am__include=.include
6647
AC_SUBST([am__include])
6648
AC_SUBST([am__quote])
6649
AC_MSG_RESULT([$_am_result])
6650
rm -f confinc confmf
6656
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
6658
# This program is free software; you can redistribute it and/or modify
6659
# it under the terms of the GNU General Public License as published by
6660
# the Free Software Foundation; either version 2, or (at your option)
6661
# any later version.
6663
# This program is distributed in the hope that it will be useful,
6664
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6665
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6666
# GNU General Public License for more details.
6668
# You should have received a copy of the GNU General Public License
6669
# along with this program; if not, write to the Free Software
6670
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6675
# AM_MISSING_PROG(NAME, PROGRAM)
6676
# ------------------------------
6677
AC_DEFUN([AM_MISSING_PROG],
6678
[AC_REQUIRE([AM_MISSING_HAS_RUN])
6679
$1=${$1-"${am_missing_run}$2"}
6683
# AM_MISSING_HAS_RUN
6684
# ------------------
6685
# Define MISSING if not defined so far and test if it supports --run.
6686
# If it does, set am_missing_run to use it, otherwise, to nothing.
6687
AC_DEFUN([AM_MISSING_HAS_RUN],
6688
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6689
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6690
# Use eval to expand $SHELL
6691
if eval "$MISSING --run true"; then
6692
am_missing_run="$MISSING --run "
6695
AC_MSG_WARN([`missing' script is too old or missing])
6701
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6703
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
6705
# This program is free software; you can redistribute it and/or modify
6706
# it under the terms of the GNU General Public License as published by
6707
# the Free Software Foundation; either version 2, or (at your option)
6708
# any later version.
6710
# This program is distributed in the hope that it will be useful,
6711
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6712
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6713
# GNU General Public License for more details.
6715
# You should have received a copy of the GNU General Public License
6716
# along with this program; if not, write to the Free Software
6717
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6720
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6721
# created by `make install' are always world readable, even if the
6722
# installer happens to have an overly restrictive umask (e.g. 077).
6723
# This was a mistake. There are at least two reasons why we must not
6725
# - it causes special bits like SGID to be ignored,
6726
# - it may be too restrictive (some setups expect 775 directories).
6728
# Do not use -m 0755 and let people choose whatever they expect by
6731
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
6732
# Some implementations (such as Solaris 8's) are not thread-safe: if a
6733
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6734
# concurrently, both version can detect that a/ is missing, but only
6735
# one can create it and the other will error out. Consequently we
6736
# restrict ourselves to GNU make (using the --version option ensures
6738
AC_DEFUN([AM_PROG_MKDIR_P],
6739
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6740
# We used to keeping the `.' as first argument, in order to
6741
# allow $(mkdir_p) to be used without argument. As in
6742
# $(mkdir_p) $(somedir)
6743
# where $(somedir) is conditionally defined. However this is wrong
6745
# 1. if the package is installed by a user who cannot write `.'
6746
# make install will fail,
6747
# 2. the above comment should most certainly read
6748
# $(mkdir_p) $(DESTDIR)$(somedir)
6749
# so it does not work when $(somedir) is undefined and
6750
# $(DESTDIR) is not.
6751
# To support the latter case, we have to write
6752
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6753
# so the `.' trick is pointless.
6754
mkdir_p='mkdir -p --'
6756
# On NextStep and OpenStep, the `mkdir' command does not
6757
# recognize any option. It will interpret all options as
6758
# directories to create, and then abort because `.' already
6760
for d in ./-p ./--version;
6762
test -d $d && rmdir $d
6764
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6765
if test -f "$ac_aux_dir/mkinstalldirs"; then
6766
mkdir_p='$(mkinstalldirs)'
6768
mkdir_p='$(install_sh) -d'
6771
AC_SUBST([mkdir_p])])
6773
# Helper functions for option handling. -*- Autoconf -*-
6775
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
6777
# This program is free software; you can redistribute it and/or modify
6778
# it under the terms of the GNU General Public License as published by
6779
# the Free Software Foundation; either version 2, or (at your option)
6780
# any later version.
6782
# This program is distributed in the hope that it will be useful,
6783
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6784
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6785
# GNU General Public License for more details.
6787
# You should have received a copy of the GNU General Public License
6788
# along with this program; if not, write to the Free Software
6789
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6794
# _AM_MANGLE_OPTION(NAME)
6795
# -----------------------
6796
AC_DEFUN([_AM_MANGLE_OPTION],
6797
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
6799
# _AM_SET_OPTION(NAME)
6800
# ------------------------------
6801
# Set option NAME. Presently that only means defining a flag for this option.
6802
AC_DEFUN([_AM_SET_OPTION],
6803
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
6805
# _AM_SET_OPTIONS(OPTIONS)
6806
# ----------------------------------
6807
# OPTIONS is a space-separated list of Automake options.
6808
AC_DEFUN([_AM_SET_OPTIONS],
6809
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6811
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
6812
# -------------------------------------------
6813
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
6814
AC_DEFUN([_AM_IF_OPTION],
6815
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
6818
# Check to make sure that the build environment is sane.
6821
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6823
# This program is free software; you can redistribute it and/or modify
6824
# it under the terms of the GNU General Public License as published by
6825
# the Free Software Foundation; either version 2, or (at your option)
6826
# any later version.
6828
# This program is distributed in the hope that it will be useful,
6829
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6830
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6831
# GNU General Public License for more details.
6833
# You should have received a copy of the GNU General Public License
6834
# along with this program; if not, write to the Free Software
6835
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6842
AC_DEFUN([AM_SANITY_CHECK],
6843
[AC_MSG_CHECKING([whether build environment is sane])
6846
echo timestamp > conftest.file
6847
# Do `set' in a subshell so we don't clobber the current shell's
6848
# arguments. Must try -L first in case configure is actually a
6849
# symlink; some systems play weird games with the mod time of symlinks
6850
# (eg FreeBSD returns the mod time of the symlink's containing
6853
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6854
if test "$[*]" = "X"; then
6856
set X `ls -t $srcdir/configure conftest.file`
6859
if test "$[*]" != "X $srcdir/configure conftest.file" \
6860
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
6862
# If neither matched, then we have a broken ls. This can happen
6863
# if, for instance, CONFIG_SHELL is bash and it inherits a
6864
# broken ls alias from the environment. This has actually
6865
# happened. Such a system could not be considered "sane".
6866
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
6867
alias in your environment])
6870
test "$[2]" = conftest.file
6876
AC_MSG_ERROR([newly created file is older than distributed files!
6877
Check your system clock])
6879
AC_MSG_RESULT(yes)])
6881
# AM_PROG_INSTALL_STRIP
6883
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6885
# This program is free software; you can redistribute it and/or modify
6886
# it under the terms of the GNU General Public License as published by
6887
# the Free Software Foundation; either version 2, or (at your option)
6888
# any later version.
6890
# This program is distributed in the hope that it will be useful,
6891
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6892
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6893
# GNU General Public License for more details.
6895
# You should have received a copy of the GNU General Public License
6896
# along with this program; if not, write to the Free Software
6897
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6900
# One issue with vendor `install' (even GNU) is that you can't
6901
# specify the program used to strip binaries. This is especially
6902
# annoying in cross-compiling environments, where the build's strip
6903
# is unlikely to handle the host's binaries.
6904
# Fortunately install-sh will honor a STRIPPROG variable, so we
6905
# always use install-sh in `make install-strip', and initialize
6906
# STRIPPROG with the value of the STRIP variable (set by the user).
6907
AC_DEFUN([AM_PROG_INSTALL_STRIP],
6908
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
6909
# Installed binaries are usually stripped using `strip' when the user
6910
# run `make install-strip'. However `strip' might not be the right
6911
# tool to use in cross-compilation environments, therefore Automake
6912
# will honor the `STRIP' environment variable to overrule this program.
6913
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
6914
if test "$cross_compiling" != no; then
6915
AC_CHECK_TOOL([STRIP], [strip], :)
6917
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6918
AC_SUBST([INSTALL_STRIP_PROGRAM])])
6920
# Check how to create a tarball. -*- Autoconf -*-
6922
# Copyright (C) 2004 Free Software Foundation, Inc.
6924
# This program is free software; you can redistribute it and/or modify
6925
# it under the terms of the GNU General Public License as published by
6926
# the Free Software Foundation; either version 2, or (at your option)
6927
# any later version.
6929
# This program is distributed in the hope that it will be useful,
6930
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6931
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6932
# GNU General Public License for more details.
6934
# You should have received a copy of the GNU General Public License
6935
# along with this program; if not, write to the Free Software
6936
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6942
# _AM_PROG_TAR(FORMAT)
6943
# --------------------
6944
# Check how to create a tarball in format FORMAT.
6945
# FORMAT should be one of `v7', `ustar', or `pax'.
6947
# Substitute a variable $(am__tar) that is a command
6948
# writing to stdout a FORMAT-tarball containing the directory
6950
# tardir=directory && $(am__tar) > result.tar
6952
# Substitute a variable $(am__untar) that extract such
6953
# a tarball read from stdin.
6954
# $(am__untar) < result.tar
6955
AC_DEFUN([_AM_PROG_TAR],
6956
[# Always define AMTAR for backward compatibility.
6957
AM_MISSING_PROG([AMTAR], [tar])
6959
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
6960
[m4_case([$1], [ustar],, [pax],,
6961
[m4_fatal([Unknown tar format])])
6962
AC_MSG_CHECKING([how to create a $1 tar archive])
6963
# Loop over all known methods to create a tar archive until one works.
6964
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
6965
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
6966
# Do not fold the above two line into one, because Tru64 sh and
6967
# Solaris sh will not grok spaces in the rhs of `-'.
6968
for _am_tool in $_am_tools
6972
for _am_tar in tar gnutar gtar;
6974
AM_RUN_LOG([$_am_tar --version]) && break
6976
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
6977
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
6978
am__untar="$_am_tar -xf -"
6981
# Must skip GNU tar: if it does not support --format= it doesn't create
6982
# ustar tarball either.
6983
(tar --version) >/dev/null 2>&1 && continue
6984
am__tar='tar chf - "$$tardir"'
6985
am__tar_='tar chf - "$tardir"'
6986
am__untar='tar xf -'
6989
am__tar='pax -L -x $1 -w "$$tardir"'
6990
am__tar_='pax -L -x $1 -w "$tardir"'
6994
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
6995
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
6996
am__untar='cpio -i -H $1 -d'
7005
# If the value was cached, stop now. We just wanted to have am__tar
7006
# and am__untar set.
7007
test -n "${am_cv_prog_tar_$1}" && break
7009
# tar/untar a dummy directory, and stop if the command works
7012
echo GrepMe > conftest.dir/file
7013
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7015
if test -s conftest.tar; then
7016
AM_RUN_LOG([$am__untar <conftest.tar])
7017
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7022
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7023
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7025
AC_SUBST([am__untar])
7028
m4_include([scripts/attributes.m4])
7029
m4_include([scripts/checks.m4])
7030
m4_include([scripts/common.m4])
7935
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
7936
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
7937
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7938
_pkg_short_errors_supported=yes
7940
_pkg_short_errors_supported=no
7942
])# _PKG_SHORT_ERRORS_SUPPORTED
7945
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7946
# [ACTION-IF-NOT-FOUND])
7949
# Note that if there is a possibility the first call to
7950
# PKG_CHECK_MODULES might not happen, you should be sure to include an
7951
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7954
# --------------------------------------------------------------
7955
AC_DEFUN([PKG_CHECK_MODULES],
7956
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7957
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7958
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7961
AC_MSG_CHECKING([for $1])
7963
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7964
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
7966
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
7967
and $1[]_LIBS to avoid the need to call pkg-config.
7968
See the pkg-config man page for more details.])
7970
if test $pkg_failed = yes; then
7971
_PKG_SHORT_ERRORS_SUPPORTED
7972
if test $_pkg_short_errors_supported = yes; then
7973
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
7975
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7977
# Put the nasty error message in config.log where it belongs
7978
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
7980
ifelse([$4], , [AC_MSG_ERROR(dnl
7981
[Package requirements ($2) were not met:
7985
Consider adjusting the PKG_CONFIG_PATH environment variable if you
7986
installed software in a non-standard prefix.
7990
[AC_MSG_RESULT([no])
7992
elif test $pkg_failed = untried; then
7993
ifelse([$4], , [AC_MSG_FAILURE(dnl
7994
[The pkg-config script could not be found or is too old. Make sure it
7995
is in your PATH or set the PKG_CONFIG environment variable to the full
8000
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
8003
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8004
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8005
AC_MSG_RESULT([yes])
8006
ifelse([$3], , :, [$3])
8008
])# PKG_CHECK_MODULES