~ubuntu-branches/ubuntu/edgy/ltspfs/edgy

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Scott Balneaves
  • Date: 2006-09-18 13:01:06 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060918130106-ns6gmg2kl0oic3h6
Tags: 0.4.3-0ubuntu1
* Fixed variable check for static-devices in add_fstab_entry
* Bumped to 0.4.3
* UVF exception granted by mdz

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005  Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
15
 
16
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
17
#
 
18
# This program is free software; you can redistribute it and/or modify
 
19
# it under the terms of the GNU General Public License as published by
 
20
# the Free Software Foundation; either version 2 of the License, or
 
21
# (at your option) any later version.
 
22
#
 
23
# This program is distributed in the hope that it will be useful, but
 
24
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
26
# General Public License for more details.
 
27
#
 
28
# You should have received a copy of the GNU General Public License
 
29
# along with this program; if not, write to the Free Software
 
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
31
#
 
32
# As a special exception to the GNU General Public License, if you
 
33
# distribute this file as part of a program that contains a
 
34
# configuration script generated by Autoconf, you may include it under
 
35
# the same distribution terms that you use for the rest of that program.
 
36
 
 
37
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
38
# ----------------------------------
 
39
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
40
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
41
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
42
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
43
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
44
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
45
fi
 
46
if test -n "$PKG_CONFIG"; then
 
47
        _pkg_min_version=m4_default([$1], [0.9.0])
 
48
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
49
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
50
                AC_MSG_RESULT([yes])
 
51
        else
 
52
                AC_MSG_RESULT([no])
 
53
                PKG_CONFIG=""
 
54
        fi
 
55
                
 
56
fi[]dnl
 
57
])# PKG_PROG_PKG_CONFIG
 
58
 
 
59
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
60
#
 
61
# Check to see whether a particular set of modules exists.  Similar
 
62
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
63
#
 
64
#
 
65
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
66
# this or PKG_CHECK_MODULES is called, or make sure to call
 
67
# PKG_CHECK_EXISTS manually
 
68
# --------------------------------------------------------------
 
69
AC_DEFUN([PKG_CHECK_EXISTS],
 
70
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
71
if test -n "$PKG_CONFIG" && \
 
72
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
73
  m4_ifval([$2], [$2], [:])
 
74
m4_ifvaln([$3], [else
 
75
  $3])dnl
 
76
fi])
 
77
 
 
78
 
 
79
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
80
# ---------------------------------------------
 
81
m4_define([_PKG_CONFIG],
 
82
[if test -n "$PKG_CONFIG"; then
 
83
    if test -n "$$1"; then
 
84
        pkg_cv_[]$1="$$1"
 
85
    else
 
86
        PKG_CHECK_EXISTS([$3],
 
87
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
88
                         [pkg_failed=yes])
 
89
    fi
 
90
else
 
91
        pkg_failed=untried
 
92
fi[]dnl
 
93
])# _PKG_CONFIG
 
94
 
 
95
# _PKG_SHORT_ERRORS_SUPPORTED
 
96
# -----------------------------
 
97
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
98
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
99
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
100
        _pkg_short_errors_supported=yes
 
101
else
 
102
        _pkg_short_errors_supported=no
 
103
fi[]dnl
 
104
])# _PKG_SHORT_ERRORS_SUPPORTED
 
105
 
 
106
 
 
107
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
108
# [ACTION-IF-NOT-FOUND])
 
109
#
 
110
#
 
111
# Note that if there is a possibility the first call to
 
112
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
113
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
114
#
 
115
#
 
116
# --------------------------------------------------------------
 
117
AC_DEFUN([PKG_CHECK_MODULES],
 
118
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
119
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
120
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
121
 
 
122
pkg_failed=no
 
123
AC_MSG_CHECKING([for $1])
 
124
 
 
125
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
126
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
127
 
 
128
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
129
and $1[]_LIBS to avoid the need to call pkg-config.
 
130
See the pkg-config man page for more details.])
 
131
 
 
132
if test $pkg_failed = yes; then
 
133
        _PKG_SHORT_ERRORS_SUPPORTED
 
134
        if test $_pkg_short_errors_supported = yes; then
 
135
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
136
        else 
 
137
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
138
        fi
 
139
        # Put the nasty error message in config.log where it belongs
 
140
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
141
 
 
142
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
143
[Package requirements ($2) were not met:
 
144
 
 
145
$$1_PKG_ERRORS
 
146
 
 
147
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
148
installed software in a non-standard prefix.
 
149
 
 
150
_PKG_TEXT
 
151
])],
 
