Blame aclocal.m4

Packit e4b6da
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
Packit e4b6da
# 2005  Free Software Foundation, Inc.
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# This program is distributed in the hope that it will be useful,
Packit e4b6da
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
Packit e4b6da
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
Packit e4b6da
# PARTICULAR PURPOSE.
Packit e4b6da
Packit e4b6da
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# AM_AUTOMAKE_VERSION(VERSION)
Packit e4b6da
# ----------------------------
Packit e4b6da
# Automake X.Y traces this macro to ensure aclocal.m4 has been
Packit e4b6da
# generated from the m4 files accompanying Automake X.Y.
Packit e4b6da
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
Packit e4b6da
Packit e4b6da
# AM_SET_CURRENT_AUTOMAKE_VERSION
Packit e4b6da
# -------------------------------
Packit e4b6da
# Call AM_AUTOMAKE_VERSION so it can be traced.
Packit e4b6da
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
Packit e4b6da
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
Packit e4b6da
	 [AM_AUTOMAKE_VERSION([1.9.6])])
Packit e4b6da
Packit e4b6da
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
Packit e4b6da
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
Packit e4b6da
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
Packit e4b6da
#
Packit e4b6da
# Of course, Automake must honor this variable whenever it calls a
Packit e4b6da
# tool from the auxiliary directory.  The problem is that $srcdir (and
Packit e4b6da
# therefore $ac_aux_dir as well) can be either absolute or relative,
Packit e4b6da
# depending on how configure is run.  This is pretty annoying, since
Packit e4b6da
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
Packit e4b6da
# source directory, any form will work fine, but in subdirectories a
Packit e4b6da
# relative path needs to be adjusted first.
Packit e4b6da
#
Packit e4b6da
# $ac_aux_dir/missing
Packit e4b6da
#    fails when called from a subdirectory if $ac_aux_dir is relative
Packit e4b6da
# $top_srcdir/$ac_aux_dir/missing
Packit e4b6da
#    fails if $ac_aux_dir is absolute,
Packit e4b6da
#    fails when called from a subdirectory in a VPATH build with
Packit e4b6da
#          a relative $ac_aux_dir
Packit e4b6da
#
Packit e4b6da
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
Packit e4b6da
# are both prefixed by $srcdir.  In an in-source build this is usually
Packit e4b6da
# harmless because $srcdir is `.', but things will broke when you
Packit e4b6da
# start a VPATH build or use an absolute $srcdir.
Packit e4b6da
#
Packit e4b6da
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
Packit e4b6da
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
Packit e4b6da
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
Packit e4b6da
# and then we would define $MISSING as
Packit e4b6da
#   MISSING="\${SHELL} $am_aux_dir/missing"
Packit e4b6da
# This will work as long as MISSING is not called from configure, because
Packit e4b6da
# unfortunately $(top_srcdir) has no meaning in configure.
Packit e4b6da
# However there are other variables, like CC, which are often used in
Packit e4b6da
# configure, and could therefore not use this "fixed" $ac_aux_dir.
Packit e4b6da
#
Packit e4b6da
# Another solution, used here, is to always expand $ac_aux_dir to an
Packit e4b6da
# absolute PATH.  The drawback is that using absolute paths prevent a
Packit e4b6da
# configured tree to be moved without reconfiguration.
Packit e4b6da
Packit e4b6da
AC_DEFUN([AM_AUX_DIR_EXPAND],
Packit e4b6da
[dnl Rely on autoconf to set up CDPATH properly.
Packit e4b6da
AC_PREREQ([2.50])dnl
Packit e4b6da
# expand $ac_aux_dir to an absolute path
Packit e4b6da
am_aux_dir=`cd $ac_aux_dir && pwd`
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
# AM_CONDITIONAL                                            -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
Packit e4b6da
# Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 7
Packit e4b6da
Packit e4b6da
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
Packit e4b6da
# -------------------------------------
Packit e4b6da
# Define a conditional.
Packit e4b6da
AC_DEFUN([AM_CONDITIONAL],
Packit e4b6da
[AC_PREREQ(2.52)dnl
Packit e4b6da
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
Packit e4b6da
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
Packit e4b6da
AC_SUBST([$1_TRUE])
Packit e4b6da
AC_SUBST([$1_FALSE])
Packit e4b6da
if $2; then
Packit e4b6da
  $1_TRUE=
Packit e4b6da
  $1_FALSE='#'
Packit e4b6da
else
Packit e4b6da
  $1_TRUE='#'
Packit e4b6da
  $1_FALSE=
Packit e4b6da
fi
Packit e4b6da
AC_CONFIG_COMMANDS_PRE(
Packit e4b6da
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
Packit e4b6da
  AC_MSG_ERROR([[conditional "$1" was never defined.
Packit e4b6da
Usually this means the macro was only invoked conditionally.]])
Packit e4b6da
fi])])
Packit e4b6da
Packit e4b6da
Packit e4b6da
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
Packit e4b6da
# Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 8
Packit e4b6da
Packit e4b6da
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
Packit e4b6da
# written in clear, in which case automake, when reading aclocal.m4,
Packit e4b6da
# will think it sees a *use*, and therefore will trigger all it's
Packit e4b6da
# C support machinery.  Also note that it means that autoscan, seeing
Packit e4b6da
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
Packit e4b6da
Packit e4b6da
Packit e4b6da
# _AM_DEPENDENCIES(NAME)
Packit e4b6da
# ----------------------
Packit e4b6da
# See how the compiler implements dependency checking.
Packit e4b6da
# NAME is "CC", "CXX", "GCJ", or "OBJC".
Packit e4b6da
# We try a few techniques and use that to set a single cache variable.
Packit e4b6da
#
Packit e4b6da
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
Packit e4b6da
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
Packit e4b6da
# dependency, and given that the user is not expected to run this macro,
Packit e4b6da
# just rely on AC_PROG_CC.
Packit e4b6da
AC_DEFUN([_AM_DEPENDENCIES],
Packit e4b6da
[AC_REQUIRE([AM_SET_DEPDIR])dnl
Packit e4b6da
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
Packit e4b6da
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
Packit e4b6da
AC_REQUIRE([AM_DEP_TRACK])dnl
Packit e4b6da
Packit e4b6da
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
Packit e4b6da
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
Packit e4b6da
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
Packit e4b6da
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
Packit e4b6da
                   [depcc="$$1"   am_compiler_list=])
Packit e4b6da
Packit e4b6da
AC_CACHE_CHECK([dependency style of $depcc],
Packit e4b6da
               [am_cv_$1_dependencies_compiler_type],
Packit e4b6da
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
Packit e4b6da
  # We make a subdir and do the tests there.  Otherwise we can end up
Packit e4b6da
  # making bogus files that we don't know about and never remove.  For
Packit e4b6da
  # instance it was reported that on HP-UX the gcc test will end up
Packit e4b6da
  # making a dummy file named `D' -- because `-MD' means `put the output
Packit e4b6da
  # in D'.
Packit e4b6da
  mkdir conftest.dir
Packit e4b6da
  # Copy depcomp to subdir because otherwise we won't find it if we're
Packit e4b6da
  # using a relative directory.
Packit e4b6da
  cp "$am_depcomp" conftest.dir
Packit e4b6da
  cd conftest.dir
Packit e4b6da
  # We will build objects and dependencies in a subdirectory because
Packit e4b6da
  # it helps to detect inapplicable dependency modes.  For instance
Packit e4b6da
  # both Tru64's cc and ICC support -MD to output dependencies as a
Packit e4b6da
  # side effect of compilation, but ICC will put the dependencies in
Packit e4b6da
  # the current directory while Tru64 will put them in the object
Packit e4b6da
  # directory.
Packit e4b6da
  mkdir sub
Packit e4b6da
Packit e4b6da
  am_cv_$1_dependencies_compiler_type=none
Packit e4b6da
  if test "$am_compiler_list" = ""; then
Packit e4b6da
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
Packit e4b6da
  fi
Packit e4b6da
  for depmode in $am_compiler_list; do
Packit e4b6da
    # Setup a source with many dependencies, because some compilers
Packit e4b6da
    # like to wrap large dependency lists on column 80 (with \), and
Packit e4b6da
    # we should not choose a depcomp mode which is confused by this.
Packit e4b6da
    #
Packit e4b6da
    # We need to recreate these files for each test, as the compiler may
Packit e4b6da
    # overwrite some of them when testing with obscure command lines.
Packit e4b6da
    # This happens at least with the AIX C compiler.
Packit e4b6da
    : > sub/conftest.c
Packit e4b6da
    for i in 1 2 3 4 5 6; do
Packit e4b6da
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
Packit e4b6da
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
Packit e4b6da
      # Solaris 8's {/usr,}/bin/sh.
Packit e4b6da
      touch sub/conftst$i.h
Packit e4b6da
    done
Packit e4b6da
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
Packit e4b6da
Packit e4b6da
    case $depmode in
Packit e4b6da
    nosideeffect)
Packit e4b6da
      # after this tag, mechanisms are not by side-effect, so they'll
Packit e4b6da
      # only be used when explicitly requested
Packit e4b6da
      if test "x$enable_dependency_tracking" = xyes; then
Packit e4b6da
	continue
Packit e4b6da
      else
Packit e4b6da
	break
Packit e4b6da
      fi
Packit e4b6da
      ;;
Packit e4b6da
    none) break ;;
Packit e4b6da
    esac
Packit e4b6da
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
Packit e4b6da
    # mode.  It turns out that the SunPro C++ compiler does not properly
Packit e4b6da
    # handle `-M -o', and we need to detect this.
Packit e4b6da
    if depmode=$depmode \
Packit e4b6da
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
Packit e4b6da
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
Packit e4b6da
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
Packit e4b6da
         >/dev/null 2>conftest.err &&
Packit e4b6da
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
Packit e4b6da
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
Packit e4b6da
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
Packit e4b6da
      # icc doesn't choke on unknown options, it will just issue warnings
Packit e4b6da
      # or remarks (even with -Werror).  So we grep stderr for any message
Packit e4b6da
      # that says an option was ignored or not supported.
Packit e4b6da
      # When given -MP, icc 7.0 and 7.1 complain thusly:
Packit e4b6da
      #   icc: Command line warning: ignoring option '-M'; no argument required
Packit e4b6da
      # The diagnosis changed in icc 8.0:
Packit e4b6da
      #   icc: Command line remark: option '-MP' not supported
Packit e4b6da
      if (grep 'ignoring option' conftest.err ||
Packit e4b6da
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
Packit e4b6da
        am_cv_$1_dependencies_compiler_type=$depmode
Packit e4b6da
        break
Packit e4b6da
      fi
Packit e4b6da
    fi
Packit e4b6da
  done
Packit e4b6da
Packit e4b6da
  cd ..
Packit e4b6da
  rm -rf conftest.dir
Packit e4b6da
else
Packit e4b6da
  am_cv_$1_dependencies_compiler_type=none
Packit e4b6da
fi
Packit e4b6da
])
Packit e4b6da
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
Packit e4b6da
AM_CONDITIONAL([am__fastdep$1], [
Packit e4b6da
  test "x$enable_dependency_tracking" != xno \
Packit e4b6da
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
Packit e4b6da
# AM_SET_DEPDIR
Packit e4b6da
# -------------
Packit e4b6da
# Choose a directory name for dependency files.
Packit e4b6da
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
Packit e4b6da
AC_DEFUN([AM_SET_DEPDIR],
Packit e4b6da
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
Packit e4b6da
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
Packit e4b6da
# AM_DEP_TRACK
Packit e4b6da
# ------------
Packit e4b6da
AC_DEFUN([AM_DEP_TRACK],
Packit e4b6da
[AC_ARG_ENABLE(dependency-tracking,
Packit e4b6da
[  --disable-dependency-tracking  speeds up one-time build
Packit e4b6da
  --enable-dependency-tracking   do not reject slow dependency extractors])
Packit e4b6da
if test "x$enable_dependency_tracking" != xno; then
Packit e4b6da
  am_depcomp="$ac_aux_dir/depcomp"
Packit e4b6da
  AMDEPBACKSLASH='\'
Packit e4b6da
fi
Packit e4b6da
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
Packit e4b6da
AC_SUBST([AMDEPBACKSLASH])
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
# Generate code to set up dependency tracking.              -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
Packit e4b6da
# Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
#serial 3
Packit e4b6da
Packit e4b6da
# _AM_OUTPUT_DEPENDENCY_COMMANDS
Packit e4b6da
# ------------------------------
Packit e4b6da
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
Packit e4b6da
[for mf in $CONFIG_FILES; do
Packit e4b6da
  # Strip MF so we end up with the name of the file.
Packit e4b6da
  mf=`echo "$mf" | sed -e 's/:.*$//'`
Packit e4b6da
  # Check whether this is an Automake generated Makefile or not.
Packit e4b6da
  # We used to match only the files named `Makefile.in', but
Packit e4b6da
  # some people rename them; so instead we look at the file content.
Packit e4b6da
  # Grep'ing the first line is not enough: some people post-process
Packit e4b6da
  # each Makefile.in and add a new line on top of each file to say so.
Packit e4b6da
  # So let's grep whole file.
Packit e4b6da
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
Packit e4b6da
    dirpart=`AS_DIRNAME("$mf")`
Packit e4b6da
  else
Packit e4b6da
    continue
Packit e4b6da
  fi
Packit e4b6da
  # Extract the definition of DEPDIR, am__include, and am__quote
Packit e4b6da
  # from the Makefile without running `make'.
Packit e4b6da
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
Packit e4b6da
  test -z "$DEPDIR" && continue
Packit e4b6da
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
Packit e4b6da
  test -z "am__include" && continue
Packit e4b6da
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
Packit e4b6da
  # When using ansi2knr, U may be empty or an underscore; expand it
Packit e4b6da
  U=`sed -n 's/^U = //p' < "$mf"`
Packit e4b6da
  # Find all dependency output files, they are included files with
Packit e4b6da
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
Packit e4b6da
  # simplest approach to changing $(DEPDIR) to its actual value in the
Packit e4b6da
  # expansion.
Packit e4b6da
  for file in `sed -n "
Packit e4b6da
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
Packit e4b6da
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
Packit e4b6da
    # Make sure the directory exists.
Packit e4b6da
    test -f "$dirpart/$file" && continue
Packit e4b6da
    fdir=`AS_DIRNAME(["$file"])`
Packit e4b6da
    AS_MKDIR_P([$dirpart/$fdir])
Packit e4b6da
    # echo "creating $dirpart/$file"
Packit e4b6da
    echo '# dummy' > "$dirpart/$file"
Packit e4b6da
  done
Packit e4b6da
done
Packit e4b6da
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
Packit e4b6da
Packit e4b6da
Packit e4b6da
# AM_OUTPUT_DEPENDENCY_COMMANDS
Packit e4b6da
# -----------------------------
Packit e4b6da
# This macro should only be invoked once -- use via AC_REQUIRE.
Packit e4b6da
#
Packit e4b6da
# This code is only required when automatic dependency tracking
Packit e4b6da
# is enabled.  FIXME.  This creates each `.P' file that we will
Packit e4b6da
# need in order to bootstrap the dependency handling code.
Packit e4b6da
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
Packit e4b6da
[AC_CONFIG_COMMANDS([depfiles],
Packit e4b6da
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
Packit e4b6da
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
Packit e4b6da
# Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 8
Packit e4b6da
Packit e4b6da
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
Packit e4b6da
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
Packit e4b6da
Packit e4b6da
# Do all the work for Automake.                             -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Packit e4b6da
# Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 12
Packit e4b6da
Packit e4b6da
# This macro actually does too much.  Some checks are only needed if
Packit e4b6da
# your package does certain things.  But this isn't really a big deal.
Packit e4b6da
Packit e4b6da
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
Packit e4b6da
# AM_INIT_AUTOMAKE([OPTIONS])
Packit e4b6da
# -----------------------------------------------
Packit e4b6da
# The call with PACKAGE and VERSION arguments is the old style
Packit e4b6da
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
Packit e4b6da
# and VERSION should now be passed to AC_INIT and removed from
Packit e4b6da
# the call to AM_INIT_AUTOMAKE.
Packit e4b6da
# We support both call styles for the transition.  After
Packit e4b6da
# the next Automake release, Autoconf can make the AC_INIT
Packit e4b6da
# arguments mandatory, and then we can depend on a new Autoconf
Packit e4b6da
# release and drop the old call support.
Packit e4b6da
AC_DEFUN([AM_INIT_AUTOMAKE],
Packit e4b6da
[AC_PREREQ([2.58])dnl
Packit e4b6da
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
Packit e4b6da
dnl the ones we care about.
Packit e4b6da
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
Packit e4b6da
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
Packit e4b6da
AC_REQUIRE([AC_PROG_INSTALL])dnl
Packit e4b6da
# test to see if srcdir already configured
Packit e4b6da
if test "`cd $srcdir && pwd`" != "`pwd`" &&
Packit e4b6da
   test -f $srcdir/config.status; then
Packit e4b6da
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
Packit e4b6da
fi
Packit e4b6da
Packit e4b6da
# test whether we have cygpath
Packit e4b6da
if test -z "$CYGPATH_W"; then
Packit e4b6da
  if (cygpath --version) >/dev/null 2>/dev/null; then
Packit e4b6da
    CYGPATH_W='cygpath -w'
Packit e4b6da
  else
Packit e4b6da
    CYGPATH_W=echo
Packit e4b6da
  fi
Packit e4b6da
fi
Packit e4b6da
AC_SUBST([CYGPATH_W])
Packit e4b6da
Packit e4b6da
# Define the identity of the package.
Packit e4b6da
dnl Distinguish between old-style and new-style calls.
Packit e4b6da
m4_ifval([$2],
Packit e4b6da
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
Packit e4b6da
 AC_SUBST([PACKAGE], [$1])dnl
Packit e4b6da
 AC_SUBST([VERSION], [$2])],
Packit e4b6da
[_AM_SET_OPTIONS([$1])dnl
Packit e4b6da
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
Packit e4b6da
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
Packit e4b6da
Packit e4b6da
_AM_IF_OPTION([no-define],,
Packit e4b6da
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
Packit e4b6da
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
Packit e4b6da
Packit e4b6da
# Some tools Automake needs.
Packit e4b6da
AC_REQUIRE([AM_SANITY_CHECK])dnl
Packit e4b6da
AC_REQUIRE([AC_ARG_PROGRAM])dnl
Packit e4b6da
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
Packit e4b6da
AM_MISSING_PROG(AUTOCONF, autoconf)
Packit e4b6da
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
Packit e4b6da
AM_MISSING_PROG(AUTOHEADER, autoheader)
Packit e4b6da
AM_MISSING_PROG(MAKEINFO, makeinfo)
Packit e4b6da
AM_PROG_INSTALL_SH
Packit e4b6da
AM_PROG_INSTALL_STRIP
Packit e4b6da
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
Packit e4b6da
# We need awk for the "check" target.  The system "awk" is bad on
Packit e4b6da
# some platforms.
Packit e4b6da
AC_REQUIRE([AC_PROG_AWK])dnl
Packit e4b6da
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
Packit e4b6da
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
Packit e4b6da
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
Packit e4b6da
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
Packit e4b6da
	      		     [_AM_PROG_TAR([v7])])])
Packit e4b6da
_AM_IF_OPTION([no-dependencies],,
Packit e4b6da
[AC_PROVIDE_IFELSE([AC_PROG_CC],
Packit e4b6da
                  [_AM_DEPENDENCIES(CC)],
Packit e4b6da
                  [define([AC_PROG_CC],
Packit e4b6da
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
Packit e4b6da
AC_PROVIDE_IFELSE([AC_PROG_CXX],
Packit e4b6da
                  [_AM_DEPENDENCIES(CXX)],
Packit e4b6da
                  [define([AC_PROG_CXX],
Packit e4b6da
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
Packit e4b6da
])
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
Packit e4b6da
# When config.status generates a header, we must update the stamp-h file.
Packit e4b6da
# This file resides in the same directory as the config header
Packit e4b6da
# that is generated.  The stamp files are numbered to have different names.
Packit e4b6da
Packit e4b6da
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
Packit e4b6da
# loop where config.status creates the headers, so we can generate
Packit e4b6da
# our stamp files there.
Packit e4b6da
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
Packit e4b6da
[# Compute $1's index in $config_headers.
Packit e4b6da
_am_stamp_count=1
Packit e4b6da
for _am_header in $config_headers :; do
Packit e4b6da
  case $_am_header in
Packit e4b6da
    $1 | $1:* )
Packit e4b6da
      break ;;
Packit e4b6da
    * )
Packit e4b6da
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
Packit e4b6da
  esac
Packit e4b6da
done
Packit e4b6da
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
Packit e4b6da
Packit e4b6da
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# AM_PROG_INSTALL_SH
Packit e4b6da
# ------------------
Packit e4b6da
# Define $install_sh.
Packit e4b6da
AC_DEFUN([AM_PROG_INSTALL_SH],
Packit e4b6da
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Packit e4b6da
install_sh=${install_sh-"$am_aux_dir/install-sh"}
Packit e4b6da
AC_SUBST(install_sh)])
Packit e4b6da
Packit e4b6da
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 2
Packit e4b6da
Packit e4b6da
# Check whether the underlying file-system supports filenames
Packit e4b6da
# with a leading dot.  For instance MS-DOS doesn't.
Packit e4b6da
AC_DEFUN([AM_SET_LEADING_DOT],
Packit e4b6da
[rm -rf .tst 2>/dev/null
Packit e4b6da
mkdir .tst 2>/dev/null
Packit e4b6da
if test -d .tst; then
Packit e4b6da
  am__leading_dot=.
Packit e4b6da
else
Packit e4b6da
  am__leading_dot=_
Packit e4b6da
fi
Packit e4b6da
rmdir .tst 2>/dev/null
Packit e4b6da
AC_SUBST([am__leading_dot])])
Packit e4b6da
Packit e4b6da
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 3
Packit e4b6da
Packit e4b6da
# AM_MAKE_INCLUDE()
Packit e4b6da
# -----------------
Packit e4b6da
# Check to see how make treats includes.
Packit e4b6da
AC_DEFUN([AM_MAKE_INCLUDE],
Packit e4b6da
[am_make=${MAKE-make}
Packit e4b6da
cat > confinc << 'END'
Packit e4b6da
am__doit:
Packit e4b6da
	@echo done
Packit e4b6da
.PHONY: am__doit
Packit e4b6da
END
Packit e4b6da
# If we don't find an include directive, just comment out the code.
Packit e4b6da
AC_MSG_CHECKING([for style of include used by $am_make])
Packit e4b6da
am__include="#"
Packit e4b6da
am__quote=
Packit e4b6da
_am_result=none
Packit e4b6da
# First try GNU make style include.
Packit e4b6da
echo "include confinc" > confmf
Packit e4b6da
# We grep out `Entering directory' and `Leaving directory'
Packit e4b6da
# messages which can occur if `w' ends up in MAKEFLAGS.
Packit e4b6da
# In particular we don't look at `^make:' because GNU make might
Packit e4b6da
# be invoked under some other name (usually "gmake"), in which
Packit e4b6da
# case it prints its new name instead of `make'.
Packit e4b6da
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
Packit e4b6da
   am__include=include
Packit e4b6da
   am__quote=
Packit e4b6da
   _am_result=GNU
Packit e4b6da
fi
Packit e4b6da
# Now try BSD make style include.
Packit e4b6da
if test "$am__include" = "#"; then
Packit e4b6da
   echo '.include "confinc"' > confmf
Packit e4b6da
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
Packit e4b6da
      am__include=.include
Packit e4b6da
      am__quote="\""
Packit e4b6da
      _am_result=BSD
Packit e4b6da
   fi
Packit e4b6da
fi
Packit e4b6da
AC_SUBST([am__include])
Packit e4b6da
AC_SUBST([am__quote])
Packit e4b6da
AC_MSG_RESULT([$_am_result])
Packit e4b6da
rm -f confinc confmf
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
Packit e4b6da
# Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 4
Packit e4b6da
Packit e4b6da
# AM_MISSING_PROG(NAME, PROGRAM)
Packit e4b6da
# ------------------------------
Packit e4b6da
AC_DEFUN([AM_MISSING_PROG],
Packit e4b6da
[AC_REQUIRE([AM_MISSING_HAS_RUN])
Packit e4b6da
$1=${$1-"${am_missing_run}$2"}
Packit e4b6da
AC_SUBST($1)])
Packit e4b6da
Packit e4b6da
Packit e4b6da
# AM_MISSING_HAS_RUN
Packit e4b6da
# ------------------
Packit e4b6da
# Define MISSING if not defined so far and test if it supports --run.
Packit e4b6da
# If it does, set am_missing_run to use it, otherwise, to nothing.
Packit e4b6da
AC_DEFUN([AM_MISSING_HAS_RUN],
Packit e4b6da
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Packit e4b6da
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
Packit e4b6da
# Use eval to expand $SHELL
Packit e4b6da
if eval "$MISSING --run true"; then
Packit e4b6da
  am_missing_run="$MISSING --run "
Packit e4b6da
else
Packit e4b6da
  am_missing_run=
Packit e4b6da
  AC_MSG_WARN([`missing' script is too old or missing])
Packit e4b6da
fi
Packit e4b6da
])
Packit e4b6da
Packit e4b6da
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# AM_PROG_MKDIR_P
Packit e4b6da
# ---------------
Packit e4b6da
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
Packit e4b6da
#
Packit e4b6da
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
Packit e4b6da
# created by `make install' are always world readable, even if the
Packit e4b6da
# installer happens to have an overly restrictive umask (e.g. 077).
Packit e4b6da
# This was a mistake.  There are at least two reasons why we must not
Packit e4b6da
# use `-m 0755':
Packit e4b6da
#   - it causes special bits like SGID to be ignored,
Packit e4b6da
#   - it may be too restrictive (some setups expect 775 directories).
Packit e4b6da
#
Packit e4b6da
# Do not use -m 0755 and let people choose whatever they expect by
Packit e4b6da
# setting umask.
Packit e4b6da
#
Packit e4b6da
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
Packit e4b6da
# Some implementations (such as Solaris 8's) are not thread-safe: if a
Packit e4b6da
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
Packit e4b6da
# concurrently, both version can detect that a/ is missing, but only
Packit e4b6da
# one can create it and the other will error out.  Consequently we
Packit e4b6da
# restrict ourselves to GNU make (using the --version option ensures
Packit e4b6da
# this.)
Packit e4b6da
AC_DEFUN([AM_PROG_MKDIR_P],
Packit e4b6da
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
Packit e4b6da
  # We used to keeping the `.' as first argument, in order to
Packit e4b6da
  # allow $(mkdir_p) to be used without argument.  As in
Packit e4b6da
  #   $(mkdir_p) $(somedir)
Packit e4b6da
  # where $(somedir) is conditionally defined.  However this is wrong
Packit e4b6da
  # for two reasons:
Packit e4b6da
  #  1. if the package is installed by a user who cannot write `.'
Packit e4b6da
  #     make install will fail,
Packit e4b6da
  #  2. the above comment should most certainly read
Packit e4b6da
  #     $(mkdir_p) $(DESTDIR)$(somedir)
Packit e4b6da
  #     so it does not work when $(somedir) is undefined and
Packit e4b6da
  #     $(DESTDIR) is not.
Packit e4b6da
  #  To support the latter case, we have to write
Packit e4b6da
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
Packit e4b6da
  #  so the `.' trick is pointless.
Packit e4b6da
  mkdir_p='mkdir -p --'
Packit e4b6da
else
Packit e4b6da
  # On NextStep and OpenStep, the `mkdir' command does not
Packit e4b6da
  # recognize any option.  It will interpret all options as
Packit e4b6da
  # directories to create, and then abort because `.' already
Packit e4b6da
  # exists.
Packit e4b6da
  for d in ./-p ./--version;
Packit e4b6da
  do
Packit e4b6da
    test -d $d && rmdir $d
Packit e4b6da
  done
Packit e4b6da
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
Packit e4b6da
  if test -f "$ac_aux_dir/mkinstalldirs"; then
Packit e4b6da
    mkdir_p='$(mkinstalldirs)'
Packit e4b6da
  else
Packit e4b6da
    mkdir_p='$(install_sh) -d'
Packit e4b6da
  fi
Packit e4b6da
fi
Packit e4b6da
AC_SUBST([mkdir_p])])
Packit e4b6da
Packit e4b6da
# Helper functions for option handling.                     -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 3
Packit e4b6da
Packit e4b6da
# _AM_MANGLE_OPTION(NAME)
Packit e4b6da
# -----------------------
Packit e4b6da
AC_DEFUN([_AM_MANGLE_OPTION],
Packit e4b6da
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
Packit e4b6da
Packit e4b6da
# _AM_SET_OPTION(NAME)
Packit e4b6da
# ------------------------------
Packit e4b6da
# Set option NAME.  Presently that only means defining a flag for this option.
Packit e4b6da
AC_DEFUN([_AM_SET_OPTION],
Packit e4b6da
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
Packit e4b6da
Packit e4b6da
# _AM_SET_OPTIONS(OPTIONS)
Packit e4b6da
# ----------------------------------
Packit e4b6da
# OPTIONS is a space-separated list of Automake options.
Packit e4b6da
AC_DEFUN([_AM_SET_OPTIONS],
Packit e4b6da
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
Packit e4b6da
Packit e4b6da
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
Packit e4b6da
# -------------------------------------------
Packit e4b6da
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
Packit e4b6da
AC_DEFUN([_AM_IF_OPTION],
Packit e4b6da
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
Packit e4b6da
Packit e4b6da
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
Packit e4b6da
# Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 4
Packit e4b6da
Packit e4b6da
# AM_SANITY_CHECK
Packit e4b6da
# ---------------
Packit e4b6da
AC_DEFUN([AM_SANITY_CHECK],
Packit e4b6da
[AC_MSG_CHECKING([whether build environment is sane])
Packit e4b6da
# Just in case
Packit e4b6da
sleep 1
Packit e4b6da
echo timestamp > conftest.file
Packit e4b6da
# Do `set' in a subshell so we don't clobber the current shell's
Packit e4b6da
# arguments.  Must try -L first in case configure is actually a
Packit e4b6da
# symlink; some systems play weird games with the mod time of symlinks
Packit e4b6da
# (eg FreeBSD returns the mod time of the symlink's containing
Packit e4b6da
# directory).
Packit e4b6da
if (
Packit e4b6da
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
Packit e4b6da
   if test "$[*]" = "X"; then
Packit e4b6da
      # -L didn't work.
Packit e4b6da
      set X `ls -t $srcdir/configure conftest.file`
Packit e4b6da
   fi
Packit e4b6da
   rm -f conftest.file
Packit e4b6da
   if test "$[*]" != "X $srcdir/configure conftest.file" \
Packit e4b6da
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
Packit e4b6da
Packit e4b6da
      # If neither matched, then we have a broken ls.  This can happen
Packit e4b6da
      # if, for instance, CONFIG_SHELL is bash and it inherits a
Packit e4b6da
      # broken ls alias from the environment.  This has actually
Packit e4b6da
      # happened.  Such a system could not be considered "sane".
Packit e4b6da
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
Packit e4b6da
alias in your environment])
Packit e4b6da
   fi
Packit e4b6da
Packit e4b6da
   test "$[2]" = conftest.file
Packit e4b6da
   )
Packit e4b6da
then
Packit e4b6da
   # Ok.
Packit e4b6da
   :
Packit e4b6da
else
Packit e4b6da
   AC_MSG_ERROR([newly created file is older than distributed files!
Packit e4b6da
Check your system clock])
Packit e4b6da
fi
Packit e4b6da
AC_MSG_RESULT(yes)])
Packit e4b6da
Packit e4b6da
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# AM_PROG_INSTALL_STRIP
Packit e4b6da
# ---------------------
Packit e4b6da
# One issue with vendor `install' (even GNU) is that you can't
Packit e4b6da
# specify the program used to strip binaries.  This is especially
Packit e4b6da
# annoying in cross-compiling environments, where the build's strip
Packit e4b6da
# is unlikely to handle the host's binaries.
Packit e4b6da
# Fortunately install-sh will honor a STRIPPROG variable, so we
Packit e4b6da
# always use install-sh in `make install-strip', and initialize
Packit e4b6da
# STRIPPROG with the value of the STRIP variable (set by the user).
Packit e4b6da
AC_DEFUN([AM_PROG_INSTALL_STRIP],
Packit e4b6da
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
Packit e4b6da
# Installed binaries are usually stripped using `strip' when the user
Packit e4b6da
# run `make install-strip'.  However `strip' might not be the right
Packit e4b6da
# tool to use in cross-compilation environments, therefore Automake
Packit e4b6da
# will honor the `STRIP' environment variable to overrule this program.
Packit e4b6da
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
Packit e4b6da
if test "$cross_compiling" != no; then
Packit e4b6da
  AC_CHECK_TOOL([STRIP], [strip], :)
Packit e4b6da
fi
Packit e4b6da
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
Packit e4b6da
AC_SUBST([INSTALL_STRIP_PROGRAM])])
Packit e4b6da
Packit e4b6da
# Check how to create a tarball.                            -*- Autoconf -*-
Packit e4b6da
Packit e4b6da
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
Packit e4b6da
#
Packit e4b6da
# This file is free software; the Free Software Foundation
Packit e4b6da
# gives unlimited permission to copy and/or distribute it,
Packit e4b6da
# with or without modifications, as long as this notice is preserved.
Packit e4b6da
Packit e4b6da
# serial 2
Packit e4b6da
Packit e4b6da
# _AM_PROG_TAR(FORMAT)
Packit e4b6da
# --------------------
Packit e4b6da
# Check how to create a tarball in format FORMAT.
Packit e4b6da
# FORMAT should be one of `v7', `ustar', or `pax'.
Packit e4b6da
#
Packit e4b6da
# Substitute a variable $(am__tar) that is a command
Packit e4b6da
# writing to stdout a FORMAT-tarball containing the directory
Packit e4b6da
# $tardir.
Packit e4b6da
#     tardir=directory && $(am__tar) > result.tar
Packit e4b6da
#
Packit e4b6da
# Substitute a variable $(am__untar) that extract such
Packit e4b6da
# a tarball read from stdin.
Packit e4b6da
#     $(am__untar) < result.tar
Packit e4b6da
AC_DEFUN([_AM_PROG_TAR],
Packit e4b6da
[# Always define AMTAR for backward compatibility.
Packit e4b6da
AM_MISSING_PROG([AMTAR], [tar])
Packit e4b6da
m4_if([$1], [v7],
Packit e4b6da
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
Packit e4b6da
     [m4_case([$1], [ustar],, [pax],,
Packit e4b6da
              [m4_fatal([Unknown tar format])])
Packit e4b6da
AC_MSG_CHECKING([how to create a $1 tar archive])
Packit e4b6da
# Loop over all known methods to create a tar archive until one works.
Packit e4b6da
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
Packit e4b6da
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
Packit e4b6da
# Do not fold the above two line into one, because Tru64 sh and
Packit e4b6da
# Solaris sh will not grok spaces in the rhs of `-'.
Packit e4b6da
for _am_tool in $_am_tools
Packit e4b6da
do
Packit e4b6da
  case $_am_tool in
Packit e4b6da
  gnutar)
Packit e4b6da
    for _am_tar in tar gnutar gtar;
Packit e4b6da
    do
Packit e4b6da
      AM_RUN_LOG([$_am_tar --version]) && break
Packit e4b6da
    done
Packit e4b6da
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
Packit e4b6da
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
Packit e4b6da
    am__untar="$_am_tar -xf -"
Packit e4b6da
    ;;
Packit e4b6da
  plaintar)
Packit e4b6da
    # Must skip GNU tar: if it does not support --format= it doesn't create
Packit e4b6da
    # ustar tarball either.
Packit e4b6da
    (tar --version) >/dev/null 2>&1 && continue
Packit e4b6da
    am__tar='tar chf - "$$tardir"'
Packit e4b6da
    am__tar_='tar chf - "$tardir"'
Packit e4b6da
    am__untar='tar xf -'
Packit e4b6da
    ;;
Packit e4b6da
  pax)
Packit e4b6da
    am__tar='pax -L -x $1 -w "$$tardir"'
Packit e4b6da
    am__tar_='pax -L -x $1 -w "$tardir"'
Packit e4b6da
    am__untar='pax -r'
Packit e4b6da
    ;;
Packit e4b6da
  cpio)
Packit e4b6da
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
Packit e4b6da
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
Packit e4b6da
    am__untar='cpio -i -H $1 -d'
Packit e4b6da
    ;;
Packit e4b6da
  none)
Packit e4b6da
    am__tar=false
Packit e4b6da
    am__tar_=false
Packit e4b6da
    am__untar=false
Packit e4b6da
    ;;
Packit e4b6da
  esac
Packit e4b6da
Packit e4b6da
  # If the value was cached, stop now.  We just wanted to have am__tar
Packit e4b6da
  # and am__untar set.
Packit e4b6da
  test -n "${am_cv_prog_tar_$1}" && break
Packit e4b6da
Packit e4b6da
  # tar/untar a dummy directory, and stop if the command works
Packit e4b6da
  rm -rf conftest.dir
Packit e4b6da
  mkdir conftest.dir
Packit e4b6da
  echo GrepMe > conftest.dir/file
Packit e4b6da
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
Packit e4b6da
  rm -rf conftest.dir
Packit e4b6da
  if test -s conftest.tar; then
Packit e4b6da
    AM_RUN_LOG([$am__untar 
Packit e4b6da
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
Packit e4b6da
  fi
Packit e4b6da
done
Packit e4b6da
rm -rf conftest.dir
Packit e4b6da
Packit e4b6da
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
Packit e4b6da
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
Packit e4b6da
AC_SUBST([am__tar])
Packit e4b6da
AC_SUBST([am__untar])
Packit e4b6da
]) # _AM_PROG_TAR
Packit e4b6da