14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17
[m4_warning([this file was generated for autoconf 2.67.
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
18
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
24
# This file is free software; the Free Software Foundation
25
# gives unlimited permission to copy and/or distribute it,
26
# with or without modifications, as long as this notice is preserved.
28
# AM_AUTOMAKE_VERSION(VERSION)
29
# ----------------------------
30
# Automake X.Y traces this macro to ensure aclocal.m4 has been
31
# generated from the m4 files accompanying Automake X.Y.
32
# (This private macro should not be called outside this file.)
33
AC_DEFUN([AM_AUTOMAKE_VERSION],
34
[am__api_version='1.11'
35
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
dnl require some minimum version. Point them to the right macro.
37
m4_if([$1], [1.11.1], [],
38
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
41
# _AM_AUTOCONF_VERSION(VERSION)
42
# -----------------------------
43
# aclocal traces this macro to find the Autoconf version.
44
# This is a private macro too. Using m4_define simplifies
45
# the logic in aclocal, which can simply ignore this definition.
46
m4_define([_AM_AUTOCONF_VERSION], [])
48
# AM_SET_CURRENT_AUTOMAKE_VERSION
49
# -------------------------------
50
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
[AM_AUTOMAKE_VERSION([1.11.1])dnl
54
m4_ifndef([AC_AUTOCONF_VERSION],
55
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
60
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
62
# This file is free software; the Free Software Foundation
63
# gives unlimited permission to copy and/or distribute it,
64
# with or without modifications, as long as this notice is preserved.
66
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
68
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
70
# Of course, Automake must honor this variable whenever it calls a
71
# tool from the auxiliary directory. The problem is that $srcdir (and
72
# therefore $ac_aux_dir as well) can be either absolute or relative,
73
# depending on how configure is run. This is pretty annoying, since
74
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75
# source directory, any form will work fine, but in subdirectories a
76
# relative path needs to be adjusted first.
79
# fails when called from a subdirectory if $ac_aux_dir is relative
80
# $top_srcdir/$ac_aux_dir/missing
81
# fails if $ac_aux_dir is absolute,
82
# fails when called from a subdirectory in a VPATH build with
83
# a relative $ac_aux_dir
85
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86
# are both prefixed by $srcdir. In an in-source build this is usually
87
# harmless because $srcdir is `.', but things will broke when you
88
# start a VPATH build or use an absolute $srcdir.
90
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
92
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93
# and then we would define $MISSING as
94
# MISSING="\${SHELL} $am_aux_dir/missing"
95
# This will work as long as MISSING is not called from configure, because
96
# unfortunately $(top_srcdir) has no meaning in configure.
97
# However there are other variables, like CC, which are often used in
98
# configure, and could therefore not use this "fixed" $ac_aux_dir.
100
# Another solution, used here, is to always expand $ac_aux_dir to an
101
# absolute PATH. The drawback is that using absolute paths prevent a
102
# configured tree to be moved without reconfiguration.
104
AC_DEFUN([AM_AUX_DIR_EXPAND],
105
[dnl Rely on autoconf to set up CDPATH properly.
107
# expand $ac_aux_dir to an absolute path
108
am_aux_dir=`cd $ac_aux_dir && pwd`
111
# AM_CONDITIONAL -*- Autoconf -*-
113
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114
# Free Software Foundation, Inc.
116
# This file is free software; the Free Software Foundation
117
# gives unlimited permission to copy and/or distribute it,
118
# with or without modifications, as long as this notice is preserved.
122
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123
# -------------------------------------
124
# Define a conditional.
125
AC_DEFUN([AM_CONDITIONAL],
127
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
128
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129
AC_SUBST([$1_TRUE])dnl
130
AC_SUBST([$1_FALSE])dnl
131
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133
m4_define([_AM_COND_VALUE_$1], [$2])dnl
141
AC_CONFIG_COMMANDS_PRE(
142
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143
AC_MSG_ERROR([[conditional "$1" was never defined.
144
Usually this means the macro was only invoked conditionally.]])
147
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148
# Free Software Foundation, Inc.
150
# This file is free software; the Free Software Foundation
151
# gives unlimited permission to copy and/or distribute it,
152
# with or without modifications, as long as this notice is preserved.
156
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157
# written in clear, in which case automake, when reading aclocal.m4,
158
# will think it sees a *use*, and therefore will trigger all it's
159
# C support machinery. Also note that it means that autoscan, seeing
160
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
163
# _AM_DEPENDENCIES(NAME)
164
# ----------------------
165
# See how the compiler implements dependency checking.
166
# NAME is "CC", "CXX", "GCJ", or "OBJC".
167
# We try a few techniques and use that to set a single cache variable.
169
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171
# dependency, and given that the user is not expected to run this macro,
172
# just rely on AC_PROG_CC.
173
AC_DEFUN([_AM_DEPENDENCIES],
174
[AC_REQUIRE([AM_SET_DEPDIR])dnl
175
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177
AC_REQUIRE([AM_DEP_TRACK])dnl
179
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
180
[$1], CXX, [depcc="$CXX" am_compiler_list=],
181
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182
[$1], UPC, [depcc="$UPC" am_compiler_list=],
183
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
184
[depcc="$$1" am_compiler_list=])
186
AC_CACHE_CHECK([dependency style of $depcc],
187
[am_cv_$1_dependencies_compiler_type],
188
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189
# We make a subdir and do the tests there. Otherwise we can end up
190
# making bogus files that we don't know about and never remove. For
191
# instance it was reported that on HP-UX the gcc test will end up
192
# making a dummy file named `D' -- because `-MD' means `put the output
195
# Copy depcomp to subdir because otherwise we won't find it if we're
196
# using a relative directory.
197
cp "$am_depcomp" conftest.dir
199
# We will build objects and dependencies in a subdirectory because
200
# it helps to detect inapplicable dependency modes. For instance
201
# both Tru64's cc and ICC support -MD to output dependencies as a
202
# side effect of compilation, but ICC will put the dependencies in
203
# the current directory while Tru64 will put them in the object
207
am_cv_$1_dependencies_compiler_type=none
208
if test "$am_compiler_list" = ""; then
209
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
213
[case " $depcc " in #(
214
*\ -arch\ *\ -arch\ *) am__universal=true ;;
217
[case " $depcc " in #(
218
*\ -arch\ *\ -arch\ *) am__universal=true ;;
221
for depmode in $am_compiler_list; do
222
# Setup a source with many dependencies, because some compilers
223
# like to wrap large dependency lists on column 80 (with \), and
224
# we should not choose a depcomp mode which is confused by this.
226
# We need to recreate these files for each test, as the compiler may
227
# overwrite some of them when testing with obscure command lines.
228
# This happens at least with the AIX C compiler.
230
for i in 1 2 3 4 5 6; do
231
echo '#include "conftst'$i'.h"' >> sub/conftest.c
232
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233
# Solaris 8's {/usr,}/bin/sh.
234
touch sub/conftst$i.h
236
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
238
# We check with `-c' and `-o' for the sake of the "dashmstdout"
239
# mode. It turns out that the SunPro C++ compiler does not properly
240
# handle `-M -o', and we need to detect this. Also, some Intel
241
# versions had trouble with output in subdirs
242
am__obj=sub/conftest.${OBJEXT-o}
243
am__minus_obj="-o $am__obj"
246
# This depmode causes a compiler race in universal mode.
247
test "$am__universal" = false || continue
250
# after this tag, mechanisms are not by side-effect, so they'll
251
# only be used when explicitly requested
252
if test "x$enable_dependency_tracking" = xyes; then
258
msvisualcpp | msvcmsys)
259
# This compiler won't grok `-c -o', but also, the minuso test has
260
# not run yet. These depmodes are late enough in the game, and
261
# so weak that their functioning should not be impacted.
262
am__obj=conftest.${OBJEXT-o}
267
if depmode=$depmode \
268
source=sub/conftest.c object=$am__obj \
269
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271
>/dev/null 2>conftest.err &&
272
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276
# icc doesn't choke on unknown options, it will just issue warnings
277
# or remarks (even with -Werror). So we grep stderr for any message
278
# that says an option was ignored or not supported.
279
# When given -MP, icc 7.0 and 7.1 complain thusly:
280
# icc: Command line warning: ignoring option '-M'; no argument required
281
# The diagnosis changed in icc 8.0:
282
# icc: Command line remark: option '-MP' not supported
283
if (grep 'ignoring option' conftest.err ||
284
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285
am_cv_$1_dependencies_compiler_type=$depmode
294
am_cv_$1_dependencies_compiler_type=none
297
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298
AM_CONDITIONAL([am__fastdep$1], [
299
test "x$enable_dependency_tracking" != xno \
300
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
306
# Choose a directory name for dependency files.
307
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308
AC_DEFUN([AM_SET_DEPDIR],
309
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
316
AC_DEFUN([AM_DEP_TRACK],
317
[AC_ARG_ENABLE(dependency-tracking,
318
[ --disable-dependency-tracking speeds up one-time build
319
--enable-dependency-tracking do not reject slow dependency extractors])
320
if test "x$enable_dependency_tracking" != xno; then
321
am_depcomp="$ac_aux_dir/depcomp"
324
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325
AC_SUBST([AMDEPBACKSLASH])dnl
326
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329
# Generate code to set up dependency tracking. -*- Autoconf -*-
331
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332
# Free Software Foundation, Inc.
334
# This file is free software; the Free Software Foundation
335
# gives unlimited permission to copy and/or distribute it,
336
# with or without modifications, as long as this notice is preserved.
340
# _AM_OUTPUT_DEPENDENCY_COMMANDS
341
# ------------------------------
342
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344
# Autoconf 2.62 quotes --file arguments for eval, but not when files
345
# are listed without --file. Let's play safe and only enable the eval
346
# if we detect the quoting.
347
case $CONFIG_FILES in
348
*\'*) eval set x "$CONFIG_FILES" ;;
349
*) set x $CONFIG_FILES ;;
354
# Strip MF so we end up with the name of the file.
355
mf=`echo "$mf" | sed -e 's/:.*$//'`
356
# Check whether this is an Automake generated Makefile or not.
357
# We used to match only the files named `Makefile.in', but
358
# some people rename them; so instead we look at the file content.
359
# Grep'ing the first line is not enough: some people post-process
360
# each Makefile.in and add a new line on top of each file to say so.
361
# Grep'ing the whole file is not good either: AIX grep has a line
362
# limit of 2048, but all sed's we know have understand at least 4000.
363
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364
dirpart=`AS_DIRNAME("$mf")`
368
# Extract the definition of DEPDIR, am__include, and am__quote
369
# from the Makefile without running `make'.
370
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371
test -z "$DEPDIR" && continue
372
am__include=`sed -n 's/^am__include = //p' < "$mf"`
373
test -z "am__include" && continue
374
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375
# When using ansi2knr, U may be empty or an underscore; expand it
376
U=`sed -n 's/^U = //p' < "$mf"`
377
# Find all dependency output files, they are included files with
378
# $(DEPDIR) in their names. We invoke sed twice because it is the
379
# simplest approach to changing $(DEPDIR) to its actual value in the
381
for file in `sed -n "
382
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384
# Make sure the directory exists.
385
test -f "$dirpart/$file" && continue
386
fdir=`AS_DIRNAME(["$file"])`
387
AS_MKDIR_P([$dirpart/$fdir])
388
# echo "creating $dirpart/$file"
389
echo '# dummy' > "$dirpart/$file"
393
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
396
# AM_OUTPUT_DEPENDENCY_COMMANDS
397
# -----------------------------
398
# This macro should only be invoked once -- use via AC_REQUIRE.
400
# This code is only required when automatic dependency tracking
401
# is enabled. FIXME. This creates each `.P' file that we will
402
# need in order to bootstrap the dependency handling code.
403
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404
[AC_CONFIG_COMMANDS([depfiles],
405
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
409
# Do all the work for Automake. -*- Autoconf -*-
411
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
414
# This file is free software; the Free Software Foundation
415
# gives unlimited permission to copy and/or distribute it,
416
# with or without modifications, as long as this notice is preserved.
420
# This macro actually does too much. Some checks are only needed if
421
# your package does certain things. But this isn't really a big deal.
423
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424
# AM_INIT_AUTOMAKE([OPTIONS])
425
# -----------------------------------------------
426
# The call with PACKAGE and VERSION arguments is the old style
427
# call (pre autoconf-2.50), which is being phased out. PACKAGE
428
# and VERSION should now be passed to AC_INIT and removed from
429
# the call to AM_INIT_AUTOMAKE.
430
# We support both call styles for the transition. After
431
# the next Automake release, Autoconf can make the AC_INIT
432
# arguments mandatory, and then we can depend on a new Autoconf
433
# release and drop the old call support.
434
AC_DEFUN([AM_INIT_AUTOMAKE],
435
[AC_PREREQ([2.62])dnl
436
dnl Autoconf wants to disallow AM_ names. We explicitly allow
437
dnl the ones we care about.
438
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440
AC_REQUIRE([AC_PROG_INSTALL])dnl
441
if test "`cd $srcdir && pwd`" != "`pwd`"; then
442
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443
# is not polluted with repeated "-I."
444
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445
# test to see if srcdir already configured
446
if test -f $srcdir/config.status; then
447
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
451
# test whether we have cygpath
452
if test -z "$CYGPATH_W"; then
453
if (cygpath --version) >/dev/null 2>/dev/null; then
454
CYGPATH_W='cygpath -w'
459
AC_SUBST([CYGPATH_W])
461
# Define the identity of the package.
462
dnl Distinguish between old-style and new-style calls.
464
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465
AC_SUBST([PACKAGE], [$1])dnl
466
AC_SUBST([VERSION], [$2])],
467
[_AM_SET_OPTIONS([$1])dnl
468
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
474
_AM_IF_OPTION([no-define],,
475
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
478
# Some tools Automake needs.
479
AC_REQUIRE([AM_SANITY_CHECK])dnl
480
AC_REQUIRE([AC_ARG_PROGRAM])dnl
481
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482
AM_MISSING_PROG(AUTOCONF, autoconf)
483
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484
AM_MISSING_PROG(AUTOHEADER, autoheader)
485
AM_MISSING_PROG(MAKEINFO, makeinfo)
486
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489
# We need awk for the "check" target. The system "awk" is bad on
491
AC_REQUIRE([AC_PROG_AWK])dnl
492
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496
[_AM_PROG_TAR([v7])])])
497
_AM_IF_OPTION([no-dependencies],,
498
[AC_PROVIDE_IFELSE([AC_PROG_CC],
499
[_AM_DEPENDENCIES(CC)],
500
[define([AC_PROG_CC],
501
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502
AC_PROVIDE_IFELSE([AC_PROG_CXX],
503
[_AM_DEPENDENCIES(CXX)],
504
[define([AC_PROG_CXX],
505
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507
[_AM_DEPENDENCIES(OBJC)],
508
[define([AC_PROG_OBJC],
509
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
511
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
514
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515
AC_CONFIG_COMMANDS_PRE(dnl
516
[m4_provide_if([_AM_COMPILER_EXEEXT],
517
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
520
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
521
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522
dnl mangled by Autoconf and run in a shell conditional statement.
523
m4_define([_AC_COMPILER_EXEEXT],
524
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
527
# When config.status generates a header, we must update the stamp-h file.
528
# This file resides in the same directory as the config header
529
# that is generated. The stamp files are numbered to have different names.
531
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532
# loop where config.status creates the headers, so we can generate
533
# our stamp files there.
534
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535
[# Compute $1's index in $config_headers.
538
for _am_header in $config_headers :; do
540
$_am_arg | $_am_arg:* )
543
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
546
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
548
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
550
# This file is free software; the Free Software Foundation
551
# gives unlimited permission to copy and/or distribute it,
552
# with or without modifications, as long as this notice is preserved.
556
# Define $install_sh.
557
AC_DEFUN([AM_PROG_INSTALL_SH],
558
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559
if test x"${install_sh}" != xset; then
562
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
564
install_sh="\${SHELL} $am_aux_dir/install-sh"
567
AC_SUBST(install_sh)])
569
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
571
# This file is free software; the Free Software Foundation
572
# gives unlimited permission to copy and/or distribute it,
573
# with or without modifications, as long as this notice is preserved.
577
# Check whether the underlying file-system supports filenames
578
# with a leading dot. For instance MS-DOS doesn't.
579
AC_DEFUN([AM_SET_LEADING_DOT],
580
[rm -rf .tst 2>/dev/null
581
mkdir .tst 2>/dev/null
582
if test -d .tst; then
587
rmdir .tst 2>/dev/null
588
AC_SUBST([am__leading_dot])])
590
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
593
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594
# Free Software Foundation, Inc.
596
# This file is free software; the Free Software Foundation
597
# gives unlimited permission to copy and/or distribute it,
598
# with or without modifications, as long as this notice is preserved.
602
# AM_MAINTAINER_MODE([DEFAULT-MODE])
603
# ----------------------------------
604
# Control maintainer-specific portions of Makefiles.
605
# Default is to disable them, unless `enable' is passed literally.
606
# For symmetry, `disable' may be passed as well. Anyway, the user
607
# can override the default with the --enable/--disable switch.
608
AC_DEFUN([AM_MAINTAINER_MODE],
609
[m4_case(m4_default([$1], [disable]),
610
[enable], [m4_define([am_maintainer_other], [disable])],
611
[disable], [m4_define([am_maintainer_other], [enable])],
612
[m4_define([am_maintainer_other], [enable])
613
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616
AC_ARG_ENABLE([maintainer-mode],
617
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
618
(and sometimes confusing) to the casual installer],
619
[USE_MAINTAINER_MODE=$enableval],
620
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623
MAINT=$MAINTAINER_MODE_TRUE
628
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
630
# Check to see how 'make' treats includes. -*- Autoconf -*-
632
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
634
# This file is free software; the Free Software Foundation
635
# gives unlimited permission to copy and/or distribute it,
636
# with or without modifications, as long as this notice is preserved.
642
# Check to see how make treats includes.
643
AC_DEFUN([AM_MAKE_INCLUDE],
644
[am_make=${MAKE-make}
645
cat > confinc << 'END'
647
@echo this is the am__doit target
650
# If we don't find an include directive, just comment out the code.
651
AC_MSG_CHECKING([for style of include used by $am_make])
655
# First try GNU make style include.
656
echo "include confinc" > confmf
657
# Ignore all kinds of additional output from `make'.
658
case `$am_make -s -f confmf 2> /dev/null` in #(
659
*the\ am__doit\ target*)
665
# Now try BSD make style include.
666
if test "$am__include" = "#"; then
667
echo '.include "confinc"' > confmf
668
case `$am_make -s -f confmf 2> /dev/null` in #(
669
*the\ am__doit\ target*)
676
AC_SUBST([am__include])
677
AC_SUBST([am__quote])
678
AC_MSG_RESULT([$_am_result])
682
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
684
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685
# Free Software Foundation, Inc.
687
# This file is free software; the Free Software Foundation
688
# gives unlimited permission to copy and/or distribute it,
689
# with or without modifications, as long as this notice is preserved.
693
# AM_MISSING_PROG(NAME, PROGRAM)
694
# ------------------------------
695
AC_DEFUN([AM_MISSING_PROG],
696
[AC_REQUIRE([AM_MISSING_HAS_RUN])
697
$1=${$1-"${am_missing_run}$2"}
703
# Define MISSING if not defined so far and test if it supports --run.
704
# If it does, set am_missing_run to use it, otherwise, to nothing.
705
AC_DEFUN([AM_MISSING_HAS_RUN],
706
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707
AC_REQUIRE_AUX_FILE([missing])dnl
708
if test x"${MISSING+set}" != xset; then
711
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
713
MISSING="\${SHELL} $am_aux_dir/missing" ;;
716
# Use eval to expand $SHELL
717
if eval "$MISSING --run true"; then
718
am_missing_run="$MISSING --run "
721
AC_MSG_WARN([`missing' script is too old or missing])
725
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
727
# This file is free software; the Free Software Foundation
728
# gives unlimited permission to copy and/or distribute it,
729
# with or without modifications, as long as this notice is preserved.
733
# Check for `mkdir -p'.
734
AC_DEFUN([AM_PROG_MKDIR_P],
735
[AC_PREREQ([2.60])dnl
736
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
738
dnl while keeping a definition of mkdir_p for backward compatibility.
739
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741
dnl Makefile.ins that do not define MKDIR_P, so we do our own
742
dnl adjustment using top_builddir (which is defined more often than
744
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
746
[[\\/$]]* | ?:[[\\/]]*) ;;
747
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
751
# Helper functions for option handling. -*- Autoconf -*-
753
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
755
# This file is free software; the Free Software Foundation
756
# gives unlimited permission to copy and/or distribute it,
757
# with or without modifications, as long as this notice is preserved.
761
# _AM_MANGLE_OPTION(NAME)
762
# -----------------------
763
AC_DEFUN([_AM_MANGLE_OPTION],
764
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
766
# _AM_SET_OPTION(NAME)
767
# ------------------------------
768
# Set option NAME. Presently that only means defining a flag for this option.
769
AC_DEFUN([_AM_SET_OPTION],
770
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
772
# _AM_SET_OPTIONS(OPTIONS)
773
# ----------------------------------
774
# OPTIONS is a space-separated list of Automake options.
775
AC_DEFUN([_AM_SET_OPTIONS],
776
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
778
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779
# -------------------------------------------
780
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781
AC_DEFUN([_AM_IF_OPTION],
782
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
784
# Check to make sure that the build environment is sane. -*- Autoconf -*-
786
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787
# Free Software Foundation, Inc.
789
# This file is free software; the Free Software Foundation
790
# gives unlimited permission to copy and/or distribute it,
791
# with or without modifications, as long as this notice is preserved.
797
AC_DEFUN([AM_SANITY_CHECK],
798
[AC_MSG_CHECKING([whether build environment is sane])
801
echo timestamp > conftest.file
802
# Reject unsafe characters in $srcdir or the absolute working directory
803
# name. Accept space and tab only in the latter.
807
*[[\\\"\#\$\&\'\`$am_lf]]*)
808
AC_MSG_ERROR([unsafe absolute working directory name]);;
811
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
812
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
815
# Do `set' in a subshell so we don't clobber the current shell's
816
# arguments. Must try -L first in case configure is actually a
817
# symlink; some systems play weird games with the mod time of symlinks
818
# (eg FreeBSD returns the mod time of the symlink's containing
821
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822
if test "$[*]" = "X"; then
824
set X `ls -t "$srcdir/configure" conftest.file`
827
if test "$[*]" != "X $srcdir/configure conftest.file" \
828
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
830
# If neither matched, then we have a broken ls. This can happen
831
# if, for instance, CONFIG_SHELL is bash and it inherits a
832
# broken ls alias from the environment. This has actually
833
# happened. Such a system could not be considered "sane".
834
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
835
alias in your environment])
838
test "$[2]" = conftest.file
844
AC_MSG_ERROR([newly created file is older than distributed files!
845
Check your system clock])
849
# Copyright (C) 2009 Free Software Foundation, Inc.
851
# This file is free software; the Free Software Foundation
852
# gives unlimited permission to copy and/or distribute it,
853
# with or without modifications, as long as this notice is preserved.
857
# AM_SILENT_RULES([DEFAULT])
858
# --------------------------
859
# Enable less verbose build rules; with the default set to DEFAULT
860
# (`yes' being less verbose, `no' or empty being verbose).
861
AC_DEFUN([AM_SILENT_RULES],
862
[AC_ARG_ENABLE([silent-rules],
863
[ --enable-silent-rules less verbose build output (undo: `make V=1')
864
--disable-silent-rules verbose build output (undo: `make V=0')])
865
case $enable_silent_rules in
866
yes) AM_DEFAULT_VERBOSITY=0;;
867
no) AM_DEFAULT_VERBOSITY=1;;
868
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
870
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
872
AC_SUBST([AM_BACKSLASH])dnl
873
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
876
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
878
# This file is free software; the Free Software Foundation
879
# gives unlimited permission to copy and/or distribute it,
880
# with or without modifications, as long as this notice is preserved.
882
# AM_PROG_INSTALL_STRIP
883
# ---------------------
884
# One issue with vendor `install' (even GNU) is that you can't
885
# specify the program used to strip binaries. This is especially
886
# annoying in cross-compiling environments, where the build's strip
887
# is unlikely to handle the host's binaries.
888
# Fortunately install-sh will honor a STRIPPROG variable, so we
889
# always use install-sh in `make install-strip', and initialize
890
# STRIPPROG with the value of the STRIP variable (set by the user).
891
AC_DEFUN([AM_PROG_INSTALL_STRIP],
892
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893
# Installed binaries are usually stripped using `strip' when the user
894
# run `make install-strip'. However `strip' might not be the right
895
# tool to use in cross-compilation environments, therefore Automake
896
# will honor the `STRIP' environment variable to overrule this program.
897
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
898
if test "$cross_compiling" != no; then
899
AC_CHECK_TOOL([STRIP], [strip], :)
901
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902
AC_SUBST([INSTALL_STRIP_PROGRAM])])
904
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
906
# This file is free software; the Free Software Foundation
907
# gives unlimited permission to copy and/or distribute it,
908
# with or without modifications, as long as this notice is preserved.
912
# _AM_SUBST_NOTMAKE(VARIABLE)
913
# ---------------------------
914
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
915
# This macro is traced by Automake.
916
AC_DEFUN([_AM_SUBST_NOTMAKE])
918
# AM_SUBST_NOTMAKE(VARIABLE)
919
# ---------------------------
920
# Public sister of _AM_SUBST_NOTMAKE.
921
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
923
# Check how to create a tarball. -*- Autoconf -*-
925
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
927
# This file is free software; the Free Software Foundation
928
# gives unlimited permission to copy and/or distribute it,
929
# with or without modifications, as long as this notice is preserved.
933
# _AM_PROG_TAR(FORMAT)
934
# --------------------
935
# Check how to create a tarball in format FORMAT.
936
# FORMAT should be one of `v7', `ustar', or `pax'.
938
# Substitute a variable $(am__tar) that is a command
939
# writing to stdout a FORMAT-tarball containing the directory
941
# tardir=directory && $(am__tar) > result.tar
943
# Substitute a variable $(am__untar) that extract such
944
# a tarball read from stdin.
945
# $(am__untar) < result.tar
946
AC_DEFUN([_AM_PROG_TAR],
947
[# Always define AMTAR for backward compatibility.
948
AM_MISSING_PROG([AMTAR], [tar])
950
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951
[m4_case([$1], [ustar],, [pax],,
952
[m4_fatal([Unknown tar format])])
953
AC_MSG_CHECKING([how to create a $1 tar archive])
954
# Loop over all known methods to create a tar archive until one works.
955
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
957
# Do not fold the above two line into one, because Tru64 sh and
958
# Solaris sh will not grok spaces in the rhs of `-'.
959
for _am_tool in $_am_tools
963
for _am_tar in tar gnutar gtar;
965
AM_RUN_LOG([$_am_tar --version]) && break
967
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969
am__untar="$_am_tar -xf -"
972
# Must skip GNU tar: if it does not support --format= it doesn't create
973
# ustar tarball either.
974
(tar --version) >/dev/null 2>&1 && continue
975
am__tar='tar chf - "$$tardir"'
976
am__tar_='tar chf - "$tardir"'
980
am__tar='pax -L -x $1 -w "$$tardir"'
981
am__tar_='pax -L -x $1 -w "$tardir"'
985
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987
am__untar='cpio -i -H $1 -d'
996
# If the value was cached, stop now. We just wanted to have am__tar
998
test -n "${am_cv_prog_tar_$1}" && break
1000
# tar/untar a dummy directory, and stop if the command works
1003
echo GrepMe > conftest.dir/file
1004
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1006
if test -s conftest.tar; then
1007
AM_RUN_LOG([$am__untar <conftest.tar])
1008
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1013
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1016
AC_SUBST([am__untar])
1019
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1021
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1023
# This program is free software; you can redistribute it and/or modify
1024
# it under the terms of the GNU General Public License as published by
1025
# the Free Software Foundation; either version 2 of the License, or
1026
# (at your option) any later version.
1028
# This program is distributed in the hope that it will be useful, but
1029
# WITHOUT ANY WARRANTY; without even the implied warranty of
1030
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1031
# General Public License for more details.
1033
# You should have received a copy of the GNU General Public License
1034
# along with this program; if not, write to the Free Software
1035
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1037
# As a special exception to the GNU General Public License, if you
1038
# distribute this file as part of a program that contains a
1039
# configuration script generated by Autoconf, you may include it under
1040
# the same distribution terms that you use for the rest of that program.
1042
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1043
# ----------------------------------
1044
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1045
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1046
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1047
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1048
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1049
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1051
if test -n "$PKG_CONFIG"; then
1052
_pkg_min_version=m4_default([$1], [0.9.0])
1053
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1054
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1055
AC_MSG_RESULT([yes])
1062
])# PKG_PROG_PKG_CONFIG
1064
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1066
# Check to see whether a particular set of modules exists. Similar
1067
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1070
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
1071
# this or PKG_CHECK_MODULES is called, or make sure to call
1072
# PKG_CHECK_EXISTS manually
1073
# --------------------------------------------------------------
1074
AC_DEFUN([PKG_CHECK_EXISTS],
1075
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1076
if test -n "$PKG_CONFIG" && \
1077
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1078
m4_ifval([$2], [$2], [:])
1079
m4_ifvaln([$3], [else
1084
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1085
# ---------------------------------------------
1086
m4_define([_PKG_CONFIG],
1087
[if test -n "$$1"; then
1089
elif test -n "$PKG_CONFIG"; then
1090
PKG_CHECK_EXISTS([$3],
1091
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1098
# _PKG_SHORT_ERRORS_SUPPORTED
1099
# -----------------------------
1100
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1101
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1102
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1103
_pkg_short_errors_supported=yes
1105
_pkg_short_errors_supported=no
1107
])# _PKG_SHORT_ERRORS_SUPPORTED
1110
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1111
# [ACTION-IF-NOT-FOUND])
1114
# Note that if there is a possibility the first call to
1115
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1116
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1119
# --------------------------------------------------------------
1120
AC_DEFUN([PKG_CHECK_MODULES],
1121
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1122
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1123
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1126
AC_MSG_CHECKING([for $1])
1128
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1129
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1131
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1132
and $1[]_LIBS to avoid the need to call pkg-config.
1133
See the pkg-config man page for more details.])
1135
if test $pkg_failed = yes; then
1136
_PKG_SHORT_ERRORS_SUPPORTED
1137
if test $_pkg_short_errors_supported = yes; then
1138
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1140
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1142
# Put the nasty error message in config.log where it belongs
1143
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1145
ifelse([$4], , [AC_MSG_ERROR(dnl
1146
[Package requirements ($2) were not met:
1150
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1151
installed software in a non-standard prefix.
1155
[AC_MSG_RESULT([no])
1157
elif test $pkg_failed = untried; then
1158
ifelse([$4], , [AC_MSG_FAILURE(dnl
1159
[The pkg-config script could not be found or is too old. Make sure it
1160
is in your PATH or set the PKG_CONFIG environment variable to the full
1165
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1168
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1169
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1170
AC_MSG_RESULT([yes])
1171
ifelse([$3], , :, [$3])
1173
])# PKG_CHECK_MODULES
22
1175
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
24
1177
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25
# 2006, 2007, 2008 Free Software Foundation, Inc.
1178
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
26
1180
# Written by Gordon Matzigkeit, 1996
28
1182
# This file is free software; the Free Software Foundation gives
1029
# _LT_SYS_MODULE_PATH_AIX
1030
# -----------------------
2244
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2245
# ----------------------------------
1031
2246
# Links a minimal program and checks the executable
1032
2247
# for the system default hardcoded library path. In most cases,
1033
2248
# this is /usr/lib:/lib, but when the MPI compilers are used
1034
2249
# the location of the communication and MPI libs are included too.
1035
2250
# If we don't find anything, use the default library path according
1036
2251
# to the aix ld manual.
2252
# Store the results from the different compilers for each TAGNAME.
2253
# Allow to override them for all tags through lt_cv_aix_libpath.
1037
2254
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1038
2255
[m4_require([_LT_DECL_SED])dnl
1039
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040
lt_aix_libpath_sed='
1041
/Import File Strings/,/^$/ {
1047
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048
# Check for a 64-bit object if we didn't find anything.
1049
if test -z "$aix_libpath"; then
1050
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1052
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2256
if test "${lt_cv_aix_libpath+set}" = set; then
2257
aix_libpath=$lt_cv_aix_libpath
2259
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2260
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2261
lt_aix_libpath_sed='[
2262
/Import File Strings/,/^$/ {
2264
s/^0 *\([^ ]*\) *$/\1/
2268
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2269
# Check for a 64-bit object if we didn't find anything.
2270
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2271
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2273
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2274
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2277
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1053
2279
])# _LT_SYS_MODULE_PATH_AIX
1056
2282
# _LT_SHELL_INIT(ARG)
1057
2283
# -------------------
1058
2284
m4_define([_LT_SHELL_INIT],
1059
[ifdef([AC_DIVERSION_NOTICE],
1060
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061
[AC_DIVERT_PUSH(NOTICE)])
2285
[m4_divert_text([M4SH-INIT], [$1
2286
])])# _LT_SHELL_INIT
1067
2290
# _LT_PROG_ECHO_BACKSLASH
1068
2291
# -----------------------
1069
# Add some code to the start of the generated configure script which
1070
# will find an echo command which doesn't interpret backslashes.
2292
# Find how we can fake an echo command that does not interpret backslash.
2293
# In particular, with Autoconf 2.60 or later we add some code to the start
2294
# of the generated configure script which will find a shell with a builtin
2295
# printf (which we can use as an echo command).
1071
2296
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1073
# Check that we are running under the correct shell.
1074
SHELL=${CONFIG_SHELL-/bin/sh}
1078
# Remove one level of quotation (which was required for Make).
1079
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2297
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2298
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2299
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2301
AC_MSG_CHECKING([how to print strings])
2302
# Test print first, because it will be a builtin if present.
2303
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2304
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2306
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2309
# Use this function as a fallback that always works.
2310
func_fallback_echo ()
2312
eval 'cat <<_LTECHO_EOF
2316
ECHO='func_fallback_echo'
2319
# func_echo_all arg...
2320
# Invoke $ECHO with all args, space-separated.
2327
printf*) AC_MSG_RESULT([printf]) ;;
2328
print*) AC_MSG_RESULT([print -r]) ;;
2329
*) AC_MSG_RESULT([cat]) ;;
1083
ECHO=${lt_ECHO-echo}
1084
if test "X[$]1" = X--no-reexec; then
1085
# Discard the --no-reexec flag, and continue.
1087
elif test "X[$]1" = X--fallback-echo; then
1088
# Avoid inline document here, it may be left over
1090
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091
# Yippee, $ECHO works!
1094
# Restart under the correct shell.
1095
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1098
if test "X[$]1" = X--fallback-echo; then
1099
# used as fallback echo
1107
# The HP-UX ksh and POSIX shell print the target directory to stdout
1109
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1111
if test -z "$lt_ECHO"; then
1112
if test "X${echo_test_string+set}" != Xset; then
1113
# find a string as large as possible, as long as the shell can cope with it
1114
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1124
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126
test "X$echo_testing_string" = "X$echo_test_string"; then
1129
# The Solaris, AIX, and Digital Unix default echo programs unquote
1130
# backslashes. This makes it impossible to quote backslashes using
1131
# echo "$something" | sed 's/\\/\\\\/g'
1133
# So, first we look for a working echo in the user's PATH.
1135
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136
for dir in $PATH /usr/ucb; do
1138
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141
test "X$echo_testing_string" = "X$echo_test_string"; then
1148
if test "X$ECHO" = Xecho; then
1149
# We didn't find a better echo, so look for alternatives.
1150
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152
test "X$echo_testing_string" = "X$echo_test_string"; then
1153
# This shell has a builtin print -r that does the trick.
1155
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156
test "X$CONFIG_SHELL" != X/bin/ksh; then
1157
# If we have ksh, try running configure again with it.
1158
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159
export ORIGINAL_CONFIG_SHELL
1160
CONFIG_SHELL=/bin/ksh
1162
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1166
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168
test "X$echo_testing_string" = "X$echo_test_string"; then
1169
# Cool, printf works
1171
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172
test "X$echo_testing_string" = 'X\t' &&
1173
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174
test "X$echo_testing_string" = "X$echo_test_string"; then
1175
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1177
SHELL="$CONFIG_SHELL"
1179
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181
test "X$echo_testing_string" = 'X\t' &&
1182
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183
test "X$echo_testing_string" = "X$echo_test_string"; then
1184
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1186
# maybe with a smaller string...
1189
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1197
if test "$prev" != 'sed 50q "[$]0"'; then
1198
echo_test_string=`eval $prev`
1199
export echo_test_string
1200
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1202
# Oops. We lost completely, so just stick with echo.
1211
# Copy echo and quote the copy suitably for passing to libtool from
1212
# the Makefile, instead of quoting the original, which is used later.
1214
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2332
m4_ifdef([_AS_DETECT_SUGGESTED],
2333
[_AS_DETECT_SUGGESTED([
2334
test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2335
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2336
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2337
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2338
PATH=/empty FPATH=/empty; export PATH FPATH
2339
test "X`printf %s $ECHO`" = "X$ECHO" \
2340
|| test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1220
2342
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221
_LT_DECL([], [ECHO], [1],
1222
[An echo program that does not interpret backslashes])
2343
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1223
2344
])# _LT_PROG_ECHO_BACKSLASH
2349
AC_DEFUN([_LT_WITH_SYSROOT],
2350
[AC_MSG_CHECKING([for sysroot])
2351
AC_ARG_WITH([sysroot],
2352
[ --with-sysroot[=DIR] Search for dependent libraries within DIR
2353
(or the compiler's sysroot if not specified).],
2354
[], [with_sysroot=no])
2356
dnl lt_sysroot will always be passed unquoted. We quote it here
2357
dnl in case the user passed a directory name.
2359
case ${with_sysroot} in #(
2361
if test "$GCC" = yes; then
2362
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2366
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2371
AC_MSG_RESULT([${with_sysroot}])
2372
AC_MSG_ERROR([The sysroot must be an absolute path.])
2376
AC_MSG_RESULT([${lt_sysroot:-no}])
2377
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2378
[dependent libraries, and in which our libraries should be installed.])])
1226
2380
# _LT_ENABLE_LOCK
1227
2381
# ---------------
1228
2382
m4_defun([_LT_ENABLE_LOCK],
7175
8828
])# _LT_CHECK_SHELL_FEATURES
7178
# _LT_PROG_XSI_SHELLFNS
7179
# ---------------------
7180
# Bourne and XSI compatible variants of some useful shell functions.
7181
m4_defun([_LT_PROG_XSI_SHELLFNS],
7184
cat << \_LT_EOF >> "$cfgfile"
7186
# func_dirname file append nondir_replacement
7187
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7188
# otherwise set result to NONDIR_REPLACEMENT.
7192
*/*) func_dirname_result="${1%/*}${2}" ;;
7193
* ) func_dirname_result="${3}" ;;
7197
# func_basename file
7200
func_basename_result="${1##*/}"
7203
# func_dirname_and_basename file append nondir_replacement
7204
# perform func_basename and func_dirname in a single function
7206
# dirname: Compute the dirname of FILE. If nonempty,
7207
# add APPEND to the result, otherwise set result
7208
# to NONDIR_REPLACEMENT.
7209
# value returned in "$func_dirname_result"
7210
# basename: Compute filename of FILE.
7211
# value retuned in "$func_basename_result"
7212
# Implementation must be kept synchronized with func_dirname
7213
# and func_basename. For efficiency, we do not delegate to
7214
# those functions but instead duplicate the functionality here.
7215
func_dirname_and_basename ()
7218
*/*) func_dirname_result="${1%/*}${2}" ;;
7219
* ) func_dirname_result="${3}" ;;
7221
func_basename_result="${1##*/}"
7224
# func_stripname prefix suffix name
7225
# strip PREFIX and SUFFIX off of NAME.
7226
# PREFIX and SUFFIX must not contain globbing or regex special
7227
# characters, hashes, percent signs, but SUFFIX may contain a leading
7228
# dot (in which case that matches only a dot).
7231
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7232
# positional parameters, so assign one to ordinary parameter first.
7233
func_stripname_result=${3}
7234
func_stripname_result=${func_stripname_result#"${1}"}
7235
func_stripname_result=${func_stripname_result%"${2}"}
7241
func_opt_split_opt=${1%%=*}
7242
func_opt_split_arg=${1#*=}
7249
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7250
*) func_lo2o_result=${1} ;;
7254
# func_xform libobj-or-source
7257
func_xform_result=${1%.*}.lo
7260
# func_arith arithmetic-term...
7263
func_arith_result=$(( $[*] ))
7267
# STRING may not start with a hyphen.
7270
func_len_result=${#1}
7275
*) # Bourne compatible functions.
7276
cat << \_LT_EOF >> "$cfgfile"
7278
# func_dirname file append nondir_replacement
7279
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7280
# otherwise set result to NONDIR_REPLACEMENT.
7283
# Extract subdirectory from the argument.
7284
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7285
if test "X$func_dirname_result" = "X${1}"; then
7286
func_dirname_result="${3}"
7288
func_dirname_result="$func_dirname_result${2}"
7292
# func_basename file
7295
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7298
dnl func_dirname_and_basename
7299
dnl A portable version of this function is already defined in general.m4sh
7300
dnl so there is no need for it here.
7302
# func_stripname prefix suffix name
7303
# strip PREFIX and SUFFIX off of NAME.
7304
# PREFIX and SUFFIX must not contain globbing or regex special
7305
# characters, hashes, percent signs, but SUFFIX may contain a leading
7306
# dot (in which case that matches only a dot).
7307
# func_strip_suffix prefix name
7311
.*) func_stripname_result=`$ECHO "X${3}" \
7312
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7313
*) func_stripname_result=`$ECHO "X${3}" \
7314
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7319
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7320
my_sed_long_arg='1s/^-[[^=]]*=//'
7325
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7326
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7332
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7335
# func_xform libobj-or-source
7338
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7341
# func_arith arithmetic-term...
7344
func_arith_result=`expr "$[@]"`
7348
# STRING may not start with a hyphen.
7351
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7357
case $lt_shell_append in
7359
cat << \_LT_EOF >> "$cfgfile"
7361
# func_append var value
7362
# Append VALUE to the end of shell variable VAR.
7370
cat << \_LT_EOF >> "$cfgfile"
7372
# func_append var value
7373
# Append VALUE to the end of shell variable VAR.
7376
eval "$[1]=\$$[1]\$[2]"
8831
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8832
# ------------------------------------------------------
8833
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8834
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8835
m4_defun([_LT_PROG_FUNCTION_REPLACE],
8837
sed -e '/^$1 ()$/,/^} # $1 /c\
8840
m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8841
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8842
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8843
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8844
test 0 -eq $? || _lt_function_replace_fail=:
8848
# _LT_PROG_REPLACE_SHELLFNS
8849
# -------------------------
8850
# Replace existing portable implementations of several shell functions with
8851
# equivalent extended shell implementations where those features are available..
8852
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8853
[if test x"$xsi_shell" = xyes; then
8854
_LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8856
*/*) func_dirname_result="${1%/*}${2}" ;;
8857
* ) func_dirname_result="${3}" ;;
8860
_LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8861
func_basename_result="${1##*/}"])
8863
_LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8865
*/*) func_dirname_result="${1%/*}${2}" ;;
8866
* ) func_dirname_result="${3}" ;;
8868
func_basename_result="${1##*/}"])
8870
_LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8871
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8872
# positional parameters, so assign one to ordinary parameter first.
8873
func_stripname_result=${3}
8874
func_stripname_result=${func_stripname_result#"${1}"}
8875
func_stripname_result=${func_stripname_result%"${2}"}])
8877
_LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8878
func_split_long_opt_name=${1%%=*}
8879
func_split_long_opt_arg=${1#*=}])
8881
_LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8882
func_split_short_opt_arg=${1#??}
8883
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8885
_LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8887
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8888
*) func_lo2o_result=${1} ;;
8891
_LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8893
_LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8895
_LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
8898
if test x"$lt_shell_append" = xyes; then
8899
_LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8901
_LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8902
func_quote_for_eval "${2}"
8903
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8904
eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8906
# Save a `func_append' function call where possible by direct use of '+='
8907
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8908
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8909
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8910
test 0 -eq $? || _lt_function_replace_fail=:
8912
# Save a `func_append' function call even when '+=' is not available
8913
sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8914
&& mv -f "$cfgfile.tmp" "$cfgfile" \
8915
|| (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8916
test 0 -eq $? || _lt_function_replace_fail=:
8919
if test x"$_lt_function_replace_fail" = x":"; then
8920
AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8924
# _LT_PATH_CONVERSION_FUNCTIONS
8925
# -----------------------------
8926
# Determine which file name conversion functions should be used by
8927
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8928
# for certain cross-compile configurations and native mingw.
8929
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8930
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8931
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8932
AC_MSG_CHECKING([how to convert $build file names to $host format])
8933
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8937
*-*-mingw* ) # actually msys
8938
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8941
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8943
* ) # otherwise, assume *nix
8944
lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8950
*-*-mingw* ) # actually msys
8951
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8954
lt_cv_to_host_file_cmd=func_convert_file_noop
8956
* ) # otherwise, assume *nix
8957
lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8961
* ) # unhandled hosts (and "normal" native builds)
8962
lt_cv_to_host_file_cmd=func_convert_file_noop
8966
to_host_file_cmd=$lt_cv_to_host_file_cmd
8967
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8968
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8969
[0], [convert $build file names to $host format])dnl
8971
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8972
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8973
[#assume ordinary cross tools, or native build.
8974
lt_cv_to_tool_file_cmd=func_convert_file_noop
8978
*-*-mingw* ) # actually msys
8979
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8985
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8986
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8987
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8988
[0], [convert $build files to toolchain format])dnl
8989
])# _LT_PATH_CONVERSION_FUNCTIONS
7384
8991
# Helper functions for option handling. -*- Autoconf -*-
7386
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8993
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
7387
8995
# Written by Gary V. Vaughan, 2004
7389
8997
# This file is free software; the Free Software Foundation gives
7390
8998
# unlimited permission to copy and/or distribute it, with or without
7391
8999
# modifications, as long as this notice is preserved.
7393
# serial 6 ltoptions.m4
9001
# serial 7 ltoptions.m4
7395
9003
# This is to help aclocal find these macros, as it can't see m4_define.
7396
9004
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9001
10612
# parm1: specify the default value, yes or no.
9003
10614
AC_DEFUN([XORG_ENABLE_SPECS],[
9005
if test "x$spec_default" = x ; then
10615
m4_define([spec_default], m4_default([$1], [yes]))
9008
10616
AC_ARG_ENABLE(specs,
9009
10617
AS_HELP_STRING([--enable-specs],
9010
[Enable building the specs (default: yes)]),
9011
[build_specs=$enableval], [build_specs=$spec_default])
10618
[Enable building the specs (default: ]spec_default[)]),
10619
[build_specs=$enableval], [build_specs=]spec_default)
10620
m4_undefine([spec_default])
9012
10621
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
9013
10622
AC_MSG_CHECKING([whether to build functional specifications])
9014
10623
AC_MSG_RESULT([$build_specs])
9015
10624
]) # XORG_ENABLE_SPECS
10626
# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10627
# ----------------------------------------------
10628
# Minimum version: 1.13.0
10630
# This macro enables a builder to enable/disable unit testing
10631
# It makes no assumption about the test cases implementation
10632
# Test cases may or may not use Automake "Support for test suites"
10633
# They may or may not use the software utility library GLib
10635
# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10636
# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10637
# The variable enable_unit_tests is used by other macros in this file.
10639
# Interface to module:
10640
# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
10641
# enable_unit_tests: used in configure.ac for additional configuration
10642
# --enable-unit-tests: 'yes' user instructs the module to build tests
10643
# 'no' user instructs the module not to build tests
10644
# parm1: specify the default value, yes or no.
10646
AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10647
AC_BEFORE([$0], [XORG_WITH_GLIB])
10648
AC_BEFORE([$0], [XORG_LD_WRAP])
10649
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10650
m4_define([_defopt], m4_default([$1], [auto]))
10651
AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10652
[Enable building unit test cases (default: ]_defopt[)]),
10653
[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10654
m4_undefine([_defopt])
10655
AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10656
AC_MSG_CHECKING([whether to build unit test cases])
10657
AC_MSG_RESULT([$enable_unit_tests])
10658
]) # XORG_ENABLE_UNIT_TESTS
10660
# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
10661
# ------------------------------------------------------
10662
# Minimum version: 1.17.0
10664
# This macro enables a builder to enable/disable integration testing
10665
# It makes no assumption about the test cases' implementation
10666
# Test cases may or may not use Automake "Support for test suites"
10668
# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
10669
# usually requires less dependencies and may be built and run under less
10670
# stringent environments than integration tests.
10672
# Interface to module:
10673
# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests
10674
# enable_integration_tests: used in configure.ac for additional configuration
10675
# --enable-integration-tests: 'yes' user instructs the module to build tests
10676
# 'no' user instructs the module not to build tests
10677
# parm1: specify the default value, yes or no.
10679
AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
10680
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
10681
m4_define([_defopt], m4_default([$1], [auto]))
10682
AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
10683
[Enable building integration test cases (default: ]_defopt[)]),
10684
[enable_integration_tests=$enableval],
10685
[enable_integration_tests=]_defopt)
10686
m4_undefine([_defopt])
10687
AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
10688
[test "x$enable_integration_tests" != xno])
10689
AC_MSG_CHECKING([whether to build unit test cases])
10690
AC_MSG_RESULT([$enable_integration_tests])
10691
]) # XORG_ENABLE_INTEGRATION_TESTS
10693
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10694
# ----------------------------------------
10695
# Minimum version: 1.13.0
10697
# GLib is a library which provides advanced data structures and functions.
10698
# This macro enables a module to test for the presence of Glib.
10700
# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10701
# Otherwise the value of $enable_unit_tests is blank.
10703
# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
10704
# test support usually requires less dependencies and may be built and run under
10705
# less stringent environments than integration tests.
10707
# Interface to module:
10708
# HAVE_GLIB: used in makefiles to conditionally build targets
10709
# with_glib: used in configure.ac to know if GLib has been found
10710
# --with-glib: 'yes' user instructs the module to use glib
10711
# 'no' user instructs the module not to use glib
10713
AC_DEFUN([XORG_WITH_GLIB],[
10714
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10715
m4_define([_defopt], m4_default([$2], [auto]))
10716
AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
10717
[Use GLib library for unit testing (default: ]_defopt[)]),
10718
[with_glib=$withval], [with_glib=]_defopt)
10719
m4_undefine([_defopt])
10722
# Do not probe GLib if user explicitly disabled unit testing
10723
if test "x$enable_unit_tests" != x"no"; then
10724
# Do not probe GLib if user explicitly disabled it
10725
if test "x$with_glib" != x"no"; then
10728
[PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
10729
[PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
10734
# Not having GLib when unit testing has been explicitly requested is an error
10735
if test "x$enable_unit_tests" = x"yes"; then
10736
if test "x$have_glib" = x"no"; then
10737
AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10741
# Having unit testing disabled when GLib has been explicitly requested is an error
10742
if test "x$enable_unit_tests" = x"no"; then
10743
if test "x$with_glib" = x"yes"; then
10744
AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10748
# Not having GLib when it has been explicitly requested is an error
10749
if test "x$with_glib" = x"yes"; then
10750
if test "x$have_glib" = x"no"; then
10751
AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
10755
AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
10756
]) # XORG_WITH_GLIB
10758
# XORG_LD_WRAP([required|optional])
10759
# ---------------------------------
10760
# Minimum version: 1.13.0
10762
# Check if linker supports -wrap, passed via compiler flags
10764
# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
10765
# Otherwise the value of $enable_unit_tests is blank.
10767
# Argument added in 1.16.0 - default is "required", to match existing behavior
10768
# of returning an error if enable_unit_tests is yes, and ld -wrap is not
10769
# available, an argument of "optional" allows use when some unit tests require
10770
# ld -wrap and others do not.
10772
AC_DEFUN([XORG_LD_WRAP],[
10773
XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
10774
[AC_LANG_PROGRAM([#include <stdlib.h>
10775
void __wrap_exit(int status) { return; }],
10777
# Not having ld wrap when unit testing has been explicitly requested is an error
10778
if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
10779
if test "x$have_ld_wrap" = x"no"; then
10780
AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
10783
AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
10787
# XORG_CHECK_LINKER_FLAGS
10788
# -----------------------
10791
# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
10795
# Check whether the given linker FLAGS work with the current language's
10796
# linker, or whether they give an error.
10798
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
10801
# PROGRAM-SOURCE is the program source to link with, if needed
10803
# NOTE: Based on AX_CHECK_COMPILER_FLAGS.
10807
# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
10808
# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
10809
# Copyright (c) 2009 Matteo Frigo
10811
# This program is free software: you can redistribute it and/or modify it
10812
# under the terms of the GNU General Public License as published by the
10813
# Free Software Foundation, either version 3 of the License, or (at your
10814
# option) any later version.
10816
# This program is distributed in the hope that it will be useful, but
10817
# WITHOUT ANY WARRANTY; without even the implied warranty of
10818
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10819
# Public License for more details.
10821
# You should have received a copy of the GNU General Public License along
10822
# with this program. If not, see <http://www.gnu.org/licenses/>.
10824
# As a special exception, the respective Autoconf Macro's copyright owner
10825
# gives unlimited permission to copy, distribute and modify the configure
10826
# scripts that are the output of Autoconf when processing the Macro. You
10827
# need not follow the terms of the GNU General Public License when using
10828
# or distributing such scripts, even though portions of the text of the
10829
# Macro appear in them. The GNU General Public License (GPL) does govern
10830
# all other use of the material that constitutes the Autoconf Macro.
10832
# This special exception to the GPL applies to versions of the Autoconf
10833
# Macro released by the Autoconf Archive. When you make and distribute a
10834
# modified version of the Autoconf Macro, you may extend this special
10835
# exception to the GPL to apply to your modified version as well.#
10836
AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
10837
[AC_MSG_CHECKING([whether the linker accepts $1])
10838
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
10839
AS_LITERAL_IF([$1],
10840
[AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
10841
ax_save_FLAGS=$LDFLAGS
10843
AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
10844
AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10845
AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10846
LDFLAGS=$ax_save_FLAGS])],
10847
[ax_save_FLAGS=$LDFLAGS
10849
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
10850
eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10851
eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10852
LDFLAGS=$ax_save_FLAGS])
10853
eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
10854
AC_MSG_RESULT($xorg_check_linker_flags)
10855
if test "x$xorg_check_linker_flags" = xyes; then
10856
m4_default([$2], :)
10858
m4_default([$3], :)
10860
]) # XORG_CHECK_LINKER_FLAGS
10862
# XORG_MEMORY_CHECK_FLAGS
10863
# -----------------------
10864
# Minimum version: 1.16.0
10866
# This macro attempts to find appropriate memory checking functionality
10867
# for various platforms which unit testing code may use to catch various
10868
# forms of memory allocation and access errors in testing.
10870
# Interface to module:
10871
# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
10872
# Usually added to TESTS_ENVIRONMENT in Makefile.am
10874
# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
10876
AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
10878
AC_REQUIRE([AC_CANONICAL_HOST])
10879
AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
10880
[Environment variables to enable memory checking in tests])
10882
# Check for different types of support on different platforms
10885
AC_CHECK_LIB([umem], [umem_alloc],
10886
[malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
10888
*-gnu*) # GNU libc - Value is used as a single byte bit pattern,
10889
# both directly and inverted, so should not be 0 or 255.
10890
malloc_debug_env='MALLOC_PERTURB_=15'
10893
malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
10896
malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
10900
# User supplied flags override default flags
10901
if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
10902
malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
10905
AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
10906
]) # XORG_WITH_LINT
9017
10908
# XORG_CHECK_MALLOC_ZERO
9018
10909
# ----------------------
9019
10910
# Minimum version: 1.0.0
9168
11057
]) # XORG_LINT_LIBRARY
11059
# XORG_COMPILER_BRAND
11060
# -------------------
11061
# Minimum version: 1.14.0
11063
# Checks for various brands of compilers and sets flags as appropriate:
11064
# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
11065
# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
11066
# clang compiler - sets CLANGCC to "yes"
11067
# Intel compiler - sets INTELCC to "yes"
11068
# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
11070
AC_DEFUN([XORG_COMPILER_BRAND], [
11073
AC_REQUIRE([AC_PROG_CC_C99])
11076
AC_REQUIRE([AC_PROG_CXX])
11079
AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
11080
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
11081
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
11082
]) # XORG_COMPILER_BRAND
11084
# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
11086
# Minimum version: 1.16.0
11088
# Test if the compiler works when passed the given flag as a command line argument.
11089
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the
11090
# next flag in the list until there are no more options.
11092
# Note that this does not guarantee that the compiler supports the flag as some
11093
# compilers will simply ignore arguments that they do not understand, but we do
11094
# attempt to weed out false positives by using -Werror=unknown-warning-option and
11095
# -Werror=unused-command-line-argument
11097
AC_DEFUN([XORG_TESTSET_CFLAG], [
11098
m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11099
m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11101
AC_LANG_COMPILER_REQUIRE
11105
AC_REQUIRE([AC_PROG_CC_C99])
11106
define([PREFIX], [C])
11107
define([CACHE_PREFIX], [cc])
11108
define([COMPILER], [$CC])
11111
define([PREFIX], [CXX])
11112
define([CACHE_PREFIX], [cxx])
11113
define([COMPILER], [$CXX])
11117
[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
11119
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
11120
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11121
AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
11122
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
11123
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11124
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
11125
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
11126
[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
11127
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11130
if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
11131
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
11132
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11134
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11135
AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
11136
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
11137
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11138
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
11139
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
11140
[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
11141
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11145
m4_foreach([flag], m4_cdr($@), [
11146
if test $found = "no" ; then
11147
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
11148
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11151
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
11152
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11155
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
11157
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
11158
AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
11159
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
11160
AC_CACHE_VAL($cacheid,
11161
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
11162
[eval $cacheid=yes],
11163
[eval $cacheid=no])])
11165
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11167
eval supported=\$$cacheid
11168
AC_MSG_RESULT([$supported])
11169
if test "$supported" = "yes" ; then
11175
]) # XORG_TESTSET_CFLAG
11177
# XORG_COMPILER_FLAGS
11179
# Minimum version: 1.16.0
11181
# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
11182
# arguments supported by the selected compiler which do NOT alter the generated
11183
# code. These arguments will cause the compiler to print various warnings
11184
# during compilation AND turn a conservative set of warnings into errors.
11186
# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
11187
# future versions of util-macros as options are added to new compilers.
11189
AC_DEFUN([XORG_COMPILER_FLAGS], [
11190
AC_REQUIRE([XORG_COMPILER_BRAND])
11192
AC_ARG_ENABLE(selective-werror,
11193
AS_HELP_STRING([--disable-selective-werror],
11194
[Turn off selective compiler errors. (default: enabled)]),
11195
[SELECTIVE_WERROR=$enableval],
11196
[SELECTIVE_WERROR=yes])
11200
define([PREFIX], [C])
11203
define([PREFIX], [CXX])
11206
# -v is too short to test reliably with XORG_TESTSET_CFLAG
11207
if test "x$SUNCC" = "xyes"; then
11208
[BASE_]PREFIX[FLAGS]="-v"
11210
[BASE_]PREFIX[FLAGS]=""
11213
# This chunk of warnings were those that existed in the legacy CWARNFLAGS
11214
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
11215
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
11216
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
11217
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
11221
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
11222
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
11223
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
11224
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
11225
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
11226
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
11230
# This chunk adds additional warnings that could catch undesired effects.
11231
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
11232
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
11233
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
11234
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
11235
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
11236
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
11237
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
11239
# These are currently disabled because they are noisy. They will be enabled
11240
# in the future once the codebase is sufficiently modernized to silence
11241
# them. For now, I don't want them to drown out the other warnings.
11242
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
11243
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
11244
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
11246
# Turn some warnings into errors, so we don't accidently get successful builds
11247
# when there are problems that should be fixed.
11249
if test "x$SELECTIVE_WERROR" = "xyes" ; then
11250
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11251
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
11252
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
11253
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
11254
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
11255
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
11256
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11257
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
11258
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
11259
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
11260
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
11261
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11262
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11264
AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
11265
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
11266
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
11267
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
11268
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
11269
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
11270
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
11271
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
11272
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
11273
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
11274
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
11275
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
11276
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
11277
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11280
AC_SUBST([BASE_]PREFIX[FLAGS])
11281
]) # XORG_COMPILER_FLAGS
9170
11283
# XORG_CWARNFLAGS
9171
11284
# ---------------
9172
11285
# Minimum version: 1.2.0
11286
# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
9174
11288
# Defines CWARNFLAGS to enable C compiler warnings.
11290
# This function is deprecated because it defines -fno-strict-aliasing
11291
# which alters the code generated by the compiler. If -fno-strict-aliasing
11292
# is needed, then it should be added explicitly in the module when
11293
# it is updated to use BASE_CFLAGS.
9176
11295
AC_DEFUN([XORG_CWARNFLAGS], [
9177
AC_REQUIRE([AC_PROG_CC_C99])
9178
if test "x$GCC" = xyes ; then
9179
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
9180
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
9181
-Wbad-function-cast -Wformat=2"
9182
case `$CC -dumpversion` in
9184
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
9188
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9189
if test "x$SUNCC" = "xyes"; then
9193
AC_SUBST(CWARNFLAGS)
11296
AC_REQUIRE([XORG_COMPILER_FLAGS])
11297
AC_REQUIRE([XORG_COMPILER_BRAND])
11300
CWARNFLAGS="$BASE_CFLAGS"
11301
if test "x$GCC" = xyes ; then
11302
CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
11304
AC_SUBST(CWARNFLAGS)
9194
11307
]) # XORG_CWARNFLAGS
9196
11309
# XORG_STRICT_OPTION
9197
11310
# -----------------------
9198
11311
# Minimum version: 1.3.0
9200
# Add configure option to enable strict compilation
11313
# Add configure option to enable strict compilation flags, such as treating
11314
# warnings as fatal errors.
11315
# If --enable-strict-compilation is passed to configure, adds strict flags to
11316
# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
11318
# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11319
# when strict compilation is unconditionally desired.
9201
11320
AC_DEFUN([XORG_STRICT_OPTION], [
9202
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
9203
AC_REQUIRE([AC_PROG_CC_C99])
9204
11321
AC_REQUIRE([XORG_CWARNFLAGS])
11322
AC_REQUIRE([XORG_COMPILER_FLAGS])
9206
11324
AC_ARG_ENABLE(strict-compilation,
9207
11325
AS_HELP_STRING([--enable-strict-compilation],
9208
11326
[Enable all warnings from compiler and make them errors (default: disabled)]),
9209
11327
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11331
define([PREFIX], [C])
11334
define([PREFIX], [CXX])
11338
[STRICT_]PREFIX[FLAGS]=""
11339
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
11340
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
11342
# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
11343
# activate it with -Werror, so we add it here explicitly.
11344
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
9210
11346
if test "x$STRICT_COMPILE" = "xyes"; then
9211
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9212
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
9213
if test "x$GCC" = xyes ; then
9214
STRICT_CFLAGS="-pedantic -Werror"
9215
elif test "x$SUNCC" = "xyes"; then
9216
STRICT_CFLAGS="-errwarn"
9217
elif test "x$INTELCC" = "xyes"; then
9218
STRICT_CFLAGS="-Werror"
11347
[BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
11348
AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
9221
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
9222
AC_SUBST([CWARNFLAGS])
11350
AC_SUBST([STRICT_]PREFIX[FLAGS])
11351
AC_SUBST([BASE_]PREFIX[FLAGS])
11352
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
9223
11353
]) # XORG_STRICT_OPTION
9225
11355
# XORG_DEFAULT_OPTIONS
9374
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9376
# This file is free software; the Free Software Foundation
9377
# gives unlimited permission to copy and/or distribute it,
9378
# with or without modifications, as long as this notice is preserved.
9380
# AM_AUTOMAKE_VERSION(VERSION)
9381
# ----------------------------
9382
# Automake X.Y traces this macro to ensure aclocal.m4 has been
9383
# generated from the m4 files accompanying Automake X.Y.
9384
# (This private macro should not be called outside this file.)
9385
AC_DEFUN([AM_AUTOMAKE_VERSION],
9386
[am__api_version='1.11'
9387
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9388
dnl require some minimum version. Point them to the right macro.
9389
m4_if([$1], [1.11.1], [],
9390
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9393
# _AM_AUTOCONF_VERSION(VERSION)
9394
# -----------------------------
9395
# aclocal traces this macro to find the Autoconf version.
9396
# This is a private macro too. Using m4_define simplifies
9397
# the logic in aclocal, which can simply ignore this definition.
9398
m4_define([_AM_AUTOCONF_VERSION], [])
9400
# AM_SET_CURRENT_AUTOMAKE_VERSION
9401
# -------------------------------
9402
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9403
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9404
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9405
[AM_AUTOMAKE_VERSION([1.11.1])dnl
9406
m4_ifndef([AC_AUTOCONF_VERSION],
9407
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9408
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9410
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
9412
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9414
# This file is free software; the Free Software Foundation
9415
# gives unlimited permission to copy and/or distribute it,
9416
# with or without modifications, as long as this notice is preserved.
9418
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9419
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
9420
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9422
# Of course, Automake must honor this variable whenever it calls a
9423
# tool from the auxiliary directory. The problem is that $srcdir (and
9424
# therefore $ac_aux_dir as well) can be either absolute or relative,
9425
# depending on how configure is run. This is pretty annoying, since
9426
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9427
# source directory, any form will work fine, but in subdirectories a
9428
# relative path needs to be adjusted first.
9430
# $ac_aux_dir/missing
9431
# fails when called from a subdirectory if $ac_aux_dir is relative
9432
# $top_srcdir/$ac_aux_dir/missing
9433
# fails if $ac_aux_dir is absolute,
9434
# fails when called from a subdirectory in a VPATH build with
9435
# a relative $ac_aux_dir
9437
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9438
# are both prefixed by $srcdir. In an in-source build this is usually
9439
# harmless because $srcdir is `.', but things will broke when you
9440
# start a VPATH build or use an absolute $srcdir.
9442
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9443
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9444
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9445
# and then we would define $MISSING as
9446
# MISSING="\${SHELL} $am_aux_dir/missing"
9447
# This will work as long as MISSING is not called from configure, because
9448
# unfortunately $(top_srcdir) has no meaning in configure.
9449
# However there are other variables, like CC, which are often used in
9450
# configure, and could therefore not use this "fixed" $ac_aux_dir.
9452
# Another solution, used here, is to always expand $ac_aux_dir to an
9453
# absolute PATH. The drawback is that using absolute paths prevent a
9454
# configured tree to be moved without reconfiguration.
9456
AC_DEFUN([AM_AUX_DIR_EXPAND],
9457
[dnl Rely on autoconf to set up CDPATH properly.
9458
AC_PREREQ([2.50])dnl
9459
# expand $ac_aux_dir to an absolute path
9460
am_aux_dir=`cd $ac_aux_dir && pwd`
9463
# AM_CONDITIONAL -*- Autoconf -*-
9465
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9466
# Free Software Foundation, Inc.
9468
# This file is free software; the Free Software Foundation
9469
# gives unlimited permission to copy and/or distribute it,
9470
# with or without modifications, as long as this notice is preserved.
9474
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9475
# -------------------------------------
9476
# Define a conditional.
9477
AC_DEFUN([AM_CONDITIONAL],
9479
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9480
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9481
AC_SUBST([$1_TRUE])dnl
9482
AC_SUBST([$1_FALSE])dnl
9483
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9484
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9485
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9493
AC_CONFIG_COMMANDS_PRE(
9494
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9495
AC_MSG_ERROR([[conditional "$1" was never defined.
9496
Usually this means the macro was only invoked conditionally.]])
9499
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9500
# Free Software Foundation, Inc.
9502
# This file is free software; the Free Software Foundation
9503
# gives unlimited permission to copy and/or distribute it,
9504
# with or without modifications, as long as this notice is preserved.
9508
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9509
# written in clear, in which case automake, when reading aclocal.m4,
9510
# will think it sees a *use*, and therefore will trigger all it's
9511
# C support machinery. Also note that it means that autoscan, seeing
9512
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9515
# _AM_DEPENDENCIES(NAME)
9516
# ----------------------
9517
# See how the compiler implements dependency checking.
9518
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9519
# We try a few techniques and use that to set a single cache variable.
9521
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9522
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9523
# dependency, and given that the user is not expected to run this macro,
9524
# just rely on AC_PROG_CC.
9525
AC_DEFUN([_AM_DEPENDENCIES],
9526
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9527
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9528
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9529
AC_REQUIRE([AM_DEP_TRACK])dnl
9531
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9532
[$1], CXX, [depcc="$CXX" am_compiler_list=],
9533
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9534
[$1], UPC, [depcc="$UPC" am_compiler_list=],
9535
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9536
[depcc="$$1" am_compiler_list=])
9538
AC_CACHE_CHECK([dependency style of $depcc],
9539
[am_cv_$1_dependencies_compiler_type],
9540
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9541
# We make a subdir and do the tests there. Otherwise we can end up
9542
# making bogus files that we don't know about and never remove. For
9543
# instance it was reported that on HP-UX the gcc test will end up
9544
# making a dummy file named `D' -- because `-MD' means `put the output
9547
# Copy depcomp to subdir because otherwise we won't find it if we're
9548
# using a relative directory.
9549
cp "$am_depcomp" conftest.dir
9551
# We will build objects and dependencies in a subdirectory because
9552
# it helps to detect inapplicable dependency modes. For instance
9553
# both Tru64's cc and ICC support -MD to output dependencies as a
9554
# side effect of compilation, but ICC will put the dependencies in
9555
# the current directory while Tru64 will put them in the object
9559
am_cv_$1_dependencies_compiler_type=none
9560
if test "$am_compiler_list" = ""; then
9561
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9565
[case " $depcc " in #(
9566
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9569
[case " $depcc " in #(
9570
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9573
for depmode in $am_compiler_list; do
9574
# Setup a source with many dependencies, because some compilers
9575
# like to wrap large dependency lists on column 80 (with \), and
9576
# we should not choose a depcomp mode which is confused by this.
9578
# We need to recreate these files for each test, as the compiler may
9579
# overwrite some of them when testing with obscure command lines.
9580
# This happens at least with the AIX C compiler.
9582
for i in 1 2 3 4 5 6; do
9583
echo '#include "conftst'$i'.h"' >> sub/conftest.c
9584
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9585
# Solaris 8's {/usr,}/bin/sh.
9586
touch sub/conftst$i.h
9588
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9590
# We check with `-c' and `-o' for the sake of the "dashmstdout"
9591
# mode. It turns out that the SunPro C++ compiler does not properly
9592
# handle `-M -o', and we need to detect this. Also, some Intel
9593
# versions had trouble with output in subdirs
9594
am__obj=sub/conftest.${OBJEXT-o}
9595
am__minus_obj="-o $am__obj"
9598
# This depmode causes a compiler race in universal mode.
9599
test "$am__universal" = false || continue
9602
# after this tag, mechanisms are not by side-effect, so they'll
9603
# only be used when explicitly requested
9604
if test "x$enable_dependency_tracking" = xyes; then
9610
msvisualcpp | msvcmsys)
9611
# This compiler won't grok `-c -o', but also, the minuso test has
9612
# not run yet. These depmodes are late enough in the game, and
9613
# so weak that their functioning should not be impacted.
9614
am__obj=conftest.${OBJEXT-o}
9619
if depmode=$depmode \
9620
source=sub/conftest.c object=$am__obj \
9621
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9622
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9623
>/dev/null 2>conftest.err &&
9624
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9625
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9626
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9627
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9628
# icc doesn't choke on unknown options, it will just issue warnings
9629
# or remarks (even with -Werror). So we grep stderr for any message
9630
# that says an option was ignored or not supported.
9631
# When given -MP, icc 7.0 and 7.1 complain thusly:
9632
# icc: Command line warning: ignoring option '-M'; no argument required
9633
# The diagnosis changed in icc 8.0:
9634
# icc: Command line remark: option '-MP' not supported
9635
if (grep 'ignoring option' conftest.err ||
9636
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9637
am_cv_$1_dependencies_compiler_type=$depmode
9646
am_cv_$1_dependencies_compiler_type=none
9649
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9650
AM_CONDITIONAL([am__fastdep$1], [
9651
test "x$enable_dependency_tracking" != xno \
9652
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9658
# Choose a directory name for dependency files.
9659
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9660
AC_DEFUN([AM_SET_DEPDIR],
9661
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9662
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9668
AC_DEFUN([AM_DEP_TRACK],
9669
[AC_ARG_ENABLE(dependency-tracking,
9670
[ --disable-dependency-tracking speeds up one-time build
9671
--enable-dependency-tracking do not reject slow dependency extractors])
9672
if test "x$enable_dependency_tracking" != xno; then
9673
am_depcomp="$ac_aux_dir/depcomp"
9676
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9677
AC_SUBST([AMDEPBACKSLASH])dnl
9678
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9681
# Generate code to set up dependency tracking. -*- Autoconf -*-
9683
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9684
# Free Software Foundation, Inc.
9686
# This file is free software; the Free Software Foundation
9687
# gives unlimited permission to copy and/or distribute it,
9688
# with or without modifications, as long as this notice is preserved.
9692
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9693
# ------------------------------
9694
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9696
# Autoconf 2.62 quotes --file arguments for eval, but not when files
9697
# are listed without --file. Let's play safe and only enable the eval
9698
# if we detect the quoting.
9699
case $CONFIG_FILES in
9700
*\'*) eval set x "$CONFIG_FILES" ;;
9701
*) set x $CONFIG_FILES ;;
9706
# Strip MF so we end up with the name of the file.
9707
mf=`echo "$mf" | sed -e 's/:.*$//'`
9708
# Check whether this is an Automake generated Makefile or not.
9709
# We used to match only the files named `Makefile.in', but
9710
# some people rename them; so instead we look at the file content.
9711
# Grep'ing the first line is not enough: some people post-process
9712
# each Makefile.in and add a new line on top of each file to say so.
9713
# Grep'ing the whole file is not good either: AIX grep has a line
9714
# limit of 2048, but all sed's we know have understand at least 4000.
9715
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9716
dirpart=`AS_DIRNAME("$mf")`
9720
# Extract the definition of DEPDIR, am__include, and am__quote
9721
# from the Makefile without running `make'.
9722
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9723
test -z "$DEPDIR" && continue
9724
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9725
test -z "am__include" && continue
9726
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9727
# When using ansi2knr, U may be empty or an underscore; expand it
9728
U=`sed -n 's/^U = //p' < "$mf"`
9729
# Find all dependency output files, they are included files with
9730
# $(DEPDIR) in their names. We invoke sed twice because it is the
9731
# simplest approach to changing $(DEPDIR) to its actual value in the
9733
for file in `sed -n "
9734
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9735
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9736
# Make sure the directory exists.
9737
test -f "$dirpart/$file" && continue
9738
fdir=`AS_DIRNAME(["$file"])`
9739
AS_MKDIR_P([$dirpart/$fdir])
9740
# echo "creating $dirpart/$file"
9741
echo '# dummy' > "$dirpart/$file"
9745
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9748
# AM_OUTPUT_DEPENDENCY_COMMANDS
9749
# -----------------------------
9750
# This macro should only be invoked once -- use via AC_REQUIRE.
9752
# This code is only required when automatic dependency tracking
9753
# is enabled. FIXME. This creates each `.P' file that we will
9754
# need in order to bootstrap the dependency handling code.
9755
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9756
[AC_CONFIG_COMMANDS([depfiles],
9757
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9758
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9761
# Do all the work for Automake. -*- Autoconf -*-
9763
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9764
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9766
# This file is free software; the Free Software Foundation
9767
# gives unlimited permission to copy and/or distribute it,
9768
# with or without modifications, as long as this notice is preserved.
9772
# This macro actually does too much. Some checks are only needed if
9773
# your package does certain things. But this isn't really a big deal.
9775
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9776
# AM_INIT_AUTOMAKE([OPTIONS])
9777
# -----------------------------------------------
9778
# The call with PACKAGE and VERSION arguments is the old style
9779
# call (pre autoconf-2.50), which is being phased out. PACKAGE
9780
# and VERSION should now be passed to AC_INIT and removed from
9781
# the call to AM_INIT_AUTOMAKE.
9782
# We support both call styles for the transition. After
9783
# the next Automake release, Autoconf can make the AC_INIT
9784
# arguments mandatory, and then we can depend on a new Autoconf
9785
# release and drop the old call support.
9786
AC_DEFUN([AM_INIT_AUTOMAKE],
9787
[AC_PREREQ([2.62])dnl
9788
dnl Autoconf wants to disallow AM_ names. We explicitly allow
9789
dnl the ones we care about.
9790
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9791
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9792
AC_REQUIRE([AC_PROG_INSTALL])dnl
9793
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9794
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9795
# is not polluted with repeated "-I."
9796
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9797
# test to see if srcdir already configured
9798
if test -f $srcdir/config.status; then
9799
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9803
# test whether we have cygpath
9804
if test -z "$CYGPATH_W"; then
9805
if (cygpath --version) >/dev/null 2>/dev/null; then
9806
CYGPATH_W='cygpath -w'
9811
AC_SUBST([CYGPATH_W])
9813
# Define the identity of the package.
9814
dnl Distinguish between old-style and new-style calls.
9816
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9817
AC_SUBST([PACKAGE], [$1])dnl
9818
AC_SUBST([VERSION], [$2])],
9819
[_AM_SET_OPTIONS([$1])dnl
9820
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9821
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9822
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9823
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9824
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9826
_AM_IF_OPTION([no-define],,
9827
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9828
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9830
# Some tools Automake needs.
9831
AC_REQUIRE([AM_SANITY_CHECK])dnl
9832
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9833
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9834
AM_MISSING_PROG(AUTOCONF, autoconf)
9835
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9836
AM_MISSING_PROG(AUTOHEADER, autoheader)
9837
AM_MISSING_PROG(MAKEINFO, makeinfo)
9838
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9839
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9840
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9841
# We need awk for the "check" target. The system "awk" is bad on
9843
AC_REQUIRE([AC_PROG_AWK])dnl
9844
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9845
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9846
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9847
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9848
[_AM_PROG_TAR([v7])])])
9849
_AM_IF_OPTION([no-dependencies],,
9850
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9851
[_AM_DEPENDENCIES(CC)],
9852
[define([AC_PROG_CC],
9853
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9854
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9855
[_AM_DEPENDENCIES(CXX)],
9856
[define([AC_PROG_CXX],
9857
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9858
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9859
[_AM_DEPENDENCIES(OBJC)],
9860
[define([AC_PROG_OBJC],
9861
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9863
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9864
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9865
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9866
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9867
AC_CONFIG_COMMANDS_PRE(dnl
9868
[m4_provide_if([_AM_COMPILER_EXEEXT],
9869
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9872
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9873
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9874
dnl mangled by Autoconf and run in a shell conditional statement.
9875
m4_define([_AC_COMPILER_EXEEXT],
9876
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9879
# When config.status generates a header, we must update the stamp-h file.
9880
# This file resides in the same directory as the config header
9881
# that is generated. The stamp files are numbered to have different names.
9883
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9884
# loop where config.status creates the headers, so we can generate
9885
# our stamp files there.
9886
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9887
[# Compute $1's index in $config_headers.
9890
for _am_header in $config_headers :; do
9892
$_am_arg | $_am_arg:* )
9895
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
9898
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9900
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9902
# This file is free software; the Free Software Foundation
9903
# gives unlimited permission to copy and/or distribute it,
9904
# with or without modifications, as long as this notice is preserved.
9906
# AM_PROG_INSTALL_SH
9907
# ------------------
9908
# Define $install_sh.
9909
AC_DEFUN([AM_PROG_INSTALL_SH],
9910
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9911
if test x"${install_sh}" != xset; then
9914
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9916
install_sh="\${SHELL} $am_aux_dir/install-sh"
9919
AC_SUBST(install_sh)])
9921
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9923
# This file is free software; the Free Software Foundation
9924
# gives unlimited permission to copy and/or distribute it,
9925
# with or without modifications, as long as this notice is preserved.
9929
# Check whether the underlying file-system supports filenames
9930
# with a leading dot. For instance MS-DOS doesn't.
9931
AC_DEFUN([AM_SET_LEADING_DOT],
9932
[rm -rf .tst 2>/dev/null
9933
mkdir .tst 2>/dev/null
9934
if test -d .tst; then
9939
rmdir .tst 2>/dev/null
9940
AC_SUBST([am__leading_dot])])
9942
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
9945
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9946
# Free Software Foundation, Inc.
9948
# This file is free software; the Free Software Foundation
9949
# gives unlimited permission to copy and/or distribute it,
9950
# with or without modifications, as long as this notice is preserved.
9954
# AM_MAINTAINER_MODE([DEFAULT-MODE])
9955
# ----------------------------------
9956
# Control maintainer-specific portions of Makefiles.
9957
# Default is to disable them, unless `enable' is passed literally.
9958
# For symmetry, `disable' may be passed as well. Anyway, the user
9959
# can override the default with the --enable/--disable switch.
9960
AC_DEFUN([AM_MAINTAINER_MODE],
9961
[m4_case(m4_default([$1], [disable]),
9962
[enable], [m4_define([am_maintainer_other], [disable])],
9963
[disable], [m4_define([am_maintainer_other], [enable])],
9964
[m4_define([am_maintainer_other], [enable])
9965
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9966
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9967
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9968
AC_ARG_ENABLE([maintainer-mode],
9969
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
9970
(and sometimes confusing) to the casual installer],
9971
[USE_MAINTAINER_MODE=$enableval],
9972
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9973
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9974
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9975
MAINT=$MAINTAINER_MODE_TRUE
9976
AC_SUBST([MAINT])dnl
9980
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9982
# Check to see how 'make' treats includes. -*- Autoconf -*-
9984
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9986
# This file is free software; the Free Software Foundation
9987
# gives unlimited permission to copy and/or distribute it,
9988
# with or without modifications, as long as this notice is preserved.
9994
# Check to see how make treats includes.
9995
AC_DEFUN([AM_MAKE_INCLUDE],
9996
[am_make=${MAKE-make}
9997
cat > confinc << 'END'
9999
@echo this is the am__doit target
10002
# If we don't find an include directive, just comment out the code.
10003
AC_MSG_CHECKING([for style of include used by $am_make])
10007
# First try GNU make style include.
10008
echo "include confinc" > confmf
10009
# Ignore all kinds of additional output from `make'.
10010
case `$am_make -s -f confmf 2> /dev/null` in #(
10011
*the\ am__doit\ target*)
10012
am__include=include
10017
# Now try BSD make style include.
10018
if test "$am__include" = "#"; then
10019
echo '.include "confinc"' > confmf
10020
case `$am_make -s -f confmf 2> /dev/null` in #(
10021
*the\ am__doit\ target*)
10022
am__include=.include
10028
AC_SUBST([am__include])
10029
AC_SUBST([am__quote])
10030
AC_MSG_RESULT([$_am_result])
10031
rm -f confinc confmf
10034
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
10036
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10037
# Free Software Foundation, Inc.
10039
# This file is free software; the Free Software Foundation
10040
# gives unlimited permission to copy and/or distribute it,
10041
# with or without modifications, as long as this notice is preserved.
10045
# AM_MISSING_PROG(NAME, PROGRAM)
10046
# ------------------------------
10047
AC_DEFUN([AM_MISSING_PROG],
10048
[AC_REQUIRE([AM_MISSING_HAS_RUN])
10049
$1=${$1-"${am_missing_run}$2"}
10053
# AM_MISSING_HAS_RUN
10054
# ------------------
10055
# Define MISSING if not defined so far and test if it supports --run.
10056
# If it does, set am_missing_run to use it, otherwise, to nothing.
10057
AC_DEFUN([AM_MISSING_HAS_RUN],
10058
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10059
AC_REQUIRE_AUX_FILE([missing])dnl
10060
if test x"${MISSING+set}" != xset; then
10061
case $am_aux_dir in
10063
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10065
MISSING="\${SHELL} $am_aux_dir/missing" ;;
10068
# Use eval to expand $SHELL
10069
if eval "$MISSING --run true"; then
10070
am_missing_run="$MISSING --run "
10073
AC_MSG_WARN([`missing' script is too old or missing])
10077
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
10079
# This file is free software; the Free Software Foundation
10080
# gives unlimited permission to copy and/or distribute it,
10081
# with or without modifications, as long as this notice is preserved.
10085
# Check for `mkdir -p'.
10086
AC_DEFUN([AM_PROG_MKDIR_P],
10087
[AC_PREREQ([2.60])dnl
10088
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10089
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
10090
dnl while keeping a definition of mkdir_p for backward compatibility.
10091
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10092
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10093
dnl Makefile.ins that do not define MKDIR_P, so we do our own
10094
dnl adjustment using top_builddir (which is defined more often than
10096
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10098
[[\\/$]]* | ?:[[\\/]]*) ;;
10099
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10103
# Helper functions for option handling. -*- Autoconf -*-
10105
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
10107
# This file is free software; the Free Software Foundation
10108
# gives unlimited permission to copy and/or distribute it,
10109
# with or without modifications, as long as this notice is preserved.
10113
# _AM_MANGLE_OPTION(NAME)
10114
# -----------------------
10115
AC_DEFUN([_AM_MANGLE_OPTION],
10116
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10118
# _AM_SET_OPTION(NAME)
10119
# ------------------------------
10120
# Set option NAME. Presently that only means defining a flag for this option.
10121
AC_DEFUN([_AM_SET_OPTION],
10122
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10124
# _AM_SET_OPTIONS(OPTIONS)
10125
# ----------------------------------
10126
# OPTIONS is a space-separated list of Automake options.
10127
AC_DEFUN([_AM_SET_OPTIONS],
10128
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10130
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10131
# -------------------------------------------
10132
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10133
AC_DEFUN([_AM_IF_OPTION],
10134
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10136
# Check to make sure that the build environment is sane. -*- Autoconf -*-
10138
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10139
# Free Software Foundation, Inc.
10141
# This file is free software; the Free Software Foundation
10142
# gives unlimited permission to copy and/or distribute it,
10143
# with or without modifications, as long as this notice is preserved.
10149
AC_DEFUN([AM_SANITY_CHECK],
10150
[AC_MSG_CHECKING([whether build environment is sane])
10153
echo timestamp > conftest.file
10154
# Reject unsafe characters in $srcdir or the absolute working directory
10155
# name. Accept space and tab only in the latter.
10159
*[[\\\"\#\$\&\'\`$am_lf]]*)
10160
AC_MSG_ERROR([unsafe absolute working directory name]);;
10163
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10164
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10167
# Do `set' in a subshell so we don't clobber the current shell's
10168
# arguments. Must try -L first in case configure is actually a
10169
# symlink; some systems play weird games with the mod time of symlinks
10170
# (eg FreeBSD returns the mod time of the symlink's containing
10173
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10174
if test "$[*]" = "X"; then
10176
set X `ls -t "$srcdir/configure" conftest.file`
10178
rm -f conftest.file
10179
if test "$[*]" != "X $srcdir/configure conftest.file" \
10180
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
10182
# If neither matched, then we have a broken ls. This can happen
10183
# if, for instance, CONFIG_SHELL is bash and it inherits a
10184
# broken ls alias from the environment. This has actually
10185
# happened. Such a system could not be considered "sane".
10186
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10187
alias in your environment])
10190
test "$[2]" = conftest.file
10196
AC_MSG_ERROR([newly created file is older than distributed files!
10197
Check your system clock])
10199
AC_MSG_RESULT(yes)])
10201
# Copyright (C) 2009 Free Software Foundation, Inc.
10203
# This file is free software; the Free Software Foundation
10204
# gives unlimited permission to copy and/or distribute it,
10205
# with or without modifications, as long as this notice is preserved.
10209
# AM_SILENT_RULES([DEFAULT])
10210
# --------------------------
10211
# Enable less verbose build rules; with the default set to DEFAULT
10212
# (`yes' being less verbose, `no' or empty being verbose).
10213
AC_DEFUN([AM_SILENT_RULES],
10214
[AC_ARG_ENABLE([silent-rules],
10215
[ --enable-silent-rules less verbose build output (undo: `make V=1')
10216
--disable-silent-rules verbose build output (undo: `make V=0')])
10217
case $enable_silent_rules in
10218
yes) AM_DEFAULT_VERBOSITY=0;;
10219
no) AM_DEFAULT_VERBOSITY=1;;
10220
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10222
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10224
AC_SUBST([AM_BACKSLASH])dnl
10225
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10228
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
10230
# This file is free software; the Free Software Foundation
10231
# gives unlimited permission to copy and/or distribute it,
10232
# with or without modifications, as long as this notice is preserved.
10234
# AM_PROG_INSTALL_STRIP
10235
# ---------------------
10236
# One issue with vendor `install' (even GNU) is that you can't
10237
# specify the program used to strip binaries. This is especially
10238
# annoying in cross-compiling environments, where the build's strip
10239
# is unlikely to handle the host's binaries.
10240
# Fortunately install-sh will honor a STRIPPROG variable, so we
10241
# always use install-sh in `make install-strip', and initialize
10242
# STRIPPROG with the value of the STRIP variable (set by the user).
10243
AC_DEFUN([AM_PROG_INSTALL_STRIP],
10244
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10245
# Installed binaries are usually stripped using `strip' when the user
10246
# run `make install-strip'. However `strip' might not be the right
10247
# tool to use in cross-compilation environments, therefore Automake
10248
# will honor the `STRIP' environment variable to overrule this program.
10249
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10250
if test "$cross_compiling" != no; then
10251
AC_CHECK_TOOL([STRIP], [strip], :)
10253
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10254
AC_SUBST([INSTALL_STRIP_PROGRAM])])
10256
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
10258
# This file is free software; the Free Software Foundation
10259
# gives unlimited permission to copy and/or distribute it,
10260
# with or without modifications, as long as this notice is preserved.
10264
# _AM_SUBST_NOTMAKE(VARIABLE)
10265
# ---------------------------
10266
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10267
# This macro is traced by Automake.
10268
AC_DEFUN([_AM_SUBST_NOTMAKE])
10270
# AM_SUBST_NOTMAKE(VARIABLE)
10271
# ---------------------------
10272
# Public sister of _AM_SUBST_NOTMAKE.
10273
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10275
# Check how to create a tarball. -*- Autoconf -*-
10277
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
10279
# This file is free software; the Free Software Foundation
10280
# gives unlimited permission to copy and/or distribute it,
10281
# with or without modifications, as long as this notice is preserved.
10285
# _AM_PROG_TAR(FORMAT)
10286
# --------------------
10287
# Check how to create a tarball in format FORMAT.
10288
# FORMAT should be one of `v7', `ustar', or `pax'.
10290
# Substitute a variable $(am__tar) that is a command
10291
# writing to stdout a FORMAT-tarball containing the directory
10293
# tardir=directory && $(am__tar) > result.tar
10295
# Substitute a variable $(am__untar) that extract such
10296
# a tarball read from stdin.
10297
# $(am__untar) < result.tar
10298
AC_DEFUN([_AM_PROG_TAR],
10299
[# Always define AMTAR for backward compatibility.
10300
AM_MISSING_PROG([AMTAR], [tar])
10302
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10303
[m4_case([$1], [ustar],, [pax],,
10304
[m4_fatal([Unknown tar format])])
10305
AC_MSG_CHECKING([how to create a $1 tar archive])
10306
# Loop over all known methods to create a tar archive until one works.
10307
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10308
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10309
# Do not fold the above two line into one, because Tru64 sh and
10310
# Solaris sh will not grok spaces in the rhs of `-'.
10311
for _am_tool in $_am_tools
10315
for _am_tar in tar gnutar gtar;
10317
AM_RUN_LOG([$_am_tar --version]) && break
10319
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10320
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10321
am__untar="$_am_tar -xf -"
10324
# Must skip GNU tar: if it does not support --format= it doesn't create
10325
# ustar tarball either.
10326
(tar --version) >/dev/null 2>&1 && continue
10327
am__tar='tar chf - "$$tardir"'
10328
am__tar_='tar chf - "$tardir"'
10329
am__untar='tar xf -'
10332
am__tar='pax -L -x $1 -w "$$tardir"'
10333
am__tar_='pax -L -x $1 -w "$tardir"'
10337
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10338
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10339
am__untar='cpio -i -H $1 -d'
10348
# If the value was cached, stop now. We just wanted to have am__tar
10349
# and am__untar set.
10350
test -n "${am_cv_prog_tar_$1}" && break
10352
# tar/untar a dummy directory, and stop if the command works
10353
rm -rf conftest.dir
10355
echo GrepMe > conftest.dir/file
10356
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10357
rm -rf conftest.dir
10358
if test -s conftest.tar; then
10359
AM_RUN_LOG([$am__untar <conftest.tar])
10360
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10363
rm -rf conftest.dir
10365
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10366
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10367
AC_SUBST([am__tar])
10368
AC_SUBST([am__untar])