152
                [$4])
 
153
elif test $pkg_failed = untried; then
 
154
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
155
[The pkg-config script could not be found or is too old.  Make sure it
 
156
is in your PATH or set the PKG_CONFIG environment variable to the full
 
157
path to pkg-config.
 
158
 
 
159
_PKG_TEXT
 
160
 
 
161
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
162
                [$4])
 
163
else
 
164
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
165
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
166
        AC_MSG_RESULT([yes])
 
167
        ifelse([$3], , :, [$3])
 
168
fi[]dnl
 
169
])# PKG_CHECK_MODULES
 
170
 
 
171
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
172
#
 
173
# This file is free software; the Free Software Foundation
 
174
# gives unlimited permission to copy and/or distribute it,
 
175
# with or without modifications, as long as this notice is preserved.
 
176
 
 
177
# AM_AUTOMAKE_VERSION(VERSION)
 
178
# ----------------------------
 
179
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
180
# generated from the m4 files accompanying Automake X.Y.
 
181
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
182
 
 
183
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
184
# -------------------------------
 
185
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
186
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
187
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
188
         [AM_AUTOMAKE_VERSION([1.9.6])])
 
189
 
 
190
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
191
 
 
192
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
193
#
 
194
# This file is free software; the Free Software Foundation
 
195
# gives unlimited permission to copy and/or distribute it,
 
196
# with or without modifications, as long as this notice is preserved.
 
197
 
 
198
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
199
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
200
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
201
#
 
202
# Of course, Automake must honor this variable whenever it calls a
 
203
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
204
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
205
# depending on how configure is run.  This is pretty annoying, since
 
206
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
207
# source directory, any form will work fine, but in subdirectories a
 
208
# relative path needs to be adjusted first.
 
209
#
 
210
# $ac_aux_dir/missing
 
211
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
212
# $top_srcdir/$ac_aux_dir/missing
 
213
#    fails if $ac_aux_dir is absolute,
 
214
#    fails when called from a subdirectory in a VPATH build with
 
215
#          a relative $ac_aux_dir
 
216
#
 
217
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
218
# are both prefixed by $srcdir.  In an in-source build this is usually
 
219
# harmless because $srcdir is `.', but things will broke when you
 
220
# start a VPATH build or use an absolute $srcdir.
 
221
#
 
222
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
223
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
224
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
225
# and then we would define $MISSING as
 
226
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
227
# This will work as long as MISSING is not called from configure, because
 
228
# unfortunately $(top_srcdir) has no meaning in configure.
 
229
# However there are other variables, like CC, which are often used in
 
230
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
231
#
 
232
# Another solution, used here, is to always expand $ac_aux_dir to an
 
233
# absolute PATH.  The drawback is that using absolute paths prevent a
 
234
# configured tree to be moved without reconfiguration.
 
235
 
 
236
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
237
[dnl Rely on autoconf to set up CDPATH properly.
 
238
AC_PREREQ([2.50])dnl
 
239
# expand $ac_aux_dir to an absolute path
 
240
am_aux_dir=`cd $ac_aux_dir && pwd`
 
241
])
 
242
 
 
243
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
244
 
 
245
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
246
# Free Software Foundation, Inc.
 
247
#
 
248
# This file is free software; the Free Software Foundation
 
249
# gives unlimited permission to copy and/or distribute it,
 
250
# with or without modifications, as long as this notice is preserved.
 
251
 
 
252
# serial 7
 
253
 
 
254
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
255
# -------------------------------------
 
256
# Define a conditional.
 
257
AC_DEFUN([AM_CONDITIONAL],
 
258
[AC_PREREQ(2.52)dnl
 
259
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
260
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
261
AC_SUBST([$1_TRUE])
 
262
AC_SUBST([$1_FALSE])
 
263
if $2; then
 
264
  $1_TRUE=
 
265
  $1_FALSE='#'
 
266
else
 
267
  $1_TRUE='#'
 
268
  $1_FALSE=
 
269
fi
 
270
AC_CONFIG_COMMANDS_PRE(
 
271
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
272
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
273
Usually this means the macro was only invoked conditionally.]])
 
274
fi])])
 
275
 
 
276
 
 
277
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
278
# Free Software Foundation, Inc.
 
279
#
 
280
# This file is free software; the Free Software Foundation
 
281
# gives unlimited permission to copy and/or distribute it,
 
282
# with or without modifications, as long as this notice is preserved.
 
283
 
 
284
# serial 8
 
