11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
14
dnl From http://autoconf-archive.cryp.to/ac_define_dir.html.
16
AC_DEFUN([AC_DEFINE_DIR], [
19
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
20
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
21
eval ac_define_dir="\"[$]$2\""
22
AC_SUBST($1, "$ac_define_dir")
23
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
24
test "$prefix_NONE" && prefix=NONE
25
test "$exec_prefix_NONE" && exec_prefix=NONE
28
# Do all the work for Automake. -*- Autoconf -*-
30
# This macro actually does too much some checks are only needed if
31
# your package does certain things. But this isn't really a big deal.
33
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
34
# Free Software Foundation, Inc.
36
# This program is free software; you can redistribute it and/or modify
37
# it under the terms of the GNU General Public License as published by
38
# the Free Software Foundation; either version 2, or (at your option)
41
# This program is distributed in the hope that it will be useful,
42
# but WITHOUT ANY WARRANTY; without even the implied warranty of
43
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44
# GNU General Public License for more details.
46
# You should have received a copy of the GNU General Public License
47
# along with this program; if not, write to the Free Software
48
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
55
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
56
# the ones we care about.
57
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
59
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
60
# AM_INIT_AUTOMAKE([OPTIONS])
61
# -----------------------------------------------
62
# The call with PACKAGE and VERSION arguments is the old style
63
# call (pre autoconf-2.50), which is being phased out. PACKAGE
64
# and VERSION should now be passed to AC_INIT and removed from
65
# the call to AM_INIT_AUTOMAKE.
66
# We support both call styles for the transition. After
67
# the next Automake release, Autoconf can make the AC_INIT
68
# arguments mandatory, and then we can depend on a new Autoconf
69
# release and drop the old call support.
70
AC_DEFUN([AM_INIT_AUTOMAKE],
71
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
72
AC_REQUIRE([AC_PROG_INSTALL])dnl
73
# test to see if srcdir already configured
74
if test "`cd $srcdir && pwd`" != "`pwd`" &&
75
test -f $srcdir/config.status; then
76
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
79
# test whether we have cygpath
80
if test -z "$CYGPATH_W"; then
81
if (cygpath --version) >/dev/null 2>/dev/null; then
82
CYGPATH_W='cygpath -w'
89
# Define the identity of the package.
90
dnl Distinguish between old-style and new-style calls.
92
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
93
AC_SUBST([PACKAGE], [$1])dnl
94
AC_SUBST([VERSION], [$2])],
95
[_AM_SET_OPTIONS([$1])dnl
96
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
97
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
99
_AM_IF_OPTION([no-define],,
100
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
101
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
103
# Some tools Automake needs.
104
AC_REQUIRE([AM_SANITY_CHECK])dnl
105
AC_REQUIRE([AC_ARG_PROGRAM])dnl
106
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
107
AM_MISSING_PROG(AUTOCONF, autoconf)
108
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
109
AM_MISSING_PROG(AUTOHEADER, autoheader)
110
AM_MISSING_PROG(MAKEINFO, makeinfo)
111
AM_MISSING_PROG(AMTAR, tar)
113
AM_PROG_INSTALL_STRIP
114
# We need awk for the "check" target. The system "awk" is bad on
116
AC_REQUIRE([AC_PROG_AWK])dnl
117
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
118
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
120
_AM_IF_OPTION([no-dependencies],,
121
[AC_PROVIDE_IFELSE([AC_PROG_CC],
122
[_AM_DEPENDENCIES(CC)],
123
[define([AC_PROG_CC],
124
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
125
AC_PROVIDE_IFELSE([AC_PROG_CXX],
126
[_AM_DEPENDENCIES(CXX)],
127
[define([AC_PROG_CXX],
128
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
133
# When config.status generates a header, we must update the stamp-h file.
134
# This file resides in the same directory as the config header
135
# that is generated. The stamp files are numbered to have different names.
137
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
138
# loop where config.status creates the headers, so we can generate
139
# our stamp files there.
140
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
141
[# Compute $1's index in $config_headers.
143
for _am_header in $config_headers :; do
148
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
151
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
153
# Copyright 2002 Free Software Foundation, Inc.
155
# This program is free software; you can redistribute it and/or modify
156
# it under the terms of the GNU General Public License as published by
157
# the Free Software Foundation; either version 2, or (at your option)
160
# This program is distributed in the hope that it will be useful,
161
# but WITHOUT ANY WARRANTY; without even the implied warranty of
162
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
163
# GNU General Public License for more details.
165
# You should have received a copy of the GNU General Public License
166
# along with this program; if not, write to the Free Software
167
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
14
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
16
# This file is free software; the Free Software Foundation
17
# gives unlimited permission to copy and/or distribute it,
18
# with or without modifications, as long as this notice is preserved.
169
20
# AM_AUTOMAKE_VERSION(VERSION)
170
21
# ----------------------------
171
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
172
23
# generated from the m4 files accompanying Automake X.Y.
173
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
175
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
176
27
# -------------------------------
177
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
178
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
179
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
180
[AM_AUTOMAKE_VERSION([1.7.9])])
182
# Helper functions for option handling. -*- Autoconf -*-
184
# Copyright 2001, 2002 Free Software Foundation, Inc.
186
# This program is free software; you can redistribute it and/or modify
187
# it under the terms of the GNU General Public License as published by
188
# the Free Software Foundation; either version 2, or (at your option)
191
# This program is distributed in the hope that it will be useful,
192
# but WITHOUT ANY WARRANTY; without even the implied warranty of
193
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
194
# GNU General Public License for more details.
196
# You should have received a copy of the GNU General Public License
197
# along with this program; if not, write to the Free Software
198
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
203
# _AM_MANGLE_OPTION(NAME)
204
# -----------------------
205
AC_DEFUN([_AM_MANGLE_OPTION],
206
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
208
# _AM_SET_OPTION(NAME)
209
# ------------------------------
210
# Set option NAME. Presently that only means defining a flag for this option.
211
AC_DEFUN([_AM_SET_OPTION],
212
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
214
# _AM_SET_OPTIONS(OPTIONS)
215
# ----------------------------------
216
# OPTIONS is a space-separated list of Automake options.
217
AC_DEFUN([_AM_SET_OPTIONS],
218
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
220
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
221
# -------------------------------------------
222
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
223
AC_DEFUN([_AM_IF_OPTION],
224
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
227
# Check to make sure that the build environment is sane.
230
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
232
# This program is free software; you can redistribute it and/or modify
233
# it under the terms of the GNU General Public License as published by
234
# the Free Software Foundation; either version 2, or (at your option)
237
# This program is distributed in the hope that it will be useful,
238
# but WITHOUT ANY WARRANTY; without even the implied warranty of
239
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
240
# GNU General Public License for more details.
242
# You should have received a copy of the GNU General Public License
243
# along with this program; if not, write to the Free Software
244
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
251
AC_DEFUN([AM_SANITY_CHECK],
252
[AC_MSG_CHECKING([whether build environment is sane])
255
echo timestamp > conftest.file
256
# Do `set' in a subshell so we don't clobber the current shell's
257
# arguments. Must try -L first in case configure is actually a
258
# symlink; some systems play weird games with the mod time of symlinks
259
# (eg FreeBSD returns the mod time of the symlink's containing
262
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
263
if test "$[*]" = "X"; then
265
set X `ls -t $srcdir/configure conftest.file`
268
if test "$[*]" != "X $srcdir/configure conftest.file" \
269
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
271
# If neither matched, then we have a broken ls. This can happen
272
# if, for instance, CONFIG_SHELL is bash and it inherits a
273
# broken ls alias from the environment. This has actually
274
# happened. Such a system could not be considered "sane".
275
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
276
alias in your environment])
279
test "$[2]" = conftest.file
285
AC_MSG_ERROR([newly created file is older than distributed files!
286
Check your system clock])
293
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
295
# This program is free software; you can redistribute it and/or modify
296
# it under the terms of the GNU General Public License as published by
297
# the Free Software Foundation; either version 2, or (at your option)
300
# This program is distributed in the hope that it will be useful,
301
# but WITHOUT ANY WARRANTY; without even the implied warranty of
302
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303
# GNU General Public License for more details.
305
# You should have received a copy of the GNU General Public License
306
# along with this program; if not, write to the Free Software
307
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
312
# AM_MISSING_PROG(NAME, PROGRAM)
313
# ------------------------------
314
AC_DEFUN([AM_MISSING_PROG],
315
[AC_REQUIRE([AM_MISSING_HAS_RUN])
316
$1=${$1-"${am_missing_run}$2"}
322
# Define MISSING if not defined so far and test if it supports --run.
323
# If it does, set am_missing_run to use it, otherwise, to nothing.
324
AC_DEFUN([AM_MISSING_HAS_RUN],
325
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
326
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
327
# Use eval to expand $SHELL
328
if eval "$MISSING --run true"; then
329
am_missing_run="$MISSING --run "
332
AC_MSG_WARN([`missing' script is too old or missing])
31
[AM_AUTOMAKE_VERSION([1.9.6])])
33
# Figure out how to run the assembler. -*- Autoconf -*-
35
# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
37
# This file is free software; the Free Software Foundation
38
# gives unlimited permission to copy and/or distribute it,
39
# with or without modifications, as long as this notice is preserved.
45
AC_DEFUN([AM_PROG_AS],
46
[# By default we simply use the C compiler to build assembly code.
47
AC_REQUIRE([AC_PROG_CC])
48
test "${CCAS+set}" = set || CCAS=$CC
49
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
50
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
51
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
338
# Copyright 2001 Free Software Foundation, Inc.
340
# This program is free software; you can redistribute it and/or modify
341
# it under the terms of the GNU General Public License as published by
342
# the Free Software Foundation; either version 2, or (at your option)
345
# This program is distributed in the hope that it will be useful,
346
# but WITHOUT ANY WARRANTY; without even the implied warranty of
347
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
348
# GNU General Public License for more details.
350
# You should have received a copy of the GNU General Public License
351
# along with this program; if not, write to the Free Software
352
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
54
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
56
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
58
# This file is free software; the Free Software Foundation
59
# gives unlimited permission to copy and/or distribute it,
60
# with or without modifications, as long as this notice is preserved.
355
62
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
356
63
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
390
97
# absolute PATH. The drawback is that using absolute paths prevent a
391
98
# configured tree to be moved without reconfiguration.
393
# Rely on autoconf to set up CDPATH properly.
396
AC_DEFUN([AM_AUX_DIR_EXPAND], [
100
AC_DEFUN([AM_AUX_DIR_EXPAND],
101
[dnl Rely on autoconf to set up CDPATH properly.
397
103
# expand $ac_aux_dir to an absolute path
398
104
am_aux_dir=`cd $ac_aux_dir && pwd`
403
# Define $install_sh.
405
# Copyright 2001 Free Software Foundation, Inc.
407
# This program is free software; you can redistribute it and/or modify
408
# it under the terms of the GNU General Public License as published by
409
# the Free Software Foundation; either version 2, or (at your option)
412
# This program is distributed in the hope that it will be useful,
413
# but WITHOUT ANY WARRANTY; without even the implied warranty of
414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
415
# GNU General Public License for more details.
417
# You should have received a copy of the GNU General Public License
418
# along with this program; if not, write to the Free Software
419
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
422
AC_DEFUN([AM_PROG_INSTALL_SH],
423
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
424
install_sh=${install_sh-"$am_aux_dir/install-sh"}
425
AC_SUBST(install_sh)])
427
# AM_PROG_INSTALL_STRIP
429
# Copyright 2001 Free Software Foundation, Inc.
431
# This program is free software; you can redistribute it and/or modify
432
# it under the terms of the GNU General Public License as published by
433
# the Free Software Foundation; either version 2, or (at your option)
436
# This program is distributed in the hope that it will be useful,
437
# but WITHOUT ANY WARRANTY; without even the implied warranty of
438
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
439
# GNU General Public License for more details.
441
# You should have received a copy of the GNU General Public License
442
# along with this program; if not, write to the Free Software
443
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
446
# One issue with vendor `install' (even GNU) is that you can't
447
# specify the program used to strip binaries. This is especially
448
# annoying in cross-compiling environments, where the build's strip
449
# is unlikely to handle the host's binaries.
450
# Fortunately install-sh will honor a STRIPPROG variable, so we
451
# always use install-sh in `make install-strip', and initialize
452
# STRIPPROG with the value of the STRIP variable (set by the user).
453
AC_DEFUN([AM_PROG_INSTALL_STRIP],
454
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
455
# Installed binaries are usually stripped using `strip' when the user
456
# run `make install-strip'. However `strip' might not be the right
457
# tool to use in cross-compilation environments, therefore Automake
458
# will honor the `STRIP' environment variable to overrule this program.
459
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
460
if test "$cross_compiling" != no; then
461
AC_CHECK_TOOL([STRIP], [strip], :)
463
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
464
AC_SUBST([INSTALL_STRIP_PROGRAM])])
467
# Copyright (C) 2003 Free Software Foundation, Inc.
469
# This program is free software; you can redistribute it and/or modify
470
# it under the terms of the GNU General Public License as published by
471
# the Free Software Foundation; either version 2, or (at your option)
474
# This program is distributed in the hope that it will be useful,
475
# but WITHOUT ANY WARRANTY; without even the implied warranty of
476
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
477
# GNU General Public License for more details.
479
# You should have received a copy of the GNU General Public License
480
# along with this program; if not, write to the Free Software
481
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
486
# Check whether the underlying file-system supports filenames
487
# with a leading dot. For instance MS-DOS doesn't.
488
AC_DEFUN([AM_SET_LEADING_DOT],
489
[rm -rf .tst 2>/dev/null
490
mkdir .tst 2>/dev/null
491
if test -d .tst; then
107
# AM_CONDITIONAL -*- Autoconf -*-
109
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
110
# Free Software Foundation, Inc.
112
# This file is free software; the Free Software Foundation
113
# gives unlimited permission to copy and/or distribute it,
114
# with or without modifications, as long as this notice is preserved.
118
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
119
# -------------------------------------
120
# Define a conditional.
121
AC_DEFUN([AM_CONDITIONAL],
123
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
124
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
496
rmdir .tst 2>/dev/null
497
AC_SUBST([am__leading_dot])])
499
# serial 5 -*- Autoconf -*-
501
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
503
# This program is free software; you can redistribute it and/or modify
504
# it under the terms of the GNU General Public License as published by
505
# the Free Software Foundation; either version 2, or (at your option)
508
# This program is distributed in the hope that it will be useful,
509
# but WITHOUT ANY WARRANTY; without even the implied warranty of
510
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
511
# GNU General Public License for more details.
513
# You should have received a copy of the GNU General Public License
514
# along with this program; if not, write to the Free Software
515
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
134
AC_CONFIG_COMMANDS_PRE(
135
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
136
AC_MSG_ERROR([[conditional "$1" was never defined.
137
Usually this means the macro was only invoked conditionally.]])
141
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
142
# Free Software Foundation, Inc.
144
# This file is free software; the Free Software Foundation
145
# gives unlimited permission to copy and/or distribute it,
146
# with or without modifications, as long as this notice is preserved.
519
150
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
520
151
# written in clear, in which case automake, when reading aclocal.m4,
740
361
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
743
# Check to see how 'make' treats includes. -*- Autoconf -*-
745
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
747
# This program is free software; you can redistribute it and/or modify
748
# it under the terms of the GNU General Public License as published by
749
# the Free Software Foundation; either version 2, or (at your option)
752
# This program is distributed in the hope that it will be useful,
753
# but WITHOUT ANY WARRANTY; without even the implied warranty of
754
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
755
# GNU General Public License for more details.
757
# You should have received a copy of the GNU General Public License
758
# along with this program; if not, write to the Free Software
759
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
364
# Do all the work for Automake. -*- Autoconf -*-
366
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
367
# Free Software Foundation, Inc.
369
# This file is free software; the Free Software Foundation
370
# gives unlimited permission to copy and/or distribute it,
371
# with or without modifications, as long as this notice is preserved.
375
# This macro actually does too much. Some checks are only needed if
376
# your package does certain things. But this isn't really a big deal.
378
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
379
# AM_INIT_AUTOMAKE([OPTIONS])
380
# -----------------------------------------------
381
# The call with PACKAGE and VERSION arguments is the old style
382
# call (pre autoconf-2.50), which is being phased out. PACKAGE
383
# and VERSION should now be passed to AC_INIT and removed from
384
# the call to AM_INIT_AUTOMAKE.
385
# We support both call styles for the transition. After
386
# the next Automake release, Autoconf can make the AC_INIT
387
# arguments mandatory, and then we can depend on a new Autoconf
388
# release and drop the old call support.
389
AC_DEFUN([AM_INIT_AUTOMAKE],
390
[AC_PREREQ([2.58])dnl
391
dnl Autoconf wants to disallow AM_ names. We explicitly allow
392
dnl the ones we care about.
393
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
394
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
395
AC_REQUIRE([AC_PROG_INSTALL])dnl
396
# test to see if srcdir already configured
397
if test "`cd $srcdir && pwd`" != "`pwd`" &&
398
test -f $srcdir/config.status; then
399
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
402
# test whether we have cygpath
403
if test -z "$CYGPATH_W"; then
404
if (cygpath --version) >/dev/null 2>/dev/null; then
405
CYGPATH_W='cygpath -w'
410
AC_SUBST([CYGPATH_W])
412
# Define the identity of the package.
413
dnl Distinguish between old-style and new-style calls.
415
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
416
AC_SUBST([PACKAGE], [$1])dnl
417
AC_SUBST([VERSION], [$2])],
418
[_AM_SET_OPTIONS([$1])dnl
419
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
420
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
422
_AM_IF_OPTION([no-define],,
423
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
424
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
426
# Some tools Automake needs.
427
AC_REQUIRE([AM_SANITY_CHECK])dnl
428
AC_REQUIRE([AC_ARG_PROGRAM])dnl
429
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
430
AM_MISSING_PROG(AUTOCONF, autoconf)
431
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
432
AM_MISSING_PROG(AUTOHEADER, autoheader)
433
AM_MISSING_PROG(MAKEINFO, makeinfo)
435
AM_PROG_INSTALL_STRIP
436
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
437
# We need awk for the "check" target. The system "awk" is bad on
439
AC_REQUIRE([AC_PROG_AWK])dnl
440
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
441
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
442
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
443
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
444
[_AM_PROG_TAR([v7])])])
445
_AM_IF_OPTION([no-dependencies],,
446
[AC_PROVIDE_IFELSE([AC_PROG_CC],
447
[_AM_DEPENDENCIES(CC)],
448
[define([AC_PROG_CC],
449
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
450
AC_PROVIDE_IFELSE([AC_PROG_CXX],
451
[_AM_DEPENDENCIES(CXX)],
452
[define([AC_PROG_CXX],
453
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
458
# When config.status generates a header, we must update the stamp-h file.
459
# This file resides in the same directory as the config header
460
# that is generated. The stamp files are numbered to have different names.
462
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
463
# loop where config.status creates the headers, so we can generate
464
# our stamp files there.
465
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
466
[# Compute $1's index in $config_headers.
468
for _am_header in $config_headers :; do
473
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
476
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
478
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
480
# This file is free software; the Free Software Foundation
481
# gives unlimited permission to copy and/or distribute it,
482
# with or without modifications, as long as this notice is preserved.
486
# Define $install_sh.
487
AC_DEFUN([AM_PROG_INSTALL_SH],
488
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
489
install_sh=${install_sh-"$am_aux_dir/install-sh"}
490
AC_SUBST(install_sh)])
492
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
494
# This file is free software; the Free Software Foundation
495
# gives unlimited permission to copy and/or distribute it,
496
# with or without modifications, as long as this notice is preserved.
500
# Check whether the underlying file-system supports filenames
501
# with a leading dot. For instance MS-DOS doesn't.
502
AC_DEFUN([AM_SET_LEADING_DOT],
503
[rm -rf .tst 2>/dev/null
504
mkdir .tst 2>/dev/null
505
if test -d .tst; then
510
rmdir .tst 2>/dev/null
511
AC_SUBST([am__leading_dot])])
513
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
516
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
517
# Free Software Foundation, Inc.
519
# This file is free software; the Free Software Foundation
520
# gives unlimited permission to copy and/or distribute it,
521
# with or without modifications, as long as this notice is preserved.
525
AC_DEFUN([AM_MAINTAINER_MODE],
526
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
527
dnl maintainer-mode is disabled by default
528
AC_ARG_ENABLE(maintainer-mode,
529
[ --enable-maintainer-mode enable make rules and dependencies not useful
530
(and sometimes confusing) to the casual installer],
531
USE_MAINTAINER_MODE=$enableval,
532
USE_MAINTAINER_MODE=no)
533
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
534
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
535
MAINT=$MAINTAINER_MODE_TRUE
540
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
542
# Check to see how 'make' treats includes. -*- Autoconf -*-
544
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
546
# This file is free software; the Free Software Foundation
547
# gives unlimited permission to copy and/or distribute it,
548
# with or without modifications, as long as this notice is preserved.
764
552
# AM_MAKE_INCLUDE()
765
553
# -----------------
766
554
# Check to see how make treats includes.
803
591
rm -f confinc confmf
806
# AM_CONDITIONAL -*- Autoconf -*-
808
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
810
# This program is free software; you can redistribute it and/or modify
811
# it under the terms of the GNU General Public License as published by
812
# the Free Software Foundation; either version 2, or (at your option)
815
# This program is distributed in the hope that it will be useful,
816
# but WITHOUT ANY WARRANTY; without even the implied warranty of
817
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
818
# GNU General Public License for more details.
820
# You should have received a copy of the GNU General Public License
821
# along with this program; if not, write to the Free Software
822
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
829
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
830
# -------------------------------------
831
# Define a conditional.
832
AC_DEFUN([AM_CONDITIONAL],
833
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
834
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
844
AC_CONFIG_COMMANDS_PRE(
845
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
846
AC_MSG_ERROR([conditional "$1" was never defined.
847
Usually this means the macro was only invoked conditionally.])
850
# Add --enable-maintainer-mode option to configure.
853
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
855
# This program is free software; you can redistribute it and/or modify
856
# it under the terms of the GNU General Public License as published by
857
# the Free Software Foundation; either version 2, or (at your option)
860
# This program is distributed in the hope that it will be useful,
861
# but WITHOUT ANY WARRANTY; without even the implied warranty of
862
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
863
# GNU General Public License for more details.
865
# You should have received a copy of the GNU General Public License
866
# along with this program; if not, write to the Free Software
867
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
872
AC_DEFUN([AM_MAINTAINER_MODE],
873
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
874
dnl maintainer-mode is disabled by default
875
AC_ARG_ENABLE(maintainer-mode,
876
[ --enable-maintainer-mode enable make rules and dependencies not useful
877
(and sometimes confusing) to the casual installer],
878
USE_MAINTAINER_MODE=$enableval,
879
USE_MAINTAINER_MODE=no)
880
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
881
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
882
MAINT=$MAINTAINER_MODE_TRUE
887
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
889
# Figure out how to run the assembler. -*- Autoconf -*-
893
# Copyright 2001 Free Software Foundation, Inc.
895
# This program is free software; you can redistribute it and/or modify
896
# it under the terms of the GNU General Public License as published by
897
# the Free Software Foundation; either version 2, or (at your option)
900
# This program is distributed in the hope that it will be useful,
901
# but WITHOUT ANY WARRANTY; without even the implied warranty of
902
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
903
# GNU General Public License for more details.
905
# You should have received a copy of the GNU General Public License
906
# along with this program; if not, write to the Free Software
907
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
912
AC_DEFUN([AM_PROG_AS],
913
[# By default we simply use the C compiler to build assembly code.
914
AC_REQUIRE([AC_PROG_CC])
916
# Set ASFLAGS if not already set.
917
: ${CCASFLAGS='$(CFLAGS)'}
919
AC_SUBST(CCASFLAGS)])
594
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
596
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
597
# Free Software Foundation, Inc.
599
# This file is free software; the Free Software Foundation
600
# gives unlimited permission to copy and/or distribute it,
601
# with or without modifications, as long as this notice is preserved.
605
# AM_MISSING_PROG(NAME, PROGRAM)
606
# ------------------------------
607
AC_DEFUN([AM_MISSING_PROG],
608
[AC_REQUIRE([AM_MISSING_HAS_RUN])
609
$1=${$1-"${am_missing_run}$2"}
615
# Define MISSING if not defined so far and test if it supports --run.
616
# If it does, set am_missing_run to use it, otherwise, to nothing.
617
AC_DEFUN([AM_MISSING_HAS_RUN],
618
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
619
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
620
# Use eval to expand $SHELL
621
if eval "$MISSING --run true"; then
622
am_missing_run="$MISSING --run "
625
AC_MSG_WARN([`missing' script is too old or missing])
629
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
631
# This file is free software; the Free Software Foundation
632
# gives unlimited permission to copy and/or distribute it,
633
# with or without modifications, as long as this notice is preserved.
637
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
639
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
640
# created by `make install' are always world readable, even if the
641
# installer happens to have an overly restrictive umask (e.g. 077).
642
# This was a mistake. There are at least two reasons why we must not
644
# - it causes special bits like SGID to be ignored,
645
# - it may be too restrictive (some setups expect 775 directories).
647
# Do not use -m 0755 and let people choose whatever they expect by
650
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
651
# Some implementations (such as Solaris 8's) are not thread-safe: if a
652
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
653
# concurrently, both version can detect that a/ is missing, but only
654
# one can create it and the other will error out. Consequently we
655
# restrict ourselves to GNU make (using the --version option ensures
657
AC_DEFUN([AM_PROG_MKDIR_P],
658
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
659
# We used to keeping the `.' as first argument, in order to
660
# allow $(mkdir_p) to be used without argument. As in
661
# $(mkdir_p) $(somedir)
662
# where $(somedir) is conditionally defined. However this is wrong
664
# 1. if the package is installed by a user who cannot write `.'
665
# make install will fail,
666
# 2. the above comment should most certainly read
667
# $(mkdir_p) $(DESTDIR)$(somedir)
668
# so it does not work when $(somedir) is undefined and
670
# To support the latter case, we have to write
671
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
672
# so the `.' trick is pointless.
673
mkdir_p='mkdir -p --'
675
# On NextStep and OpenStep, the `mkdir' command does not
676
# recognize any option. It will interpret all options as
677
# directories to create, and then abort because `.' already
679
for d in ./-p ./--version;
681
test -d $d && rmdir $d
683
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
684
if test -f "$ac_aux_dir/mkinstalldirs"; then
685
mkdir_p='$(mkinstalldirs)'
687
mkdir_p='$(install_sh) -d'
690
AC_SUBST([mkdir_p])])
692
# Helper functions for option handling. -*- Autoconf -*-
694
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
696
# This file is free software; the Free Software Foundation
697
# gives unlimited permission to copy and/or distribute it,
698
# with or without modifications, as long as this notice is preserved.
702
# _AM_MANGLE_OPTION(NAME)
703
# -----------------------
704
AC_DEFUN([_AM_MANGLE_OPTION],
705
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
707
# _AM_SET_OPTION(NAME)
708
# ------------------------------
709
# Set option NAME. Presently that only means defining a flag for this option.
710
AC_DEFUN([_AM_SET_OPTION],
711
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
713
# _AM_SET_OPTIONS(OPTIONS)
714
# ----------------------------------
715
# OPTIONS is a space-separated list of Automake options.
716
AC_DEFUN([_AM_SET_OPTIONS],
717
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
719
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
720
# -------------------------------------------
721
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
722
AC_DEFUN([_AM_IF_OPTION],
723
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
725
# Check to make sure that the build environment is sane. -*- Autoconf -*-
727
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
728
# Free Software Foundation, Inc.
730
# This file is free software; the Free Software Foundation
731
# gives unlimited permission to copy and/or distribute it,
732
# with or without modifications, as long as this notice is preserved.
738
AC_DEFUN([AM_SANITY_CHECK],
739
[AC_MSG_CHECKING([whether build environment is sane])
742
echo timestamp > conftest.file
743
# Do `set' in a subshell so we don't clobber the current shell's
744
# arguments. Must try -L first in case configure is actually a
745
# symlink; some systems play weird games with the mod time of symlinks
746
# (eg FreeBSD returns the mod time of the symlink's containing
749
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
750
if test "$[*]" = "X"; then
752
set X `ls -t $srcdir/configure conftest.file`
755
if test "$[*]" != "X $srcdir/configure conftest.file" \
756
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
758
# If neither matched, then we have a broken ls. This can happen
759
# if, for instance, CONFIG_SHELL is bash and it inherits a
760
# broken ls alias from the environment. This has actually
761
# happened. Such a system could not be considered "sane".
762
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
763
alias in your environment])
766
test "$[2]" = conftest.file
772
AC_MSG_ERROR([newly created file is older than distributed files!
773
Check your system clock])
777
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
779
# This file is free software; the Free Software Foundation
780
# gives unlimited permission to copy and/or distribute it,
781
# with or without modifications, as long as this notice is preserved.
783
# AM_PROG_INSTALL_STRIP
784
# ---------------------
785
# One issue with vendor `install' (even GNU) is that you can't
786
# specify the program used to strip binaries. This is especially
787
# annoying in cross-compiling environments, where the build's strip
788
# is unlikely to handle the host's binaries.
789
# Fortunately install-sh will honor a STRIPPROG variable, so we
790
# always use install-sh in `make install-strip', and initialize
791
# STRIPPROG with the value of the STRIP variable (set by the user).
792
AC_DEFUN([AM_PROG_INSTALL_STRIP],
793
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
794
# Installed binaries are usually stripped using `strip' when the user
795
# run `make install-strip'. However `strip' might not be the right
796
# tool to use in cross-compilation environments, therefore Automake
797
# will honor the `STRIP' environment variable to overrule this program.
798
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
799
if test "$cross_compiling" != no; then
800
AC_CHECK_TOOL([STRIP], [strip], :)
802
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
803
AC_SUBST([INSTALL_STRIP_PROGRAM])])
805
# Check how to create a tarball. -*- Autoconf -*-
807
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
809
# This file is free software; the Free Software Foundation
810
# gives unlimited permission to copy and/or distribute it,
811
# with or without modifications, as long as this notice is preserved.
815
# _AM_PROG_TAR(FORMAT)
816
# --------------------
817
# Check how to create a tarball in format FORMAT.
818
# FORMAT should be one of `v7', `ustar', or `pax'.
820
# Substitute a variable $(am__tar) that is a command
821
# writing to stdout a FORMAT-tarball containing the directory
823
# tardir=directory && $(am__tar) > result.tar
825
# Substitute a variable $(am__untar) that extract such
826
# a tarball read from stdin.
827
# $(am__untar) < result.tar
828
AC_DEFUN([_AM_PROG_TAR],
829
[# Always define AMTAR for backward compatibility.
830
AM_MISSING_PROG([AMTAR], [tar])
832
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
833
[m4_case([$1], [ustar],, [pax],,
834
[m4_fatal([Unknown tar format])])
835
AC_MSG_CHECKING([how to create a $1 tar archive])
836
# Loop over all known methods to create a tar archive until one works.
837
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
838
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
839
# Do not fold the above two line into one, because Tru64 sh and
840
# Solaris sh will not grok spaces in the rhs of `-'.
841
for _am_tool in $_am_tools
845
for _am_tar in tar gnutar gtar;
847
AM_RUN_LOG([$_am_tar --version]) && break
849
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
850
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
851
am__untar="$_am_tar -xf -"
854
# Must skip GNU tar: if it does not support --format= it doesn't create
855
# ustar tarball either.
856
(tar --version) >/dev/null 2>&1 && continue
857
am__tar='tar chf - "$$tardir"'
858
am__tar_='tar chf - "$tardir"'
862
am__tar='pax -L -x $1 -w "$$tardir"'
863
am__tar_='pax -L -x $1 -w "$tardir"'
867
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
868
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
869
am__untar='cpio -i -H $1 -d'
878
# If the value was cached, stop now. We just wanted to have am__tar
880
test -n "${am_cv_prog_tar_$1}" && break
882
# tar/untar a dummy directory, and stop if the command works
885
echo GrepMe > conftest.dir/file
886
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
888
if test -s conftest.tar; then
889
AM_RUN_LOG([$am__untar <conftest.tar])
890
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
895
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
896
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
898
AC_SUBST([am__untar])
921
901
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
923
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
903
# serial 48 AC_PROG_LIBTOOL
926
906
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)