xref: /minix3/external/bsd/flex/dist/aclocal.m4 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
2357f1050SThomas Veerman
3357f1050SThomas Veerman# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4*0a6a1f1dSLionel Sambuc# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5*0a6a1f1dSLionel Sambuc# Inc.
6357f1050SThomas Veerman# This file is free software; the Free Software Foundation
7357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
8357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
9357f1050SThomas Veerman
10357f1050SThomas Veerman# This program is distributed in the hope that it will be useful,
11357f1050SThomas Veerman# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12357f1050SThomas Veerman# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13357f1050SThomas Veerman# PARTICULAR PURPOSE.
14357f1050SThomas Veerman
1584d9c625SLionel Sambucm4_ifndef([AC_AUTOCONF_VERSION],
1684d9c625SLionel Sambuc  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17*0a6a1f1dSLionel Sambucm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18*0a6a1f1dSLionel Sambuc[m4_warning([this file was generated for autoconf 2.69.
1984d9c625SLionel SambucYou have another version of autoconf.  It may work, but is not guaranteed to.
2084d9c625SLionel SambucIf you have problems, you may need to regenerate the build system entirely.
2184d9c625SLionel SambucTo do so, use the procedure documented by the package, typically `autoreconf'.])])
2284d9c625SLionel Sambuc
23*0a6a1f1dSLionel Sambuc# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
24*0a6a1f1dSLionel Sambuc# Foundation, Inc.
25357f1050SThomas Veerman#
26357f1050SThomas Veerman# This file is free software; the Free Software Foundation
27357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
28357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
29357f1050SThomas Veerman
30*0a6a1f1dSLionel Sambuc# serial 1
31*0a6a1f1dSLionel Sambuc
32357f1050SThomas Veerman# AM_AUTOMAKE_VERSION(VERSION)
33357f1050SThomas Veerman# ----------------------------
34357f1050SThomas Veerman# Automake X.Y traces this macro to ensure aclocal.m4 has been
35357f1050SThomas Veerman# generated from the m4 files accompanying Automake X.Y.
3684d9c625SLionel Sambuc# (This private macro should not be called outside this file.)
3784d9c625SLionel SambucAC_DEFUN([AM_AUTOMAKE_VERSION],
3884d9c625SLionel Sambuc[am__api_version='1.11'
3984d9c625SLionel Sambucdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
4084d9c625SLionel Sambucdnl require some minimum version.  Point them to the right macro.
41*0a6a1f1dSLionel Sambucm4_if([$1], [1.11.6], [],
4284d9c625SLionel Sambuc      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
4384d9c625SLionel Sambuc])
4484d9c625SLionel Sambuc
4584d9c625SLionel Sambuc# _AM_AUTOCONF_VERSION(VERSION)
4684d9c625SLionel Sambuc# -----------------------------
4784d9c625SLionel Sambuc# aclocal traces this macro to find the Autoconf version.
4884d9c625SLionel Sambuc# This is a private macro too.  Using m4_define simplifies
4984d9c625SLionel Sambuc# the logic in aclocal, which can simply ignore this definition.
5084d9c625SLionel Sambucm4_define([_AM_AUTOCONF_VERSION], [])
51357f1050SThomas Veerman
52357f1050SThomas Veerman# AM_SET_CURRENT_AUTOMAKE_VERSION
53357f1050SThomas Veerman# -------------------------------
5484d9c625SLionel Sambuc# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5584d9c625SLionel Sambuc# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
56357f1050SThomas VeermanAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
57*0a6a1f1dSLionel Sambuc[AM_AUTOMAKE_VERSION([1.11.6])dnl
5884d9c625SLionel Sambucm4_ifndef([AC_AUTOCONF_VERSION],
5984d9c625SLionel Sambuc  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
6084d9c625SLionel Sambuc_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
61357f1050SThomas Veerman
62357f1050SThomas Veerman# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
63357f1050SThomas Veerman
64*0a6a1f1dSLionel Sambuc# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
65357f1050SThomas Veerman#
66357f1050SThomas Veerman# This file is free software; the Free Software Foundation
67357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
68357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
69357f1050SThomas Veerman
70*0a6a1f1dSLionel Sambuc# serial 1
71*0a6a1f1dSLionel Sambuc
72357f1050SThomas Veerman# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
73357f1050SThomas Veerman# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
74357f1050SThomas Veerman# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
75357f1050SThomas Veerman#
76357f1050SThomas Veerman# Of course, Automake must honor this variable whenever it calls a
77357f1050SThomas Veerman# tool from the auxiliary directory.  The problem is that $srcdir (and
78357f1050SThomas Veerman# therefore $ac_aux_dir as well) can be either absolute or relative,
79357f1050SThomas Veerman# depending on how configure is run.  This is pretty annoying, since
80357f1050SThomas Veerman# it makes $ac_aux_dir quite unusable in subdirectories: in the top
81357f1050SThomas Veerman# source directory, any form will work fine, but in subdirectories a
82357f1050SThomas Veerman# relative path needs to be adjusted first.
83357f1050SThomas Veerman#
84357f1050SThomas Veerman# $ac_aux_dir/missing
85357f1050SThomas Veerman#    fails when called from a subdirectory if $ac_aux_dir is relative
86357f1050SThomas Veerman# $top_srcdir/$ac_aux_dir/missing
87357f1050SThomas Veerman#    fails if $ac_aux_dir is absolute,
88357f1050SThomas Veerman#    fails when called from a subdirectory in a VPATH build with
89357f1050SThomas Veerman#          a relative $ac_aux_dir
90357f1050SThomas Veerman#
91357f1050SThomas Veerman# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
92357f1050SThomas Veerman# are both prefixed by $srcdir.  In an in-source build this is usually
93357f1050SThomas Veerman# harmless because $srcdir is `.', but things will broke when you
94357f1050SThomas Veerman# start a VPATH build or use an absolute $srcdir.
95357f1050SThomas Veerman#
96357f1050SThomas Veerman# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
97357f1050SThomas Veerman# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
98357f1050SThomas Veerman#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
99357f1050SThomas Veerman# and then we would define $MISSING as
100357f1050SThomas Veerman#   MISSING="\${SHELL} $am_aux_dir/missing"
101357f1050SThomas Veerman# This will work as long as MISSING is not called from configure, because
102357f1050SThomas Veerman# unfortunately $(top_srcdir) has no meaning in configure.
103357f1050SThomas Veerman# However there are other variables, like CC, which are often used in
104357f1050SThomas Veerman# configure, and could therefore not use this "fixed" $ac_aux_dir.
105357f1050SThomas Veerman#
106357f1050SThomas Veerman# Another solution, used here, is to always expand $ac_aux_dir to an
107357f1050SThomas Veerman# absolute PATH.  The drawback is that using absolute paths prevent a
108357f1050SThomas Veerman# configured tree to be moved without reconfiguration.
109357f1050SThomas Veerman
110357f1050SThomas VeermanAC_DEFUN([AM_AUX_DIR_EXPAND],
111357f1050SThomas Veerman[dnl Rely on autoconf to set up CDPATH properly.
112357f1050SThomas VeermanAC_PREREQ([2.50])dnl
113357f1050SThomas Veerman# expand $ac_aux_dir to an absolute path
114357f1050SThomas Veermanam_aux_dir=`cd $ac_aux_dir && pwd`
115357f1050SThomas Veerman])
116357f1050SThomas Veerman
117357f1050SThomas Veerman# AM_CONDITIONAL                                            -*- Autoconf -*-
118357f1050SThomas Veerman
11984d9c625SLionel Sambuc# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
120357f1050SThomas Veerman# Free Software Foundation, Inc.
121357f1050SThomas Veerman#
122357f1050SThomas Veerman# This file is free software; the Free Software Foundation
123357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
124357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
125357f1050SThomas Veerman
12684d9c625SLionel Sambuc# serial 9
127357f1050SThomas Veerman
128357f1050SThomas Veerman# AM_CONDITIONAL(NAME, SHELL-CONDITION)
129357f1050SThomas Veerman# -------------------------------------
130357f1050SThomas Veerman# Define a conditional.
131357f1050SThomas VeermanAC_DEFUN([AM_CONDITIONAL],
132357f1050SThomas Veerman[AC_PREREQ(2.52)dnl
133357f1050SThomas Veerman ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
134357f1050SThomas Veerman	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
13584d9c625SLionel SambucAC_SUBST([$1_TRUE])dnl
13684d9c625SLionel SambucAC_SUBST([$1_FALSE])dnl
13784d9c625SLionel Sambuc_AM_SUBST_NOTMAKE([$1_TRUE])dnl
13884d9c625SLionel Sambuc_AM_SUBST_NOTMAKE([$1_FALSE])dnl
13984d9c625SLionel Sambucm4_define([_AM_COND_VALUE_$1], [$2])dnl
140357f1050SThomas Veermanif $2; then
141357f1050SThomas Veerman  $1_TRUE=
142357f1050SThomas Veerman  $1_FALSE='#'
143357f1050SThomas Veermanelse
144357f1050SThomas Veerman  $1_TRUE='#'
145357f1050SThomas Veerman  $1_FALSE=
146357f1050SThomas Veermanfi
147357f1050SThomas VeermanAC_CONFIG_COMMANDS_PRE(
148357f1050SThomas Veerman[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
149357f1050SThomas Veerman  AC_MSG_ERROR([[conditional "$1" was never defined.
150357f1050SThomas VeermanUsually this means the macro was only invoked conditionally.]])
151357f1050SThomas Veermanfi])])
152357f1050SThomas Veerman
153*0a6a1f1dSLionel Sambuc# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
154*0a6a1f1dSLionel Sambuc# 2010, 2011 Free Software Foundation, Inc.
155357f1050SThomas Veerman#
156357f1050SThomas Veerman# This file is free software; the Free Software Foundation
157357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
158357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
159357f1050SThomas Veerman
160*0a6a1f1dSLionel Sambuc# serial 12
161357f1050SThomas Veerman
162357f1050SThomas Veerman# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
163357f1050SThomas Veerman# written in clear, in which case automake, when reading aclocal.m4,
164357f1050SThomas Veerman# will think it sees a *use*, and therefore will trigger all it's
165357f1050SThomas Veerman# C support machinery.  Also note that it means that autoscan, seeing
166357f1050SThomas Veerman# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
167357f1050SThomas Veerman
168357f1050SThomas Veerman
169357f1050SThomas Veerman# _AM_DEPENDENCIES(NAME)
170357f1050SThomas Veerman# ----------------------
171357f1050SThomas Veerman# See how the compiler implements dependency checking.
172357f1050SThomas Veerman# NAME is "CC", "CXX", "GCJ", or "OBJC".
173357f1050SThomas Veerman# We try a few techniques and use that to set a single cache variable.
174357f1050SThomas Veerman#
175357f1050SThomas Veerman# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
176357f1050SThomas Veerman# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
177357f1050SThomas Veerman# dependency, and given that the user is not expected to run this macro,
178357f1050SThomas Veerman# just rely on AC_PROG_CC.
179357f1050SThomas VeermanAC_DEFUN([_AM_DEPENDENCIES],
180357f1050SThomas Veerman[AC_REQUIRE([AM_SET_DEPDIR])dnl
181357f1050SThomas VeermanAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
182357f1050SThomas VeermanAC_REQUIRE([AM_MAKE_INCLUDE])dnl
183357f1050SThomas VeermanAC_REQUIRE([AM_DEP_TRACK])dnl
184357f1050SThomas Veerman
185357f1050SThomas Veermanifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
186357f1050SThomas Veerman       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
187357f1050SThomas Veerman       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
18884d9c625SLionel Sambuc       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
189357f1050SThomas Veerman       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
190357f1050SThomas Veerman                   [depcc="$$1"   am_compiler_list=])
191357f1050SThomas Veerman
192357f1050SThomas VeermanAC_CACHE_CHECK([dependency style of $depcc],
193357f1050SThomas Veerman               [am_cv_$1_dependencies_compiler_type],
194357f1050SThomas Veerman[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
195357f1050SThomas Veerman  # We make a subdir and do the tests there.  Otherwise we can end up
196357f1050SThomas Veerman  # making bogus files that we don't know about and never remove.  For
197357f1050SThomas Veerman  # instance it was reported that on HP-UX the gcc test will end up
198357f1050SThomas Veerman  # making a dummy file named `D' -- because `-MD' means `put the output
199357f1050SThomas Veerman  # in D'.
200*0a6a1f1dSLionel Sambuc  rm -rf conftest.dir
201357f1050SThomas Veerman  mkdir conftest.dir
202357f1050SThomas Veerman  # Copy depcomp to subdir because otherwise we won't find it if we're
203357f1050SThomas Veerman  # using a relative directory.
204357f1050SThomas Veerman  cp "$am_depcomp" conftest.dir
205357f1050SThomas Veerman  cd conftest.dir
206357f1050SThomas Veerman  # We will build objects and dependencies in a subdirectory because
207357f1050SThomas Veerman  # it helps to detect inapplicable dependency modes.  For instance
208357f1050SThomas Veerman  # both Tru64's cc and ICC support -MD to output dependencies as a
209357f1050SThomas Veerman  # side effect of compilation, but ICC will put the dependencies in
210357f1050SThomas Veerman  # the current directory while Tru64 will put them in the object
211357f1050SThomas Veerman  # directory.
212357f1050SThomas Veerman  mkdir sub
213357f1050SThomas Veerman
214357f1050SThomas Veerman  am_cv_$1_dependencies_compiler_type=none
215357f1050SThomas Veerman  if test "$am_compiler_list" = ""; then
216357f1050SThomas Veerman     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
217357f1050SThomas Veerman  fi
21884d9c625SLionel Sambuc  am__universal=false
21984d9c625SLionel Sambuc  m4_case([$1], [CC],
22084d9c625SLionel Sambuc    [case " $depcc " in #(
22184d9c625SLionel Sambuc     *\ -arch\ *\ -arch\ *) am__universal=true ;;
22284d9c625SLionel Sambuc     esac],
22384d9c625SLionel Sambuc    [CXX],
22484d9c625SLionel Sambuc    [case " $depcc " in #(
22584d9c625SLionel Sambuc     *\ -arch\ *\ -arch\ *) am__universal=true ;;
22684d9c625SLionel Sambuc     esac])
22784d9c625SLionel Sambuc
228357f1050SThomas Veerman  for depmode in $am_compiler_list; do
229357f1050SThomas Veerman    # Setup a source with many dependencies, because some compilers
230357f1050SThomas Veerman    # like to wrap large dependency lists on column 80 (with \), and
231357f1050SThomas Veerman    # we should not choose a depcomp mode which is confused by this.
232357f1050SThomas Veerman    #
233357f1050SThomas Veerman    # We need to recreate these files for each test, as the compiler may
234357f1050SThomas Veerman    # overwrite some of them when testing with obscure command lines.
235357f1050SThomas Veerman    # This happens at least with the AIX C compiler.
236357f1050SThomas Veerman    : > sub/conftest.c
237357f1050SThomas Veerman    for i in 1 2 3 4 5 6; do
238357f1050SThomas Veerman      echo '#include "conftst'$i'.h"' >> sub/conftest.c
239357f1050SThomas Veerman      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
240357f1050SThomas Veerman      # Solaris 8's {/usr,}/bin/sh.
241357f1050SThomas Veerman      touch sub/conftst$i.h
242357f1050SThomas Veerman    done
243357f1050SThomas Veerman    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
244357f1050SThomas Veerman
24584d9c625SLionel Sambuc    # We check with `-c' and `-o' for the sake of the "dashmstdout"
24684d9c625SLionel Sambuc    # mode.  It turns out that the SunPro C++ compiler does not properly
24784d9c625SLionel Sambuc    # handle `-M -o', and we need to detect this.  Also, some Intel
24884d9c625SLionel Sambuc    # versions had trouble with output in subdirs
24984d9c625SLionel Sambuc    am__obj=sub/conftest.${OBJEXT-o}
25084d9c625SLionel Sambuc    am__minus_obj="-o $am__obj"
251357f1050SThomas Veerman    case $depmode in
25284d9c625SLionel Sambuc    gcc)
25384d9c625SLionel Sambuc      # This depmode causes a compiler race in universal mode.
25484d9c625SLionel Sambuc      test "$am__universal" = false || continue
25584d9c625SLionel Sambuc      ;;
256357f1050SThomas Veerman    nosideeffect)
257357f1050SThomas Veerman      # after this tag, mechanisms are not by side-effect, so they'll
258357f1050SThomas Veerman      # only be used when explicitly requested
259357f1050SThomas Veerman      if test "x$enable_dependency_tracking" = xyes; then
260357f1050SThomas Veerman	continue
261357f1050SThomas Veerman      else
262357f1050SThomas Veerman	break
263357f1050SThomas Veerman      fi
264357f1050SThomas Veerman      ;;
265*0a6a1f1dSLionel Sambuc    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
26684d9c625SLionel Sambuc      # This compiler won't grok `-c -o', but also, the minuso test has
26784d9c625SLionel Sambuc      # not run yet.  These depmodes are late enough in the game, and
26884d9c625SLionel Sambuc      # so weak that their functioning should not be impacted.
26984d9c625SLionel Sambuc      am__obj=conftest.${OBJEXT-o}
27084d9c625SLionel Sambuc      am__minus_obj=
27184d9c625SLionel Sambuc      ;;
272357f1050SThomas Veerman    none) break ;;
273357f1050SThomas Veerman    esac
274357f1050SThomas Veerman    if depmode=$depmode \
27584d9c625SLionel Sambuc       source=sub/conftest.c object=$am__obj \
276357f1050SThomas Veerman       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27784d9c625SLionel Sambuc       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
278357f1050SThomas Veerman         >/dev/null 2>conftest.err &&
27984d9c625SLionel Sambuc       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
280357f1050SThomas Veerman       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
28184d9c625SLionel Sambuc       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
282357f1050SThomas Veerman       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
283357f1050SThomas Veerman      # icc doesn't choke on unknown options, it will just issue warnings
284357f1050SThomas Veerman      # or remarks (even with -Werror).  So we grep stderr for any message
285357f1050SThomas Veerman      # that says an option was ignored or not supported.
286357f1050SThomas Veerman      # When given -MP, icc 7.0 and 7.1 complain thusly:
287357f1050SThomas Veerman      #   icc: Command line warning: ignoring option '-M'; no argument required
288357f1050SThomas Veerman      # The diagnosis changed in icc 8.0:
289357f1050SThomas Veerman      #   icc: Command line remark: option '-MP' not supported
290357f1050SThomas Veerman      if (grep 'ignoring option' conftest.err ||
291357f1050SThomas Veerman          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
292357f1050SThomas Veerman        am_cv_$1_dependencies_compiler_type=$depmode
293357f1050SThomas Veerman        break
294357f1050SThomas Veerman      fi
295357f1050SThomas Veerman    fi
296357f1050SThomas Veerman  done
297357f1050SThomas Veerman
298357f1050SThomas Veerman  cd ..
299357f1050SThomas Veerman  rm -rf conftest.dir
300357f1050SThomas Veermanelse
301357f1050SThomas Veerman  am_cv_$1_dependencies_compiler_type=none
302357f1050SThomas Veermanfi
303357f1050SThomas Veerman])
304357f1050SThomas VeermanAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
305357f1050SThomas VeermanAM_CONDITIONAL([am__fastdep$1], [
306357f1050SThomas Veerman  test "x$enable_dependency_tracking" != xno \
307357f1050SThomas Veerman  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
308357f1050SThomas Veerman])
309357f1050SThomas Veerman
310357f1050SThomas Veerman
311357f1050SThomas Veerman# AM_SET_DEPDIR
312357f1050SThomas Veerman# -------------
313357f1050SThomas Veerman# Choose a directory name for dependency files.
314357f1050SThomas Veerman# This macro is AC_REQUIREd in _AM_DEPENDENCIES
315357f1050SThomas VeermanAC_DEFUN([AM_SET_DEPDIR],
316357f1050SThomas Veerman[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
317357f1050SThomas VeermanAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
318357f1050SThomas Veerman])
319357f1050SThomas Veerman
320357f1050SThomas Veerman
321357f1050SThomas Veerman# AM_DEP_TRACK
322357f1050SThomas Veerman# ------------
323357f1050SThomas VeermanAC_DEFUN([AM_DEP_TRACK],
324357f1050SThomas Veerman[AC_ARG_ENABLE(dependency-tracking,
325357f1050SThomas Veerman[  --disable-dependency-tracking  speeds up one-time build
326357f1050SThomas Veerman  --enable-dependency-tracking   do not reject slow dependency extractors])
327357f1050SThomas Veermanif test "x$enable_dependency_tracking" != xno; then
328357f1050SThomas Veerman  am_depcomp="$ac_aux_dir/depcomp"
329357f1050SThomas Veerman  AMDEPBACKSLASH='\'
330*0a6a1f1dSLionel Sambuc  am__nodep='_no'
331357f1050SThomas Veermanfi
332357f1050SThomas VeermanAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
33384d9c625SLionel SambucAC_SUBST([AMDEPBACKSLASH])dnl
33484d9c625SLionel Sambuc_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
335*0a6a1f1dSLionel SambucAC_SUBST([am__nodep])dnl
336*0a6a1f1dSLionel Sambuc_AM_SUBST_NOTMAKE([am__nodep])dnl
337357f1050SThomas Veerman])
338357f1050SThomas Veerman
339357f1050SThomas Veerman# Generate code to set up dependency tracking.              -*- Autoconf -*-
340357f1050SThomas Veerman
34184d9c625SLionel Sambuc# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
342357f1050SThomas Veerman# Free Software Foundation, Inc.
343357f1050SThomas Veerman#
344357f1050SThomas Veerman# This file is free software; the Free Software Foundation
345357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
346357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
347357f1050SThomas Veerman
34884d9c625SLionel Sambuc#serial 5
349357f1050SThomas Veerman
350357f1050SThomas Veerman# _AM_OUTPUT_DEPENDENCY_COMMANDS
351357f1050SThomas Veerman# ------------------------------
352357f1050SThomas VeermanAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
35384d9c625SLionel Sambuc[{
35484d9c625SLionel Sambuc  # Autoconf 2.62 quotes --file arguments for eval, but not when files
35584d9c625SLionel Sambuc  # are listed without --file.  Let's play safe and only enable the eval
35684d9c625SLionel Sambuc  # if we detect the quoting.
35784d9c625SLionel Sambuc  case $CONFIG_FILES in
35884d9c625SLionel Sambuc  *\'*) eval set x "$CONFIG_FILES" ;;
35984d9c625SLionel Sambuc  *)   set x $CONFIG_FILES ;;
36084d9c625SLionel Sambuc  esac
36184d9c625SLionel Sambuc  shift
36284d9c625SLionel Sambuc  for mf
36384d9c625SLionel Sambuc  do
364357f1050SThomas Veerman    # Strip MF so we end up with the name of the file.
365357f1050SThomas Veerman    mf=`echo "$mf" | sed -e 's/:.*$//'`
366357f1050SThomas Veerman    # Check whether this is an Automake generated Makefile or not.
367357f1050SThomas Veerman    # We used to match only the files named `Makefile.in', but
368357f1050SThomas Veerman    # some people rename them; so instead we look at the file content.
369357f1050SThomas Veerman    # Grep'ing the first line is not enough: some people post-process
370357f1050SThomas Veerman    # each Makefile.in and add a new line on top of each file to say so.
37184d9c625SLionel Sambuc    # Grep'ing the whole file is not good either: AIX grep has a line
37284d9c625SLionel Sambuc    # limit of 2048, but all sed's we know have understand at least 4000.
37384d9c625SLionel Sambuc    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
374357f1050SThomas Veerman      dirpart=`AS_DIRNAME("$mf")`
375357f1050SThomas Veerman    else
376357f1050SThomas Veerman      continue
377357f1050SThomas Veerman    fi
378357f1050SThomas Veerman    # Extract the definition of DEPDIR, am__include, and am__quote
379357f1050SThomas Veerman    # from the Makefile without running `make'.
380357f1050SThomas Veerman    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
381357f1050SThomas Veerman    test -z "$DEPDIR" && continue
382357f1050SThomas Veerman    am__include=`sed -n 's/^am__include = //p' < "$mf"`
383357f1050SThomas Veerman    test -z "am__include" && continue
384357f1050SThomas Veerman    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
385357f1050SThomas Veerman    # When using ansi2knr, U may be empty or an underscore; expand it
386357f1050SThomas Veerman    U=`sed -n 's/^U = //p' < "$mf"`
387357f1050SThomas Veerman    # Find all dependency output files, they are included files with
388357f1050SThomas Veerman    # $(DEPDIR) in their names.  We invoke sed twice because it is the
389357f1050SThomas Veerman    # simplest approach to changing $(DEPDIR) to its actual value in the
390357f1050SThomas Veerman    # expansion.
391357f1050SThomas Veerman    for file in `sed -n "
392357f1050SThomas Veerman      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
393357f1050SThomas Veerman	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
394357f1050SThomas Veerman      # Make sure the directory exists.
395357f1050SThomas Veerman      test -f "$dirpart/$file" && continue
396357f1050SThomas Veerman      fdir=`AS_DIRNAME(["$file"])`
397357f1050SThomas Veerman      AS_MKDIR_P([$dirpart/$fdir])
398357f1050SThomas Veerman      # echo "creating $dirpart/$file"
399357f1050SThomas Veerman      echo '# dummy' > "$dirpart/$file"
400357f1050SThomas Veerman    done
401357f1050SThomas Veerman  done
40284d9c625SLionel Sambuc}
403357f1050SThomas Veerman])# _AM_OUTPUT_DEPENDENCY_COMMANDS
404357f1050SThomas Veerman
405357f1050SThomas Veerman
406357f1050SThomas Veerman# AM_OUTPUT_DEPENDENCY_COMMANDS
407357f1050SThomas Veerman# -----------------------------
408357f1050SThomas Veerman# This macro should only be invoked once -- use via AC_REQUIRE.
409357f1050SThomas Veerman#
410357f1050SThomas Veerman# This code is only required when automatic dependency tracking
411357f1050SThomas Veerman# is enabled.  FIXME.  This creates each `.P' file that we will
412357f1050SThomas Veerman# need in order to bootstrap the dependency handling code.
413357f1050SThomas VeermanAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
414357f1050SThomas Veerman[AC_CONFIG_COMMANDS([depfiles],
415357f1050SThomas Veerman     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
416357f1050SThomas Veerman     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
417357f1050SThomas Veerman])
418357f1050SThomas Veerman
419357f1050SThomas Veerman# Do all the work for Automake.                             -*- Autoconf -*-
420357f1050SThomas Veerman
42184d9c625SLionel Sambuc# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
42284d9c625SLionel Sambuc# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
423357f1050SThomas Veerman#
424357f1050SThomas Veerman# This file is free software; the Free Software Foundation
425357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
426357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
427357f1050SThomas Veerman
42884d9c625SLionel Sambuc# serial 16
429357f1050SThomas Veerman
430357f1050SThomas Veerman# This macro actually does too much.  Some checks are only needed if
431357f1050SThomas Veerman# your package does certain things.  But this isn't really a big deal.
432357f1050SThomas Veerman
433357f1050SThomas Veerman# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
434357f1050SThomas Veerman# AM_INIT_AUTOMAKE([OPTIONS])
435357f1050SThomas Veerman# -----------------------------------------------
436357f1050SThomas Veerman# The call with PACKAGE and VERSION arguments is the old style
437357f1050SThomas Veerman# call (pre autoconf-2.50), which is being phased out.  PACKAGE
438357f1050SThomas Veerman# and VERSION should now be passed to AC_INIT and removed from
439357f1050SThomas Veerman# the call to AM_INIT_AUTOMAKE.
440357f1050SThomas Veerman# We support both call styles for the transition.  After
441357f1050SThomas Veerman# the next Automake release, Autoconf can make the AC_INIT
442357f1050SThomas Veerman# arguments mandatory, and then we can depend on a new Autoconf
443357f1050SThomas Veerman# release and drop the old call support.
444357f1050SThomas VeermanAC_DEFUN([AM_INIT_AUTOMAKE],
44584d9c625SLionel Sambuc[AC_PREREQ([2.62])dnl
446357f1050SThomas Veermandnl Autoconf wants to disallow AM_ names.  We explicitly allow
447357f1050SThomas Veermandnl the ones we care about.
448357f1050SThomas Veermanm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
449357f1050SThomas VeermanAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
450357f1050SThomas VeermanAC_REQUIRE([AC_PROG_INSTALL])dnl
45184d9c625SLionel Sambucif test "`cd $srcdir && pwd`" != "`pwd`"; then
45284d9c625SLionel Sambuc  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
45384d9c625SLionel Sambuc  # is not polluted with repeated "-I."
45484d9c625SLionel Sambuc  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
455357f1050SThomas Veerman  # test to see if srcdir already configured
45684d9c625SLionel Sambuc  if test -f $srcdir/config.status; then
457357f1050SThomas Veerman    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
458357f1050SThomas Veerman  fi
45984d9c625SLionel Sambucfi
460357f1050SThomas Veerman
461357f1050SThomas Veerman# test whether we have cygpath
462357f1050SThomas Veermanif test -z "$CYGPATH_W"; then
463357f1050SThomas Veerman  if (cygpath --version) >/dev/null 2>/dev/null; then
464357f1050SThomas Veerman    CYGPATH_W='cygpath -w'
465357f1050SThomas Veerman  else
466357f1050SThomas Veerman    CYGPATH_W=echo
467357f1050SThomas Veerman  fi
468357f1050SThomas Veermanfi
469357f1050SThomas VeermanAC_SUBST([CYGPATH_W])
470357f1050SThomas Veerman
471357f1050SThomas Veerman# Define the identity of the package.
472357f1050SThomas Veermandnl Distinguish between old-style and new-style calls.
473357f1050SThomas Veermanm4_ifval([$2],
474357f1050SThomas Veerman[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
475357f1050SThomas Veerman AC_SUBST([PACKAGE], [$1])dnl
476357f1050SThomas Veerman AC_SUBST([VERSION], [$2])],
477357f1050SThomas Veerman[_AM_SET_OPTIONS([$1])dnl
47884d9c625SLionel Sambucdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
47984d9c625SLionel Sambucm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
48084d9c625SLionel Sambuc  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
481357f1050SThomas Veerman AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
482357f1050SThomas Veerman AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
483357f1050SThomas Veerman
484357f1050SThomas Veerman_AM_IF_OPTION([no-define],,
485357f1050SThomas Veerman[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
486357f1050SThomas Veerman AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
487357f1050SThomas Veerman
488357f1050SThomas Veerman# Some tools Automake needs.
489357f1050SThomas VeermanAC_REQUIRE([AM_SANITY_CHECK])dnl
490357f1050SThomas VeermanAC_REQUIRE([AC_ARG_PROGRAM])dnl
491357f1050SThomas VeermanAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
492357f1050SThomas VeermanAM_MISSING_PROG(AUTOCONF, autoconf)
493357f1050SThomas VeermanAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
494357f1050SThomas VeermanAM_MISSING_PROG(AUTOHEADER, autoheader)
495357f1050SThomas VeermanAM_MISSING_PROG(MAKEINFO, makeinfo)
49684d9c625SLionel SambucAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
49784d9c625SLionel SambucAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
498357f1050SThomas VeermanAC_REQUIRE([AM_PROG_MKDIR_P])dnl
499357f1050SThomas Veerman# We need awk for the "check" target.  The system "awk" is bad on
500357f1050SThomas Veerman# some platforms.
501357f1050SThomas VeermanAC_REQUIRE([AC_PROG_AWK])dnl
502357f1050SThomas VeermanAC_REQUIRE([AC_PROG_MAKE_SET])dnl
503357f1050SThomas VeermanAC_REQUIRE([AM_SET_LEADING_DOT])dnl
504357f1050SThomas Veerman_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
505357f1050SThomas Veerman	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
506357f1050SThomas Veerman			     [_AM_PROG_TAR([v7])])])
507357f1050SThomas Veerman_AM_IF_OPTION([no-dependencies],,
508357f1050SThomas Veerman[AC_PROVIDE_IFELSE([AC_PROG_CC],
509357f1050SThomas Veerman		  [_AM_DEPENDENCIES(CC)],
510357f1050SThomas Veerman		  [define([AC_PROG_CC],
511357f1050SThomas Veerman			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
512357f1050SThomas VeermanAC_PROVIDE_IFELSE([AC_PROG_CXX],
513357f1050SThomas Veerman		  [_AM_DEPENDENCIES(CXX)],
514357f1050SThomas Veerman		  [define([AC_PROG_CXX],
515357f1050SThomas Veerman			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
51684d9c625SLionel SambucAC_PROVIDE_IFELSE([AC_PROG_OBJC],
51784d9c625SLionel Sambuc		  [_AM_DEPENDENCIES(OBJC)],
51884d9c625SLionel Sambuc		  [define([AC_PROG_OBJC],
51984d9c625SLionel Sambuc			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
520357f1050SThomas Veerman])
52184d9c625SLionel Sambuc_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
52284d9c625SLionel Sambucdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
52384d9c625SLionel Sambucdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
52484d9c625SLionel Sambucdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
52584d9c625SLionel SambucAC_CONFIG_COMMANDS_PRE(dnl
52684d9c625SLionel Sambuc[m4_provide_if([_AM_COMPILER_EXEEXT],
52784d9c625SLionel Sambuc  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
528357f1050SThomas Veerman])
529357f1050SThomas Veerman
53084d9c625SLionel Sambucdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
53184d9c625SLionel Sambucdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
53284d9c625SLionel Sambucdnl mangled by Autoconf and run in a shell conditional statement.
53384d9c625SLionel Sambucm4_define([_AC_COMPILER_EXEEXT],
53484d9c625SLionel Sambucm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
53584d9c625SLionel Sambuc
536357f1050SThomas Veerman
537357f1050SThomas Veerman# When config.status generates a header, we must update the stamp-h file.
538357f1050SThomas Veerman# This file resides in the same directory as the config header
539357f1050SThomas Veerman# that is generated.  The stamp files are numbered to have different names.
540357f1050SThomas Veerman
541357f1050SThomas Veerman# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
542357f1050SThomas Veerman# loop where config.status creates the headers, so we can generate
543357f1050SThomas Veerman# our stamp files there.
544357f1050SThomas VeermanAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
545357f1050SThomas Veerman[# Compute $1's index in $config_headers.
54684d9c625SLionel Sambuc_am_arg=$1
547357f1050SThomas Veerman_am_stamp_count=1
548357f1050SThomas Veermanfor _am_header in $config_headers :; do
549357f1050SThomas Veerman  case $_am_header in
55084d9c625SLionel Sambuc    $_am_arg | $_am_arg:* )
551357f1050SThomas Veerman      break ;;
552357f1050SThomas Veerman    * )
553357f1050SThomas Veerman      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
554357f1050SThomas Veerman  esac
555357f1050SThomas Veermandone
55684d9c625SLionel Sambucecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
557357f1050SThomas Veerman
558*0a6a1f1dSLionel Sambuc# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
559*0a6a1f1dSLionel Sambuc# Inc.
560357f1050SThomas Veerman#
561357f1050SThomas Veerman# This file is free software; the Free Software Foundation
562357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
563357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
564357f1050SThomas Veerman
565*0a6a1f1dSLionel Sambuc# serial 1
566*0a6a1f1dSLionel Sambuc
567357f1050SThomas Veerman# AM_PROG_INSTALL_SH
568357f1050SThomas Veerman# ------------------
569357f1050SThomas Veerman# Define $install_sh.
570357f1050SThomas VeermanAC_DEFUN([AM_PROG_INSTALL_SH],
571357f1050SThomas Veerman[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
57284d9c625SLionel Sambucif test x"${install_sh}" != xset; then
57384d9c625SLionel Sambuc  case $am_aux_dir in
57484d9c625SLionel Sambuc  *\ * | *\	*)
57584d9c625SLionel Sambuc    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
57684d9c625SLionel Sambuc  *)
57784d9c625SLionel Sambuc    install_sh="\${SHELL} $am_aux_dir/install-sh"
57884d9c625SLionel Sambuc  esac
57984d9c625SLionel Sambucfi
580357f1050SThomas VeermanAC_SUBST(install_sh)])
581357f1050SThomas Veerman
582357f1050SThomas Veerman# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
583357f1050SThomas Veerman#
584357f1050SThomas Veerman# This file is free software; the Free Software Foundation
585357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
586357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
587357f1050SThomas Veerman
588357f1050SThomas Veerman# serial 2
589357f1050SThomas Veerman
590357f1050SThomas Veerman# Check whether the underlying file-system supports filenames
591357f1050SThomas Veerman# with a leading dot.  For instance MS-DOS doesn't.
592357f1050SThomas VeermanAC_DEFUN([AM_SET_LEADING_DOT],
593357f1050SThomas Veerman[rm -rf .tst 2>/dev/null
594357f1050SThomas Veermanmkdir .tst 2>/dev/null
595357f1050SThomas Veermanif test -d .tst; then
596357f1050SThomas Veerman  am__leading_dot=.
597357f1050SThomas Veermanelse
598357f1050SThomas Veerman  am__leading_dot=_
599357f1050SThomas Veermanfi
600357f1050SThomas Veermanrmdir .tst 2>/dev/null
601357f1050SThomas VeermanAC_SUBST([am__leading_dot])])
602357f1050SThomas Veerman
603357f1050SThomas Veerman# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
604357f1050SThomas Veerman# Free Software Foundation, Inc.
605357f1050SThomas Veerman#
606357f1050SThomas Veerman# This file is free software; the Free Software Foundation
607357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
608357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
609357f1050SThomas Veerman
610357f1050SThomas Veerman# serial 5
611357f1050SThomas Veerman
612357f1050SThomas Veerman# AM_PROG_LEX
613357f1050SThomas Veerman# -----------
614357f1050SThomas Veerman# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
615357f1050SThomas Veerman# "missing" invocation, for better error output.
616357f1050SThomas VeermanAC_DEFUN([AM_PROG_LEX],
617357f1050SThomas Veerman[AC_PREREQ(2.50)dnl
618357f1050SThomas VeermanAC_REQUIRE([AM_MISSING_HAS_RUN])dnl
619357f1050SThomas VeermanAC_REQUIRE([AC_PROG_LEX])dnl
620357f1050SThomas Veermanif test "$LEX" = :; then
621357f1050SThomas Veerman  LEX=${am_missing_run}flex
622357f1050SThomas Veermanfi])
623357f1050SThomas Veerman
624357f1050SThomas Veerman# Check to see how 'make' treats includes.	            -*- Autoconf -*-
625357f1050SThomas Veerman
62684d9c625SLionel Sambuc# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
627357f1050SThomas Veerman#
628357f1050SThomas Veerman# This file is free software; the Free Software Foundation
629357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
630357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
631357f1050SThomas Veerman
63284d9c625SLionel Sambuc# serial 4
633357f1050SThomas Veerman
634357f1050SThomas Veerman# AM_MAKE_INCLUDE()
635357f1050SThomas Veerman# -----------------
636357f1050SThomas Veerman# Check to see how make treats includes.
637357f1050SThomas VeermanAC_DEFUN([AM_MAKE_INCLUDE],
638357f1050SThomas Veerman[am_make=${MAKE-make}
639357f1050SThomas Veermancat > confinc << 'END'
640357f1050SThomas Veermanam__doit:
64184d9c625SLionel Sambuc	@echo this is the am__doit target
642357f1050SThomas Veerman.PHONY: am__doit
643357f1050SThomas VeermanEND
644357f1050SThomas Veerman# If we don't find an include directive, just comment out the code.
645357f1050SThomas VeermanAC_MSG_CHECKING([for style of include used by $am_make])
646357f1050SThomas Veermanam__include="#"
647357f1050SThomas Veermanam__quote=
648357f1050SThomas Veerman_am_result=none
649357f1050SThomas Veerman# First try GNU make style include.
650357f1050SThomas Veermanecho "include confinc" > confmf
65184d9c625SLionel Sambuc# Ignore all kinds of additional output from `make'.
65284d9c625SLionel Sambuccase `$am_make -s -f confmf 2> /dev/null` in #(
65384d9c625SLionel Sambuc*the\ am__doit\ target*)
654357f1050SThomas Veerman  am__include=include
655357f1050SThomas Veerman  am__quote=
656357f1050SThomas Veerman  _am_result=GNU
65784d9c625SLionel Sambuc  ;;
65884d9c625SLionel Sambucesac
659357f1050SThomas Veerman# Now try BSD make style include.
660357f1050SThomas Veermanif test "$am__include" = "#"; then
661357f1050SThomas Veerman   echo '.include "confinc"' > confmf
66284d9c625SLionel Sambuc   case `$am_make -s -f confmf 2> /dev/null` in #(
66384d9c625SLionel Sambuc   *the\ am__doit\ target*)
664357f1050SThomas Veerman     am__include=.include
665357f1050SThomas Veerman     am__quote="\""
666357f1050SThomas Veerman     _am_result=BSD
66784d9c625SLionel Sambuc     ;;
66884d9c625SLionel Sambuc   esac
669357f1050SThomas Veermanfi
670357f1050SThomas VeermanAC_SUBST([am__include])
671357f1050SThomas VeermanAC_SUBST([am__quote])
672357f1050SThomas VeermanAC_MSG_RESULT([$_am_result])
673357f1050SThomas Veermanrm -f confinc confmf
674357f1050SThomas Veerman])
675357f1050SThomas Veerman
67684d9c625SLionel Sambuc# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
677357f1050SThomas Veerman# Free Software Foundation, Inc.
678357f1050SThomas Veerman#
679357f1050SThomas Veerman# This file is free software; the Free Software Foundation
680357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
681357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
682357f1050SThomas Veerman
68384d9c625SLionel Sambuc# serial 6
68484d9c625SLionel Sambuc
68584d9c625SLionel Sambuc# AM_PROG_CC_C_O
68684d9c625SLionel Sambuc# --------------
68784d9c625SLionel Sambuc# Like AC_PROG_CC_C_O, but changed for automake.
68884d9c625SLionel SambucAC_DEFUN([AM_PROG_CC_C_O],
68984d9c625SLionel Sambuc[AC_REQUIRE([AC_PROG_CC_C_O])dnl
69084d9c625SLionel SambucAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
69184d9c625SLionel SambucAC_REQUIRE_AUX_FILE([compile])dnl
69284d9c625SLionel Sambuc# FIXME: we rely on the cache variable name because
69384d9c625SLionel Sambuc# there is no other way.
69484d9c625SLionel Sambucset dummy $CC
69584d9c625SLionel Sambucam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
69684d9c625SLionel Sambuceval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
69784d9c625SLionel Sambucif test "$am_t" != yes; then
69884d9c625SLionel Sambuc   # Losing compiler, so override with the script.
69984d9c625SLionel Sambuc   # FIXME: It is wrong to rewrite CC.
70084d9c625SLionel Sambuc   # But if we don't then we get into trouble of one sort or another.
70184d9c625SLionel Sambuc   # A longer-term fix would be to have automake use am__CC in this case,
70284d9c625SLionel Sambuc   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
70384d9c625SLionel Sambuc   CC="$am_aux_dir/compile $CC"
70484d9c625SLionel Sambucfi
70584d9c625SLionel Sambucdnl Make sure AC_PROG_CC is never called again, or it will override our
70684d9c625SLionel Sambucdnl setting of CC.
70784d9c625SLionel Sambucm4_define([AC_PROG_CC],
70884d9c625SLionel Sambuc          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
70984d9c625SLionel Sambuc])
71084d9c625SLionel Sambuc
71184d9c625SLionel Sambuc# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
71284d9c625SLionel Sambuc
71384d9c625SLionel Sambuc# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
71484d9c625SLionel Sambuc# Free Software Foundation, Inc.
71584d9c625SLionel Sambuc#
71684d9c625SLionel Sambuc# This file is free software; the Free Software Foundation
71784d9c625SLionel Sambuc# gives unlimited permission to copy and/or distribute it,
71884d9c625SLionel Sambuc# with or without modifications, as long as this notice is preserved.
71984d9c625SLionel Sambuc
72084d9c625SLionel Sambuc# serial 6
721357f1050SThomas Veerman
722357f1050SThomas Veerman# AM_MISSING_PROG(NAME, PROGRAM)
723357f1050SThomas Veerman# ------------------------------
724357f1050SThomas VeermanAC_DEFUN([AM_MISSING_PROG],
725357f1050SThomas Veerman[AC_REQUIRE([AM_MISSING_HAS_RUN])
726357f1050SThomas Veerman$1=${$1-"${am_missing_run}$2"}
727357f1050SThomas VeermanAC_SUBST($1)])
728357f1050SThomas Veerman
729357f1050SThomas Veerman
730357f1050SThomas Veerman# AM_MISSING_HAS_RUN
731357f1050SThomas Veerman# ------------------
732357f1050SThomas Veerman# Define MISSING if not defined so far and test if it supports --run.
733357f1050SThomas Veerman# If it does, set am_missing_run to use it, otherwise, to nothing.
734357f1050SThomas VeermanAC_DEFUN([AM_MISSING_HAS_RUN],
735357f1050SThomas Veerman[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
73684d9c625SLionel SambucAC_REQUIRE_AUX_FILE([missing])dnl
73784d9c625SLionel Sambucif test x"${MISSING+set}" != xset; then
73884d9c625SLionel Sambuc  case $am_aux_dir in
73984d9c625SLionel Sambuc  *\ * | *\	*)
74084d9c625SLionel Sambuc    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
74184d9c625SLionel Sambuc  *)
74284d9c625SLionel Sambuc    MISSING="\${SHELL} $am_aux_dir/missing" ;;
74384d9c625SLionel Sambuc  esac
74484d9c625SLionel Sambucfi
745357f1050SThomas Veerman# Use eval to expand $SHELL
746357f1050SThomas Veermanif eval "$MISSING --run true"; then
747357f1050SThomas Veerman  am_missing_run="$MISSING --run "
748357f1050SThomas Veermanelse
749357f1050SThomas Veerman  am_missing_run=
750357f1050SThomas Veerman  AC_MSG_WARN([`missing' script is too old or missing])
751357f1050SThomas Veermanfi
752357f1050SThomas Veerman])
753357f1050SThomas Veerman
754*0a6a1f1dSLionel Sambuc# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
755*0a6a1f1dSLionel Sambuc# Inc.
756357f1050SThomas Veerman#
757357f1050SThomas Veerman# This file is free software; the Free Software Foundation
758357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
759357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
760357f1050SThomas Veerman
761*0a6a1f1dSLionel Sambuc# serial 1
762*0a6a1f1dSLionel Sambuc
763357f1050SThomas Veerman# AM_PROG_MKDIR_P
764357f1050SThomas Veerman# ---------------
76584d9c625SLionel Sambuc# Check for `mkdir -p'.
766357f1050SThomas VeermanAC_DEFUN([AM_PROG_MKDIR_P],
76784d9c625SLionel Sambuc[AC_PREREQ([2.60])dnl
76884d9c625SLionel SambucAC_REQUIRE([AC_PROG_MKDIR_P])dnl
76984d9c625SLionel Sambucdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
77084d9c625SLionel Sambucdnl while keeping a definition of mkdir_p for backward compatibility.
77184d9c625SLionel Sambucdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
77284d9c625SLionel Sambucdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
77384d9c625SLionel Sambucdnl Makefile.ins that do not define MKDIR_P, so we do our own
77484d9c625SLionel Sambucdnl adjustment using top_builddir (which is defined more often than
77584d9c625SLionel Sambucdnl MKDIR_P).
77684d9c625SLionel SambucAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
77784d9c625SLionel Sambuccase $mkdir_p in
77884d9c625SLionel Sambuc  [[\\/$]]* | ?:[[\\/]]*) ;;
77984d9c625SLionel Sambuc  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
78084d9c625SLionel Sambucesac
78184d9c625SLionel Sambuc])
782357f1050SThomas Veerman
783357f1050SThomas Veerman# Helper functions for option handling.                     -*- Autoconf -*-
784357f1050SThomas Veerman
785*0a6a1f1dSLionel Sambuc# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
786*0a6a1f1dSLionel Sambuc# Foundation, Inc.
787357f1050SThomas Veerman#
788357f1050SThomas Veerman# This file is free software; the Free Software Foundation
789357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
790357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
791357f1050SThomas Veerman
792*0a6a1f1dSLionel Sambuc# serial 5
793357f1050SThomas Veerman
794357f1050SThomas Veerman# _AM_MANGLE_OPTION(NAME)
795357f1050SThomas Veerman# -----------------------
796357f1050SThomas VeermanAC_DEFUN([_AM_MANGLE_OPTION],
797357f1050SThomas Veerman[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
798357f1050SThomas Veerman
799357f1050SThomas Veerman# _AM_SET_OPTION(NAME)
800*0a6a1f1dSLionel Sambuc# --------------------
801357f1050SThomas Veerman# Set option NAME.  Presently that only means defining a flag for this option.
802357f1050SThomas VeermanAC_DEFUN([_AM_SET_OPTION],
803357f1050SThomas Veerman[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
804357f1050SThomas Veerman
805357f1050SThomas Veerman# _AM_SET_OPTIONS(OPTIONS)
806*0a6a1f1dSLionel Sambuc# ------------------------
807357f1050SThomas Veerman# OPTIONS is a space-separated list of Automake options.
808357f1050SThomas VeermanAC_DEFUN([_AM_SET_OPTIONS],
80984d9c625SLionel Sambuc[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
810357f1050SThomas Veerman
811357f1050SThomas Veerman# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
812357f1050SThomas Veerman# -------------------------------------------
813357f1050SThomas Veerman# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
814357f1050SThomas VeermanAC_DEFUN([_AM_IF_OPTION],
815357f1050SThomas Veerman[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
816357f1050SThomas Veerman
817357f1050SThomas Veerman# Check to make sure that the build environment is sane.    -*- Autoconf -*-
818357f1050SThomas Veerman
81984d9c625SLionel Sambuc# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
820357f1050SThomas Veerman# Free Software Foundation, Inc.
821357f1050SThomas Veerman#
822357f1050SThomas Veerman# This file is free software; the Free Software Foundation
823357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
824357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
825357f1050SThomas Veerman
82684d9c625SLionel Sambuc# serial 5
827357f1050SThomas Veerman
828357f1050SThomas Veerman# AM_SANITY_CHECK
829357f1050SThomas Veerman# ---------------
830357f1050SThomas VeermanAC_DEFUN([AM_SANITY_CHECK],
831357f1050SThomas Veerman[AC_MSG_CHECKING([whether build environment is sane])
832357f1050SThomas Veerman# Just in case
833357f1050SThomas Veermansleep 1
834357f1050SThomas Veermanecho timestamp > conftest.file
83584d9c625SLionel Sambuc# Reject unsafe characters in $srcdir or the absolute working directory
83684d9c625SLionel Sambuc# name.  Accept space and tab only in the latter.
83784d9c625SLionel Sambucam_lf='
83884d9c625SLionel Sambuc'
83984d9c625SLionel Sambuccase `pwd` in
84084d9c625SLionel Sambuc  *[[\\\"\#\$\&\'\`$am_lf]]*)
84184d9c625SLionel Sambuc    AC_MSG_ERROR([unsafe absolute working directory name]);;
84284d9c625SLionel Sambucesac
84384d9c625SLionel Sambuccase $srcdir in
84484d9c625SLionel Sambuc  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
84584d9c625SLionel Sambuc    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
84684d9c625SLionel Sambucesac
84784d9c625SLionel Sambuc
848357f1050SThomas Veerman# Do `set' in a subshell so we don't clobber the current shell's
849357f1050SThomas Veerman# arguments.  Must try -L first in case configure is actually a
850357f1050SThomas Veerman# symlink; some systems play weird games with the mod time of symlinks
851357f1050SThomas Veerman# (eg FreeBSD returns the mod time of the symlink's containing
852357f1050SThomas Veerman# directory).
853357f1050SThomas Veermanif (
85484d9c625SLionel Sambuc   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
855357f1050SThomas Veerman   if test "$[*]" = "X"; then
856357f1050SThomas Veerman      # -L didn't work.
85784d9c625SLionel Sambuc      set X `ls -t "$srcdir/configure" conftest.file`
858357f1050SThomas Veerman   fi
859357f1050SThomas Veerman   rm -f conftest.file
860357f1050SThomas Veerman   if test "$[*]" != "X $srcdir/configure conftest.file" \
861357f1050SThomas Veerman      && test "$[*]" != "X conftest.file $srcdir/configure"; then
862357f1050SThomas Veerman
863357f1050SThomas Veerman      # If neither matched, then we have a broken ls.  This can happen
864357f1050SThomas Veerman      # if, for instance, CONFIG_SHELL is bash and it inherits a
865357f1050SThomas Veerman      # broken ls alias from the environment.  This has actually
866357f1050SThomas Veerman      # happened.  Such a system could not be considered "sane".
867357f1050SThomas Veerman      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
868357f1050SThomas Veermanalias in your environment])
869357f1050SThomas Veerman   fi
870357f1050SThomas Veerman
871357f1050SThomas Veerman   test "$[2]" = conftest.file
872357f1050SThomas Veerman   )
873357f1050SThomas Veermanthen
874357f1050SThomas Veerman   # Ok.
875357f1050SThomas Veerman   :
876357f1050SThomas Veermanelse
877357f1050SThomas Veerman   AC_MSG_ERROR([newly created file is older than distributed files!
878357f1050SThomas VeermanCheck your system clock])
879357f1050SThomas Veermanfi
880357f1050SThomas VeermanAC_MSG_RESULT(yes)])
881357f1050SThomas Veerman
882*0a6a1f1dSLionel Sambuc# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
883357f1050SThomas Veerman#
884357f1050SThomas Veerman# This file is free software; the Free Software Foundation
885357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
886357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
887357f1050SThomas Veerman
888*0a6a1f1dSLionel Sambuc# serial 1
889*0a6a1f1dSLionel Sambuc
890357f1050SThomas Veerman# AM_PROG_INSTALL_STRIP
891357f1050SThomas Veerman# ---------------------
892357f1050SThomas Veerman# One issue with vendor `install' (even GNU) is that you can't
893357f1050SThomas Veerman# specify the program used to strip binaries.  This is especially
894357f1050SThomas Veerman# annoying in cross-compiling environments, where the build's strip
895357f1050SThomas Veerman# is unlikely to handle the host's binaries.
896357f1050SThomas Veerman# Fortunately install-sh will honor a STRIPPROG variable, so we
897357f1050SThomas Veerman# always use install-sh in `make install-strip', and initialize
898357f1050SThomas Veerman# STRIPPROG with the value of the STRIP variable (set by the user).
899357f1050SThomas VeermanAC_DEFUN([AM_PROG_INSTALL_STRIP],
900357f1050SThomas Veerman[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
901357f1050SThomas Veerman# Installed binaries are usually stripped using `strip' when the user
902357f1050SThomas Veerman# run `make install-strip'.  However `strip' might not be the right
903357f1050SThomas Veerman# tool to use in cross-compilation environments, therefore Automake
904357f1050SThomas Veerman# will honor the `STRIP' environment variable to overrule this program.
905357f1050SThomas Veermandnl Don't test for $cross_compiling = yes, because it might be `maybe'.
906357f1050SThomas Veermanif test "$cross_compiling" != no; then
907357f1050SThomas Veerman  AC_CHECK_TOOL([STRIP], [strip], :)
908357f1050SThomas Veermanfi
90984d9c625SLionel SambucINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
910357f1050SThomas VeermanAC_SUBST([INSTALL_STRIP_PROGRAM])])
911357f1050SThomas Veerman
912*0a6a1f1dSLionel Sambuc# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
91384d9c625SLionel Sambuc#
91484d9c625SLionel Sambuc# This file is free software; the Free Software Foundation
91584d9c625SLionel Sambuc# gives unlimited permission to copy and/or distribute it,
91684d9c625SLionel Sambuc# with or without modifications, as long as this notice is preserved.
91784d9c625SLionel Sambuc
918*0a6a1f1dSLionel Sambuc# serial 3
91984d9c625SLionel Sambuc
92084d9c625SLionel Sambuc# _AM_SUBST_NOTMAKE(VARIABLE)
92184d9c625SLionel Sambuc# ---------------------------
92284d9c625SLionel Sambuc# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
92384d9c625SLionel Sambuc# This macro is traced by Automake.
92484d9c625SLionel SambucAC_DEFUN([_AM_SUBST_NOTMAKE])
92584d9c625SLionel Sambuc
92684d9c625SLionel Sambuc# AM_SUBST_NOTMAKE(VARIABLE)
927*0a6a1f1dSLionel Sambuc# --------------------------
92884d9c625SLionel Sambuc# Public sister of _AM_SUBST_NOTMAKE.
92984d9c625SLionel SambucAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
93084d9c625SLionel Sambuc
931357f1050SThomas Veerman# Check how to create a tarball.                            -*- Autoconf -*-
932357f1050SThomas Veerman
933*0a6a1f1dSLionel Sambuc# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
934357f1050SThomas Veerman#
935357f1050SThomas Veerman# This file is free software; the Free Software Foundation
936357f1050SThomas Veerman# gives unlimited permission to copy and/or distribute it,
937357f1050SThomas Veerman# with or without modifications, as long as this notice is preserved.
938357f1050SThomas Veerman
939357f1050SThomas Veerman# serial 2
940357f1050SThomas Veerman
941357f1050SThomas Veerman# _AM_PROG_TAR(FORMAT)
942357f1050SThomas Veerman# --------------------
943357f1050SThomas Veerman# Check how to create a tarball in format FORMAT.
944357f1050SThomas Veerman# FORMAT should be one of `v7', `ustar', or `pax'.
945357f1050SThomas Veerman#
946357f1050SThomas Veerman# Substitute a variable $(am__tar) that is a command
947357f1050SThomas Veerman# writing to stdout a FORMAT-tarball containing the directory
948357f1050SThomas Veerman# $tardir.
949357f1050SThomas Veerman#     tardir=directory && $(am__tar) > result.tar
950357f1050SThomas Veerman#
951357f1050SThomas Veerman# Substitute a variable $(am__untar) that extract such
952357f1050SThomas Veerman# a tarball read from stdin.
953357f1050SThomas Veerman#     $(am__untar) < result.tar
954357f1050SThomas VeermanAC_DEFUN([_AM_PROG_TAR],
955*0a6a1f1dSLionel Sambuc[# Always define AMTAR for backward compatibility.  Yes, it's still used
956*0a6a1f1dSLionel Sambuc# in the wild :-(  We should find a proper way to deprecate it ...
957*0a6a1f1dSLionel SambucAC_SUBST([AMTAR], ['$${TAR-tar}'])
958357f1050SThomas Veermanm4_if([$1], [v7],
959*0a6a1f1dSLionel Sambuc     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
960357f1050SThomas Veerman     [m4_case([$1], [ustar],, [pax],,
961357f1050SThomas Veerman              [m4_fatal([Unknown tar format])])
962357f1050SThomas VeermanAC_MSG_CHECKING([how to create a $1 tar archive])
963357f1050SThomas Veerman# Loop over all known methods to create a tar archive until one works.
964357f1050SThomas Veerman_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
965357f1050SThomas Veerman_am_tools=${am_cv_prog_tar_$1-$_am_tools}
966357f1050SThomas Veerman# Do not fold the above two line into one, because Tru64 sh and
967357f1050SThomas Veerman# Solaris sh will not grok spaces in the rhs of `-'.
968357f1050SThomas Veermanfor _am_tool in $_am_tools
969357f1050SThomas Veermando
970357f1050SThomas Veerman  case $_am_tool in
971357f1050SThomas Veerman  gnutar)
972357f1050SThomas Veerman    for _am_tar in tar gnutar gtar;
973357f1050SThomas Veerman    do
974357f1050SThomas Veerman      AM_RUN_LOG([$_am_tar --version]) && break
975357f1050SThomas Veerman    done
976357f1050SThomas Veerman    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
977357f1050SThomas Veerman    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
978357f1050SThomas Veerman    am__untar="$_am_tar -xf -"
979357f1050SThomas Veerman    ;;
980357f1050SThomas Veerman  plaintar)
981357f1050SThomas Veerman    # Must skip GNU tar: if it does not support --format= it doesn't create
982357f1050SThomas Veerman    # ustar tarball either.
983357f1050SThomas Veerman    (tar --version) >/dev/null 2>&1 && continue
984357f1050SThomas Veerman    am__tar='tar chf - "$$tardir"'
985357f1050SThomas Veerman    am__tar_='tar chf - "$tardir"'
986357f1050SThomas Veerman    am__untar='tar xf -'
987357f1050SThomas Veerman    ;;
988357f1050SThomas Veerman  pax)
989357f1050SThomas Veerman    am__tar='pax -L -x $1 -w "$$tardir"'
990357f1050SThomas Veerman    am__tar_='pax -L -x $1 -w "$tardir"'
991357f1050SThomas Veerman    am__untar='pax -r'
992357f1050SThomas Veerman    ;;
993357f1050SThomas Veerman  cpio)
994357f1050SThomas Veerman    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
995357f1050SThomas Veerman    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
996357f1050SThomas Veerman    am__untar='cpio -i -H $1 -d'
997357f1050SThomas Veerman    ;;
998357f1050SThomas Veerman  none)
999357f1050SThomas Veerman    am__tar=false
1000357f1050SThomas Veerman    am__tar_=false
1001357f1050SThomas Veerman    am__untar=false
1002357f1050SThomas Veerman    ;;
1003357f1050SThomas Veerman  esac
1004357f1050SThomas Veerman
1005357f1050SThomas Veerman  # If the value was cached, stop now.  We just wanted to have am__tar
1006357f1050SThomas Veerman  # and am__untar set.
1007357f1050SThomas Veerman  test -n "${am_cv_prog_tar_$1}" && break
1008357f1050SThomas Veerman
1009357f1050SThomas Veerman  # tar/untar a dummy directory, and stop if the command works
1010357f1050SThomas Veerman  rm -rf conftest.dir
1011357f1050SThomas Veerman  mkdir conftest.dir
1012357f1050SThomas Veerman  echo GrepMe > conftest.dir/file
1013357f1050SThomas Veerman  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1014357f1050SThomas Veerman  rm -rf conftest.dir
1015357f1050SThomas Veerman  if test -s conftest.tar; then
1016357f1050SThomas Veerman    AM_RUN_LOG([$am__untar <conftest.tar])
1017357f1050SThomas Veerman    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1018357f1050SThomas Veerman  fi
1019357f1050SThomas Veermandone
1020357f1050SThomas Veermanrm -rf conftest.dir
1021357f1050SThomas Veerman
1022357f1050SThomas VeermanAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1023357f1050SThomas VeermanAC_MSG_RESULT([$am_cv_prog_tar_$1])])
1024357f1050SThomas VeermanAC_SUBST([am__tar])
1025357f1050SThomas VeermanAC_SUBST([am__untar])
1026357f1050SThomas Veerman]) # _AM_PROG_TAR
1027357f1050SThomas Veerman
1028357f1050SThomas Veermanm4_include([m4/gettext.m4])
1029357f1050SThomas Veermanm4_include([m4/iconv.m4])
1030*0a6a1f1dSLionel Sambucm4_include([m4/intlmacosx.m4])
1031357f1050SThomas Veermanm4_include([m4/lib-ld.m4])
1032357f1050SThomas Veermanm4_include([m4/lib-link.m4])
1033357f1050SThomas Veermanm4_include([m4/lib-prefix.m4])
1034*0a6a1f1dSLionel Sambucm4_include([m4/libtool.m4])
1035*0a6a1f1dSLionel Sambucm4_include([m4/ltoptions.m4])
1036*0a6a1f1dSLionel Sambucm4_include([m4/ltsugar.m4])
1037*0a6a1f1dSLionel Sambucm4_include([m4/ltversion.m4])
1038*0a6a1f1dSLionel Sambucm4_include([m4/lt~obsolete.m4])
1039357f1050SThomas Veermanm4_include([m4/nls.m4])
1040357f1050SThomas Veermanm4_include([m4/po.m4])
1041357f1050SThomas Veermanm4_include([m4/progtest.m4])
1042