285
 
 
286
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
287
# written in clear, in which case automake, when reading aclocal.m4,
 
288
# will think it sees a *use*, and therefore will trigger all it's
 
289
# C support machinery.  Also note that it means that autoscan, seeing
 
290
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
291
 
 
292
 
 
293
# _AM_DEPENDENCIES(NAME)
 
294
# ----------------------
 
295
# See how the compiler implements dependency checking.
 
296
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
297
# We try a few techniques and use that to set a single cache variable.
 
298
#
 
299
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
300
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
301
# dependency, and given that the user is not expected to run this macro,
 
302
# just rely on AC_PROG_CC.
 
303
AC_DEFUN([_AM_DEPENDENCIES],
 
304
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
305
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
306
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
307
AC_REQUIRE([AM_DEP_TRACK])dnl
 
308
 
 
309
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
310
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
311
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
312
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
313
                   [depcc="$$1"   am_compiler_list=])
 
314
 
 
315
AC_CACHE_CHECK([dependency style of $depcc],
 
316
               [am_cv_$1_dependencies_compiler_type],
 
317
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
318
  # We make a subdir and do the tests there.  Otherwise we can end up
 
319
  # making bogus files that we don't know about and never remove.  For
 
320
  # instance it was reported that on HP-UX the gcc test will end up
 
321
  # making a dummy file named `D' -- because `-MD' means `put the output
 
322
  # in D'.
 
323
  mkdir conftest.dir
 
324
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
325
  # using a relative directory.
 
326
  cp "$am_depcomp" conftest.dir
 
327
  cd conftest.dir
 
328
  # We will build objects and dependencies in a subdirectory because
 
329
  # it helps to detect inapplicable dependency modes.  For instance
 
330
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
331
  # side effect of compilation, but ICC will put the dependencies in
 
332
  # the current directory while Tru64 will put them in the object
 
333
  # directory.
 
334
  mkdir sub
 
335
 
 
336
  am_cv_$1_dependencies_compiler_type=none
 
337
  if test "$am_compiler_list" = ""; then
 
338
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
339
  fi
 
340
  for depmode in $am_compiler_list; do
 
341
    # Setup a source with many dependencies, because some compilers
 
342
    # like to wrap large dependency lists on column 80 (with \), and
 
343
    # we should not choose a depcomp mode which is confused by this.
 
344
    #
 
345
    # We need to recreate these files for each test, as the compiler may
 
346
    # overwrite some of them when testing with obscure command lines.
 
347
    # This happens at least with the AIX C compiler.
 
348
    : > sub/conftest.c
 
349
    for i in 1 2 3 4 5 6; do
 
350
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
351
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
352
      # Solaris 8's {/usr,}/bin/sh.
 
353
      touch sub/conftst$i.h
 
354
    done
 
355
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
356
 
 
357
    case $depmode in
 
358
    nosideeffect)
 
359
      # after this tag, mechanisms are not by side-effect, so they'll
 
360
      # only be used when explicitly requested
 
361
      if test "x$enable_dependency_tracking" = xyes; then
 
362
        continue
 
363
      else
 
364
        break
 
365
      fi
 
366
      ;;
 
367
    none) break ;;
 
368
    esac
 
369
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
370
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
371
    # handle `-M -o', and we need to detect this.
 
372
    if depmode=$depmode \
 
373
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
374
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
375
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
376
         >/dev/null 2>conftest.err &&
 
377
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
378
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
379
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
380
      # icc doesn't choke on unknown options, it will just issue warnings
 
381
      # or remarks (even with -Werror).  So we grep stderr for any message
 
382
      # that says an option was ignored or not supported.
 
383
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
384
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
385
      # The diagnosis changed in icc 8.0:
 
386
      #   icc: Command line remark: option '-MP' not supported
 
387
      if (grep 'ignoring option' conftest.err ||
 
388
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
389
        am_cv_$1_dependencies_compiler_type=$depmode
 
390
        break
 
391
      fi
 
392
    fi
 
393
  done
 
394
 
 
395
  cd ..
 
396
  rm -rf conftest.dir
 
397
else
 
398
  am_cv_$1_dependencies_compiler_type=none
 
399
fi
 
400
])
 
401
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
402
AM_CONDITIONAL([am__fastdep$1], [
 
403
  test "x$enable_dependency_tracking" != xno \
 
404
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
405
])
 
406
 
 
407
 
 
408
# AM_SET_DEPDIR
 
409
# -------------
 
410
# Choose a directory name for dependency files.
 
411
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
412
AC_DEFUN([AM_SET_DEPDIR],
 
413
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
414
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
415
])
 
416
 
 
417
 
 
418
# AM_DEP_TRACK
 
419
# ------------
 
420
AC_DEFUN([AM_DEP_TRACK],
 
421
[AC_ARG_ENABLE(dependency-tracking,
 
422
[  --disable-dependency-tracking  speeds up one-time build
 
423
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
424
if test "x$enable_dependency_tracking" != xno; then
 
425
  am_depcomp="$ac_aux_dir/depcomp"
 
426
  AMDEPBACKSLASH='\'
 
427
fi
 
428
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
429
AC_SUBST([AMDEPBACKSLASH])
 
430
])
 
431
 
 
432
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
433
 
 
434
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
435
# Free Software Foundation, Inc.
 
436
#
 
437
# This file is free software; the Free Software Foundation
 
438
# gives unlimited permission to copy and/or distribute it,
 
439
# with or without modifications, as long as this notice is preserved.
 
440
 
 
441
#serial 3
 
442
 
 
443
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
444
# ------------------------------
 
445
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
446
[for mf in $CONFIG_FILES; do
 
447
  # Strip MF so we end up with the name of the file.
 
448
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
449
  # Check whether this is an Automake generated Makefile or not.
 
450
  # We used to match only the files named `Makefile.in', but
 
451
  # some people rename them; so instead we look at the file content.
 
452
  # Grep'ing the first line is not enough: some people post-process
 
453
  # each Makefile.in and add a new line on top of each file to say so.
 
454
  # So let's grep whole file.
 
455
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
456
    dirpart=`AS_DIRNAME("$mf")`
 
457
  else
 
458
    continue
 
459
  fi
 
460
  # Extract the definition of DEPDIR, am__include, and am__quote
 
461
  # from the Makefile without running `make'.
 
462
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
463
  test -z "$DEPDIR" && continue
 
464
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
465
  test -z "am__include" && continue
 
466
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
467
  # When using ansi2knr, U may be empty or an underscore; expand it
 
468
  U=`sed -n 's/^U = //p' < "$mf"`
 
469
  # Find all dependency output files, they are included files with
 
470
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
471
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
472
  # expansion.
 
473
  for file in `sed -n "
 
474
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
475
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
476
    # Make sure the directory exists.
 
477
    test -f "$dirpart/$file" && continue
 
478
    fdir=`AS_DIRNAME(["$file"])`
 
479
    AS_MKDIR_P([$dirpart/$fdir])
 
480
    # echo "creating $dirpart/$file"
 
481
    echo '# dummy' > "$dirpart/$file"
 
482
  done
 
483
done
 
484
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
485
 
 
486
 
 
487
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
488
# -----------------------------
 
489
# This macro should only be invoked once -- use via AC_REQUIRE.
 
490
#
 
491
# This code is only required when automatic dependency tracking
 
492
# is enabled.  FIXME.  This creates each `.P' file that we will
 
493
# need in order to bootstrap the dependency handling code.
 
494
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
495
[AC_CONFIG_COMMANDS([depfiles],
 
496
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
497
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
498
])
 
499
 
 
500
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
501
# Free Software Foundation, Inc.
 
502
#
 
503
# This file is free software; the Free Software Foundation
 
504
# gives unlimited permission to copy and/or distribute it,
 
505
# with or without modifications, as long as this notice is preserved.
 
506
 
 
507
# serial 8
 
508
 
 
509
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
510
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
511
 
 
512
# Do all the work for Automake.                             -*- Autoconf -*-
 
513
 
 
514
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
515
# Free Software Foundation, Inc.
 
516
#
 
517
# This file is free software; the Free Software Foundation
 
518
# gives unlimited permission to copy and/or distribute it,
 
519
# with or without modifications, as long as this notice is preserved.
 
520
 
 
521
# serial 12
 
522
 
 
523
# This macro actually does too much.  Some checks are only needed if
 
524
# your package does certain things.  But this isn't really a big deal.
 
525
 
 
526
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
527
# AM_INIT_AUTOMAKE([OPTIONS])
 
528
# -----------------------------------------------
 
529
# The call with PACKAGE and VERSION arguments is the old style
 
530
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
531
# and VERSION should now be passed to AC_INIT and removed from
 
532
# the call to AM_INIT_AUTOMAKE.
 
533
# We support both call styles for the transition.  After
 
534
# the next Automake release, Autoconf can make the AC_INIT
 
535
# arguments mandatory, and then we can depend on a new Autoconf
 
536
# release and drop the old call support.
 
537
AC_DEFUN([AM_INIT_AUTOMAKE],
 
538
[AC_PREREQ([2.58])dnl
 
539
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
540
dnl the ones we care about.
 
541
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
542
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
543
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
544
# test to see if srcdir already configured
 
545
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
546
   test -f $srcdir/config.status; then
 
547
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
548
fi
 
549
 
 
550
# test whether we have cygpath
 
551
if test -z "$CYGPATH_W"; then
 
552
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
553
    CYGPATH_W='cygpath -w'
 
554
  else
 
555
    CYGPATH_W=echo
 
556
  fi
 
557
fi
 
558
AC_SUBST([CYGPATH_W])
 
559
 
 
560
# Define the identity of the package.
 
561
dnl Distinguish between old-style and new-style calls.
 
562
m4_ifval([$2],
 
563
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
564
 AC_SUBST([PACKAGE], [$1])dnl
 
565
 AC_SUBST([VERSION], [$2])],
 
566
[_AM_SET_OPTIONS([$1])dnl
 
567
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
568
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
569
 
 
570
_AM_IF_OPTION([no-define],,
 
571
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
572
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
573
 
 
574
# Some tools Automake needs.
 
575
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
576
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
577
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
578
AM_MISSING_PROG(AUTOCONF, autoconf)
 
579
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
580
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
581
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
582
AM_PROG_INSTALL_SH
 
583
AM_PROG_INSTALL_STRIP
 
584
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
585
# We need awk for the "check" target.  The system "awk" is bad on
 
586
# some platforms.
 
587
AC_REQUIRE([AC_PROG_AWK])dnl
 
588
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
589
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
590
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
591
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
592
                             [_AM_PROG_TAR([v7])])])
 
593
_AM_IF_OPTION([no-dependencies],,
 
594
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
595
                  [_AM_DEPENDENCIES(CC)],
 
596
                  [define([AC_PROG_CC],
 
597
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
598
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
599
                  [_AM_DEPENDENCIES(CXX)],
 
600
                  [define([AC_PROG_CXX],
 
601
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
602
])
 
603
])
 
604
 
 
605
 
 
606
# When config.status generates a header, we must update the stamp-h file.
 
607
# This file resides in the same directory as the config header
 
608
# that is generated.  The stamp files are numbered to have different names.
 
609
 
 
610
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
611
# loop where config.status creates the headers, so we can generate
 
612
# our stamp files there.
 
613
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
614
[# Compute $1's index in $config_headers.
 
615
_am_stamp_count=1
 
616
for _am_header in $config_headers :; do
 
617
  case $_am_header in
 
618
    $1 | $1:* )
 
619
      break ;;
 
620
    * )
 
621
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
622
  esac
 
623
done
 
624
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
625
 
 
626
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
627
#
 
628
# This file is free software; the Free Software Foundation
 
629
# gives unlimited permission to copy and/or distribute it,
 
630
# with or without modifications, as long as this notice is preserved.
 
631
 
 
632
# AM_PROG_INSTALL_SH
 
633
# ------------------
 
634
# Define $install_sh.
 
635
AC_DEFUN([AM_PROG_INSTALL_SH],
 
636
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
637
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
638
AC_SUBST(install_sh)])
 
639
 
 
640
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
641
#
 
642
# This file is free software; the Free Software Foundation
 
643
# gives unlimited permission to copy and/or distribute it,
 
644
# with or without modifications, as long as this notice is preserved.
 
645
 
 
646
# serial 2
 
647
 
 
648
# Check whether the underlying file-system supports filenames
 
649
# with a leading dot.  For instance MS-DOS doesn't.
 
650
AC_DEFUN([AM_SET_LEADING_DOT],
 
651
[rm -rf .tst 2>/dev/null
 
652
mkdir .tst 2>/dev/null
 
653
if test -d .tst; then
 
654
  am__leading_dot=.
 
655
else
 
656
  am__leading_dot=_
 
657
fi
 
658
rmdir .tst 2>/dev/null
 
659
AC_SUBST([am__leading_dot])])
 
660
 
 
661
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
662
# From Jim Meyering
 
663
 
 
664
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
 
665
# Free Software Foundation, Inc.
 
666
#
 
667
# This file is free software; the Free Software Foundation
 
668
# gives unlimited permission to copy and/or distribute it,
 
669
# with or without modifications, as long as this notice is preserved.
 
670
 
 
671
# serial 4
 
672
 
 
673
AC_DEFUN([AM_MAINTAINER_MODE],
 
674
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
675
  dnl maintainer-mode is disabled by default
 
676
  AC_ARG_ENABLE(maintainer-mode,
 
677
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
678
                          (and sometimes confusing) to the casual installer],
 
679
      USE_MAINTAINER_MODE=$enableval,
 
680
      USE_MAINTAINER_MODE=no)
 
681
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
682
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
683
  MAINT=$MAINTAINER_MODE_TRUE
 
684
  AC_SUBST(MAINT)dnl
 
685
]
 
686
)
 
687
 
 
688
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
689
 
 
690
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
691
 
 
692
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
693
#
 
694
# This file is free software; the Free Software Foundation
 
695
# gives unlimited permission to copy and/or distribute it,
 
696
# with or without modifications, as long as this notice is preserved.
 
697
 
 
698
# serial 3
 
699
 
 
700
# AM_MAKE_INCLUDE()
 
701
# -----------------
 
702
# Check to see how make treats includes.
 
703
AC_DEFUN([AM_MAKE_INCLUDE],
 
704
[am_make=${MAKE-make}
 
705
cat > confinc << 'END'
 
706
am__doit:
 
707
        @echo done
 
708
.PHONY: am__doit
 
709
END
 
710
# If we don't find an include directive, just comment out the code.
 
711
AC_MSG_CHECKING([for style of include used by $am_make])
 
712
am__include="#"
 
713
am__quote=
 
714
_am_result=none
 
715
# First try GNU make style include.
 
716
echo "include confinc" > confmf
 
717
# We grep out `Entering directory' and `Leaving directory'
 
718
# messages which can occur if `w' ends up in MAKEFLAGS.
 
719
# In particular we don't look at `^make:' because GNU make might
 
720
# be invoked under some other name (usually "gmake"), in which
 
721
# case it prints its new name instead of `make'.
 
722
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
723
   am__include=include
 
724
   am__quote=
 
725
   _am_result=GNU
 
726
fi
 
727
# Now try BSD make style include.
 
728
if test "$am__include" = "#"; then
 
729
   echo '.include "confinc"' > confmf
 
730
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
731
      am__include=.include
 
732
      am__quote="\""
 
733
      _am_result=BSD
 
734
   fi
 
735
fi
 
736
AC_SUBST([am__include])
 
737
AC_SUBST([am__quote])
 
738
AC_MSG_RESULT([$_am_result])
 
739
rm -f confinc confmf
 
740
])
 
741
 
 
742
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
743
 
 
744
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
745
# Free Software Foundation, Inc.
 
746
#
 
747
# This file is free software; the Free Software Foundation
 
748
# gives unlimited permission to copy and/or distribute it,
 
749
# with or without modifications, as long as this notice is preserved.
 
750
 
 
751
# serial 4
 
752
 
 
753
# AM_MISSING_PROG(NAME, PROGRAM)
 
754
# ------------------------------
 
755
AC_DEFUN([AM_MISSING_PROG],
 
756
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
757
$1=${$1-"${am_missing_run}$2"}
 
758
AC_SUBST($1)])
 
759
 
 
760
 
 
761
# AM_MISSING_HAS_RUN
 
762
# ------------------
 
763
# Define MISSING if not defined so far and test if it supports --run.
 
764
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
765
AC_DEFUN([AM_MISSING_HAS_RUN],
 
766
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
767
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
768
# Use eval to expand $SHELL
 
769
if eval "$MISSING --run true"; then
 
770
  am_missing_run="$MISSING --run "
 
771
else
 
772
  am_missing_run=
 
773
  AC_MSG_WARN([`missing' script is too old or missing])
 
774
fi
 
775
])
 
776
 
 
777
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
778
#
 
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.
 
782
 
 
783
# AM_PROG_MKDIR_P
 
784
# ---------------
 
785
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
786
#
 
787
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
788
# created by `make install' are always world readable, even if the
 
789
# installer happens to have an overly restrictive umask (e.g. 077).
 
790
# This was a mistake.  There are at least two reasons why we must not
 
791
# use `-m 0755':
 
792
#   - it causes special bits like SGID to be ignored,
 
793
#   - it may be too restrictive (some setups expect 775 directories).
 
794
#
 
795
# Do not use -m 0755 and let people choose whatever they expect by
 
796
# setting umask.
 
797
#
 
798
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
799
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
800
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
801
# concurrently, both version can detect that a/ is missing, but only
 
802
# one can create it and the other will error out.  Consequently we
 
803
# restrict ourselves to GNU make (using the --version option ensures
 
804
# this.)
 
805
AC_DEFUN([AM_PROG_MKDIR_P],
 
806
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
807
  # We used to keeping the `.' as first argument, in order to
 
808
  # allow $(mkdir_p) to be used without argument.  As in
 
809
  #   $(mkdir_p) $(somedir)
 
810
  # where $(somedir) is conditionally defined.  However this is wrong
 
811
  # for two reasons:
 
812
  #  1. if the package is installed by a user who cannot write `.'
 
813
  #     make install will fail,
 
814
  #  2. the above comment should most certainly read
 
815
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
816
  #     so it does not work when $(somedir) is undefined and
 
817
  #     $(DESTDIR) is not.
 
818
  #  To support the latter case, we have to write
 
819
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
820
  #  so the `.' trick is pointless.
 
821
  mkdir_p='mkdir -p --'
 
822
else
 
823
  # On NextStep and OpenStep, the `mkdir' command does not
 
824
  # recognize any option.  It will interpret all options as
 
825
  # directories to create, and then abort because `.' already
 
826
  # exists.
 
827
  for d in ./-p ./--version;
 
828
  do
 
829
    test -d $d && rmdir $d
 
830
  done
 
831
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
832
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
833
    mkdir_p='$(mkinstalldirs)'
 
834
  else
 
835
    mkdir_p='$(install_sh) -d'
 
836
  fi
 
837
fi
 
838
AC_SUBST([mkdir_p])])
 
839
 
 
840
# Helper functions for option handling.                     -*- Autoconf -*-
 
841
 
 
842
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
843
#
 
844
# This file is free software; the Free Software Foundation
 
845
# gives unlimited permission to copy and/or distribute it,
 
846
# with or without modifications, as long as this notice is preserved.
 
847
 
 
848
# serial 3
 
849
 
 
850
# _AM_MANGLE_OPTION(NAME)
 
851
# -----------------------
 
852
AC_DEFUN([_AM_MANGLE_OPTION],
 
853
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
854
 
 
855
# _AM_SET_OPTION(NAME)
 
856
# ------------------------------
 
857
# Set option NAME.  Presently that only means defining a flag for this option.
 
858
AC_DEFUN([_AM_SET_OPTION],
 
859
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
860
 
 
861
# _AM_SET_OPTIONS(OPTIONS)
 
862
# ----------------------------------
 
863
# OPTIONS is a space-separated list of Automake options.
 
864
AC_DEFUN([_AM_SET_OPTIONS],
 
865
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
866
 
 
867
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
868
# -------------------------------------------
 
869
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
870
AC_DEFUN([_AM_IF_OPTION],
 
871
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
872
 
 
873
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
874
 
 
875
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
876
# Free Software Foundation, Inc.
 
877
#
 
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.
 
881
 
 
882
# serial 4
 
883
 
 
884
# AM_SANITY_CHECK
 
885
# ---------------
 
886
AC_DEFUN([AM_SANITY_CHECK],
 
887
[AC_MSG_CHECKING([whether build environment is sane])
 
888
# Just in case
 
889
sleep 1
 
890
echo timestamp > conftest.file
 
891
# Do `set' in a subshell so we don't clobber the current shell's
 
892
# arguments.  Must try -L first in case configure is actually a
 
893
# symlink; some systems play weird games with the mod time of symlinks
 
894
# (eg FreeBSD returns the mod time of the symlink's containing
 
895
# directory).
 
896
if (
 
897
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
898
   if test "$[*]" = "X"; then
 
899
      # -L didn't work.
 
900
      set X `ls -t $srcdir/configure conftest.file`
 
901
   fi
 
902
   rm -f conftest.file
 
903
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
904
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
905
 
 
906
      # If neither matched, then we have a broken ls.  This can happen
 
907
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
908
      # broken ls alias from the environment.  This has actually
 
909
      # happened.  Such a system could not be considered "sane".
 
910
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
911
alias in your environment])
 
912
   fi
 
913
 
 
914
   test "$[2]" = conftest.file
 
915
   )
 
916
then
 
917
   # Ok.
 
918
   :
 
919
else
 
920
   AC_MSG_ERROR([newly created file is older than distributed files!
 
921
Check your system clock])
 
922
fi
 
923
AC_MSG_RESULT(yes)])
 
924
 
 
925
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
926
#
 
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.
 
930
 
 
931
# AM_PROG_INSTALL_STRIP
 
932
# ---------------------
 
933
# One issue with vendor `install' (even GNU) is that you can't
 
934
# specify the program used to strip binaries.  This is especially
 
935
# annoying in cross-compiling environments, where the build's strip
 
936
# is unlikely to handle the host's binaries.
 
937
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
938
# always use install-sh in `make install-strip', and initialize
 
939
# STRIPPROG with the value of the STRIP variable (set by the user).
 
940
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
941
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
942
# Installed binaries are usually stripped using `strip' when the user
 
943
# run `make install-strip'.  However `strip' might not be the right
 
944
# tool to use in cross-compilation environments, therefore Automake
 
945
# will honor the `STRIP' environment variable to overrule this program.
 
946
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
947
if test "$cross_compiling" != no; then
 
948
  AC_CHECK_TOOL([STRIP], [strip], :)
 
949
fi
 
950
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
951
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
952
 
 
953
# Check how to create a tarball.                            -*- Autoconf -*-
 
954
 
 
955
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
956
#
 
957
# This file is free software; the Free Software Foundation
 
958
# gives unlimited permission to copy and/or distribute it,
 
959
# with or without modifications, as long as this notice is preserved.
 
960
 
 
961
# serial 2
 
962
 
 
963
# _AM_PROG_TAR(FORMAT)
 
964
# --------------------
 
965
# Check how to create a tarball in format FORMAT.
 
966
# FORMAT should be one of `v7', `ustar', or `pax'.
 
967
#
 
968
# Substitute a variable $(am__tar) that is a command
 
969
# writing to stdout a FORMAT-tarball containing the directory
 
970
# $tardir.
 
971
#     tardir=directory && $(am__tar) > result.tar
 
972
#
 
973
# Substitute a variable $(am__untar) that extract such
 
974
# a tarball read from stdin.
 
975
#     $(am__untar) < result.tar
 
976
AC_DEFUN([_AM_PROG_TAR],
 
977
[# Always define AMTAR for backward compatibility.
 
978
AM_MISSING_PROG([AMTAR], [tar])
 
979
m4_if([$1], [v7],
 
980
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
981
     [m4_case([$1], [ustar],, [pax],,
 
982
              [m4_fatal([Unknown tar format])])
 
983
AC_MSG_CHECKING([how to create a $1 tar archive])
 
984
# Loop over all known methods to create a tar archive until one works.
 
985
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
986
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
987
# Do not fold the above two line into one, because Tru64 sh and
 
988
# Solaris sh will not grok spaces in the rhs of `-'.
 
989
for _am_tool in $_am_tools
 
990
do
 
991
  case $_am_tool in
 
992
  gnutar)
 
993
    for _am_tar in tar gnutar gtar;
 
994
    do
 
995
      AM_RUN_LOG([$_am_tar --version]) && break
 
996
    done
 
997
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
998
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
999
    am__untar="$_am_tar -xf -"
 
1000
    ;;
 
1001
  plaintar)
 
1002
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
1003
    # ustar tarball either.
 
1004
    (tar --version) >/dev/null 2>&1 && continue
 
1005
    am__tar='tar chf - "$$tardir"'
 
1006
    am__tar_='tar chf - "$tardir"'
 
1007
    am__untar='tar xf -'
 
1008
    ;;
 
1009
  pax)
 
1010
    am__tar='pax -L -x $1 -w "$$tardir"'
 
1011
    am__tar_='pax -L -x $1 -w "$tardir"'
 
1012
    am__untar='pax -r'
 
1013
    ;;
 
1014
  cpio)
 
1015
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1016
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1017
    am__untar='cpio -i -H $1 -d'
 
1018
    ;;
 
1019
  none)
 
1020
    am__tar=false
 
1021
    am__tar_=false
 
1022
    am__untar=false
 
1023
    ;;
 
1024
  esac
 
1025
 
 
1026
  # If the value was cached, stop now.  We just wanted to have am__tar
 
1027
  # and am__untar set.
 
1028
  test -n "${am_cv_prog_tar_$1}" && break
 
1029
 
 
1030
  # tar/untar a dummy directory, and stop if the command works
 
1031
  rm -rf conftest.dir
 
1032
  mkdir conftest.dir
 
1033
  echo GrepMe > conftest.dir/file
 
1034
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1035
  rm -rf conftest.dir
 
1036
  if test -s conftest.tar; then
 
1037
    AM_RUN_LOG([$am__untar <conftest.tar])
 
1038
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1039
  fi
 
1040
done
 
1041
rm -rf conftest.dir
 
1042
 
 
1043
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1044
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1045
AC_SUBST([am__tar])
 
1046
AC_SUBST([am__untar])
 
1047
]) # _AM_PROG_TAR
 
1048