aclocal.m4 revision 73143b9a
173143b9aSmrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
273143b9aSmrg
373143b9aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
473143b9aSmrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
573143b9aSmrg# This file is free software; the Free Software Foundation
673143b9aSmrg# gives unlimited permission to copy and/or distribute it,
773143b9aSmrg# with or without modifications, as long as this notice is preserved.
873143b9aSmrg
973143b9aSmrg# This program is distributed in the hope that it will be useful,
1073143b9aSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1173143b9aSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1273143b9aSmrg# PARTICULAR PURPOSE.
1373143b9aSmrg
1473143b9aSmrgm4_ifndef([AC_AUTOCONF_VERSION],
1573143b9aSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1673143b9aSmrgm4_if(AC_AUTOCONF_VERSION, [2.61],,
1773143b9aSmrg[m4_warning([this file was generated for autoconf 2.61.
1873143b9aSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
1973143b9aSmrgIf you have problems, you may need to regenerate the build system entirely.
2073143b9aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
2173143b9aSmrg
2273143b9aSmrgdnl Copyright 2005 Red Hat, Inc
2373143b9aSmrgdnl
2473143b9aSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
2573143b9aSmrgdnl documentation for any purpose is hereby granted without fee, provided that
2673143b9aSmrgdnl the above copyright notice appear in all copies and that both that
2773143b9aSmrgdnl copyright notice and this permission notice appear in supporting
2873143b9aSmrgdnl documentation.
2973143b9aSmrgdnl
3073143b9aSmrgdnl The above copyright notice and this permission notice shall be included
3173143b9aSmrgdnl in all copies or substantial portions of the Software.
3273143b9aSmrgdnl
3373143b9aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
3473143b9aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3573143b9aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
3673143b9aSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
3773143b9aSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
3873143b9aSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3973143b9aSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
4073143b9aSmrgdnl
4173143b9aSmrgdnl Except as contained in this notice, the name of the copyright holders shall
4273143b9aSmrgdnl not be used in advertising or otherwise to promote the sale, use or
4373143b9aSmrgdnl other dealings in this Software without prior written authorization
4473143b9aSmrgdnl from the copyright holders.
4573143b9aSmrgdnl
4673143b9aSmrg
4773143b9aSmrg# XORG_RELEASE_VERSION
4873143b9aSmrg# --------------------
4973143b9aSmrg# Adds --with/without-release-string and changes the PACKAGE and
5073143b9aSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
5173143b9aSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
5273143b9aSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
5373143b9aSmrg 
5473143b9aSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
5573143b9aSmrg	AC_ARG_WITH(release-version,
5673143b9aSmrg			AC_HELP_STRING([--with-release-version=STRING],
5773143b9aSmrg				[Use release version string in package name]),
5873143b9aSmrg			[RELEASE_VERSION="$withval"],
5973143b9aSmrg			[RELEASE_VERSION=""])
6073143b9aSmrg	if test "x$RELEASE_VERSION" != "x"; then
6173143b9aSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
6273143b9aSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
6373143b9aSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
6473143b9aSmrg	fi
6573143b9aSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
6673143b9aSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
6773143b9aSmrg		[Major version of this package])
6873143b9aSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
6973143b9aSmrg	if test "x$PVM" = "x"; then
7073143b9aSmrg		PVM="0"
7173143b9aSmrg	fi
7273143b9aSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
7373143b9aSmrg		[$PVM],
7473143b9aSmrg		[Minor version of this package])
7573143b9aSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
7673143b9aSmrg	if test "x$PVP" = "x"; then
7773143b9aSmrg		PVP="0"
7873143b9aSmrg	fi
7973143b9aSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
8073143b9aSmrg		[$PVP],
8173143b9aSmrg		[Patch version of this package])
8273143b9aSmrg])
8373143b9aSmrg
8473143b9aSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
8573143b9aSmrg#
8673143b9aSmrg# This file is free software; the Free Software Foundation
8773143b9aSmrg# gives unlimited permission to copy and/or distribute it,
8873143b9aSmrg# with or without modifications, as long as this notice is preserved.
8973143b9aSmrg
9073143b9aSmrg# AM_AUTOMAKE_VERSION(VERSION)
9173143b9aSmrg# ----------------------------
9273143b9aSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
9373143b9aSmrg# generated from the m4 files accompanying Automake X.Y.
9473143b9aSmrg# (This private macro should not be called outside this file.)
9573143b9aSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
9673143b9aSmrg[am__api_version='1.10'
9773143b9aSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9873143b9aSmrgdnl require some minimum version.  Point them to the right macro.
9973143b9aSmrgm4_if([$1], [1.10.1], [],
10073143b9aSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10173143b9aSmrg])
10273143b9aSmrg
10373143b9aSmrg# _AM_AUTOCONF_VERSION(VERSION)
10473143b9aSmrg# -----------------------------
10573143b9aSmrg# aclocal traces this macro to find the Autoconf version.
10673143b9aSmrg# This is a private macro too.  Using m4_define simplifies
10773143b9aSmrg# the logic in aclocal, which can simply ignore this definition.
10873143b9aSmrgm4_define([_AM_AUTOCONF_VERSION], [])
10973143b9aSmrg
11073143b9aSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
11173143b9aSmrg# -------------------------------
11273143b9aSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
11373143b9aSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
11473143b9aSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
11573143b9aSmrg[AM_AUTOMAKE_VERSION([1.10.1])dnl
11673143b9aSmrgm4_ifndef([AC_AUTOCONF_VERSION],
11773143b9aSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
11873143b9aSmrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
11973143b9aSmrg
12073143b9aSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
12173143b9aSmrg
12273143b9aSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
12373143b9aSmrg#
12473143b9aSmrg# This file is free software; the Free Software Foundation
12573143b9aSmrg# gives unlimited permission to copy and/or distribute it,
12673143b9aSmrg# with or without modifications, as long as this notice is preserved.
12773143b9aSmrg
12873143b9aSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
12973143b9aSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
13073143b9aSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
13173143b9aSmrg#
13273143b9aSmrg# Of course, Automake must honor this variable whenever it calls a
13373143b9aSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
13473143b9aSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
13573143b9aSmrg# depending on how configure is run.  This is pretty annoying, since
13673143b9aSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
13773143b9aSmrg# source directory, any form will work fine, but in subdirectories a
13873143b9aSmrg# relative path needs to be adjusted first.
13973143b9aSmrg#
14073143b9aSmrg# $ac_aux_dir/missing
14173143b9aSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
14273143b9aSmrg# $top_srcdir/$ac_aux_dir/missing
14373143b9aSmrg#    fails if $ac_aux_dir is absolute,
14473143b9aSmrg#    fails when called from a subdirectory in a VPATH build with
14573143b9aSmrg#          a relative $ac_aux_dir
14673143b9aSmrg#
14773143b9aSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
14873143b9aSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
14973143b9aSmrg# harmless because $srcdir is `.', but things will broke when you
15073143b9aSmrg# start a VPATH build or use an absolute $srcdir.
15173143b9aSmrg#
15273143b9aSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
15373143b9aSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
15473143b9aSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
15573143b9aSmrg# and then we would define $MISSING as
15673143b9aSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
15773143b9aSmrg# This will work as long as MISSING is not called from configure, because
15873143b9aSmrg# unfortunately $(top_srcdir) has no meaning in configure.
15973143b9aSmrg# However there are other variables, like CC, which are often used in
16073143b9aSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
16173143b9aSmrg#
16273143b9aSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
16373143b9aSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
16473143b9aSmrg# configured tree to be moved without reconfiguration.
16573143b9aSmrg
16673143b9aSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
16773143b9aSmrg[dnl Rely on autoconf to set up CDPATH properly.
16873143b9aSmrgAC_PREREQ([2.50])dnl
16973143b9aSmrg# expand $ac_aux_dir to an absolute path
17073143b9aSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
17173143b9aSmrg])
17273143b9aSmrg
17373143b9aSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
17473143b9aSmrg
17573143b9aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
17673143b9aSmrg# Free Software Foundation, Inc.
17773143b9aSmrg#
17873143b9aSmrg# This file is free software; the Free Software Foundation
17973143b9aSmrg# gives unlimited permission to copy and/or distribute it,
18073143b9aSmrg# with or without modifications, as long as this notice is preserved.
18173143b9aSmrg
18273143b9aSmrg# serial 8
18373143b9aSmrg
18473143b9aSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
18573143b9aSmrg# -------------------------------------
18673143b9aSmrg# Define a conditional.
18773143b9aSmrgAC_DEFUN([AM_CONDITIONAL],
18873143b9aSmrg[AC_PREREQ(2.52)dnl
18973143b9aSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
19073143b9aSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
19173143b9aSmrgAC_SUBST([$1_TRUE])dnl
19273143b9aSmrgAC_SUBST([$1_FALSE])dnl
19373143b9aSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
19473143b9aSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
19573143b9aSmrgif $2; then
19673143b9aSmrg  $1_TRUE=
19773143b9aSmrg  $1_FALSE='#'
19873143b9aSmrgelse
19973143b9aSmrg  $1_TRUE='#'
20073143b9aSmrg  $1_FALSE=
20173143b9aSmrgfi
20273143b9aSmrgAC_CONFIG_COMMANDS_PRE(
20373143b9aSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
20473143b9aSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
20573143b9aSmrgUsually this means the macro was only invoked conditionally.]])
20673143b9aSmrgfi])])
20773143b9aSmrg
20873143b9aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
20973143b9aSmrg# Free Software Foundation, Inc.
21073143b9aSmrg#
21173143b9aSmrg# This file is free software; the Free Software Foundation
21273143b9aSmrg# gives unlimited permission to copy and/or distribute it,
21373143b9aSmrg# with or without modifications, as long as this notice is preserved.
21473143b9aSmrg
21573143b9aSmrg# serial 9
21673143b9aSmrg
21773143b9aSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
21873143b9aSmrg# written in clear, in which case automake, when reading aclocal.m4,
21973143b9aSmrg# will think it sees a *use*, and therefore will trigger all it's
22073143b9aSmrg# C support machinery.  Also note that it means that autoscan, seeing
22173143b9aSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
22273143b9aSmrg
22373143b9aSmrg
22473143b9aSmrg# _AM_DEPENDENCIES(NAME)
22573143b9aSmrg# ----------------------
22673143b9aSmrg# See how the compiler implements dependency checking.
22773143b9aSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
22873143b9aSmrg# We try a few techniques and use that to set a single cache variable.
22973143b9aSmrg#
23073143b9aSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
23173143b9aSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
23273143b9aSmrg# dependency, and given that the user is not expected to run this macro,
23373143b9aSmrg# just rely on AC_PROG_CC.
23473143b9aSmrgAC_DEFUN([_AM_DEPENDENCIES],
23573143b9aSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
23673143b9aSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
23773143b9aSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
23873143b9aSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
23973143b9aSmrg
24073143b9aSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
24173143b9aSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
24273143b9aSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
24373143b9aSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
24473143b9aSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
24573143b9aSmrg                   [depcc="$$1"   am_compiler_list=])
24673143b9aSmrg
24773143b9aSmrgAC_CACHE_CHECK([dependency style of $depcc],
24873143b9aSmrg               [am_cv_$1_dependencies_compiler_type],
24973143b9aSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
25073143b9aSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
25173143b9aSmrg  # making bogus files that we don't know about and never remove.  For
25273143b9aSmrg  # instance it was reported that on HP-UX the gcc test will end up
25373143b9aSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
25473143b9aSmrg  # in D'.
25573143b9aSmrg  mkdir conftest.dir
25673143b9aSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
25773143b9aSmrg  # using a relative directory.
25873143b9aSmrg  cp "$am_depcomp" conftest.dir
25973143b9aSmrg  cd conftest.dir
26073143b9aSmrg  # We will build objects and dependencies in a subdirectory because
26173143b9aSmrg  # it helps to detect inapplicable dependency modes.  For instance
26273143b9aSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
26373143b9aSmrg  # side effect of compilation, but ICC will put the dependencies in
26473143b9aSmrg  # the current directory while Tru64 will put them in the object
26573143b9aSmrg  # directory.
26673143b9aSmrg  mkdir sub
26773143b9aSmrg
26873143b9aSmrg  am_cv_$1_dependencies_compiler_type=none
26973143b9aSmrg  if test "$am_compiler_list" = ""; then
27073143b9aSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
27173143b9aSmrg  fi
27273143b9aSmrg  for depmode in $am_compiler_list; do
27373143b9aSmrg    # Setup a source with many dependencies, because some compilers
27473143b9aSmrg    # like to wrap large dependency lists on column 80 (with \), and
27573143b9aSmrg    # we should not choose a depcomp mode which is confused by this.
27673143b9aSmrg    #
27773143b9aSmrg    # We need to recreate these files for each test, as the compiler may
27873143b9aSmrg    # overwrite some of them when testing with obscure command lines.
27973143b9aSmrg    # This happens at least with the AIX C compiler.
28073143b9aSmrg    : > sub/conftest.c
28173143b9aSmrg    for i in 1 2 3 4 5 6; do
28273143b9aSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
28373143b9aSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
28473143b9aSmrg      # Solaris 8's {/usr,}/bin/sh.
28573143b9aSmrg      touch sub/conftst$i.h
28673143b9aSmrg    done
28773143b9aSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
28873143b9aSmrg
28973143b9aSmrg    case $depmode in
29073143b9aSmrg    nosideeffect)
29173143b9aSmrg      # after this tag, mechanisms are not by side-effect, so they'll
29273143b9aSmrg      # only be used when explicitly requested
29373143b9aSmrg      if test "x$enable_dependency_tracking" = xyes; then
29473143b9aSmrg	continue
29573143b9aSmrg      else
29673143b9aSmrg	break
29773143b9aSmrg      fi
29873143b9aSmrg      ;;
29973143b9aSmrg    none) break ;;
30073143b9aSmrg    esac
30173143b9aSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
30273143b9aSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
30373143b9aSmrg    # handle `-M -o', and we need to detect this.
30473143b9aSmrg    if depmode=$depmode \
30573143b9aSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
30673143b9aSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
30773143b9aSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
30873143b9aSmrg         >/dev/null 2>conftest.err &&
30973143b9aSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
31073143b9aSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
31173143b9aSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
31273143b9aSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
31373143b9aSmrg      # icc doesn't choke on unknown options, it will just issue warnings
31473143b9aSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
31573143b9aSmrg      # that says an option was ignored or not supported.
31673143b9aSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
31773143b9aSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
31873143b9aSmrg      # The diagnosis changed in icc 8.0:
31973143b9aSmrg      #   icc: Command line remark: option '-MP' not supported
32073143b9aSmrg      if (grep 'ignoring option' conftest.err ||
32173143b9aSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
32273143b9aSmrg        am_cv_$1_dependencies_compiler_type=$depmode
32373143b9aSmrg        break
32473143b9aSmrg      fi
32573143b9aSmrg    fi
32673143b9aSmrg  done
32773143b9aSmrg
32873143b9aSmrg  cd ..
32973143b9aSmrg  rm -rf conftest.dir
33073143b9aSmrgelse
33173143b9aSmrg  am_cv_$1_dependencies_compiler_type=none
33273143b9aSmrgfi
33373143b9aSmrg])
33473143b9aSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
33573143b9aSmrgAM_CONDITIONAL([am__fastdep$1], [
33673143b9aSmrg  test "x$enable_dependency_tracking" != xno \
33773143b9aSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
33873143b9aSmrg])
33973143b9aSmrg
34073143b9aSmrg
34173143b9aSmrg# AM_SET_DEPDIR
34273143b9aSmrg# -------------
34373143b9aSmrg# Choose a directory name for dependency files.
34473143b9aSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
34573143b9aSmrgAC_DEFUN([AM_SET_DEPDIR],
34673143b9aSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
34773143b9aSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
34873143b9aSmrg])
34973143b9aSmrg
35073143b9aSmrg
35173143b9aSmrg# AM_DEP_TRACK
35273143b9aSmrg# ------------
35373143b9aSmrgAC_DEFUN([AM_DEP_TRACK],
35473143b9aSmrg[AC_ARG_ENABLE(dependency-tracking,
35573143b9aSmrg[  --disable-dependency-tracking  speeds up one-time build
35673143b9aSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
35773143b9aSmrgif test "x$enable_dependency_tracking" != xno; then
35873143b9aSmrg  am_depcomp="$ac_aux_dir/depcomp"
35973143b9aSmrg  AMDEPBACKSLASH='\'
36073143b9aSmrgfi
36173143b9aSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
36273143b9aSmrgAC_SUBST([AMDEPBACKSLASH])dnl
36373143b9aSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
36473143b9aSmrg])
36573143b9aSmrg
36673143b9aSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
36773143b9aSmrg
36873143b9aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
36973143b9aSmrg# Free Software Foundation, Inc.
37073143b9aSmrg#
37173143b9aSmrg# This file is free software; the Free Software Foundation
37273143b9aSmrg# gives unlimited permission to copy and/or distribute it,
37373143b9aSmrg# with or without modifications, as long as this notice is preserved.
37473143b9aSmrg
37573143b9aSmrg#serial 3
37673143b9aSmrg
37773143b9aSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
37873143b9aSmrg# ------------------------------
37973143b9aSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
38073143b9aSmrg[for mf in $CONFIG_FILES; do
38173143b9aSmrg  # Strip MF so we end up with the name of the file.
38273143b9aSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
38373143b9aSmrg  # Check whether this is an Automake generated Makefile or not.
38473143b9aSmrg  # We used to match only the files named `Makefile.in', but
38573143b9aSmrg  # some people rename them; so instead we look at the file content.
38673143b9aSmrg  # Grep'ing the first line is not enough: some people post-process
38773143b9aSmrg  # each Makefile.in and add a new line on top of each file to say so.
38873143b9aSmrg  # Grep'ing the whole file is not good either: AIX grep has a line
38973143b9aSmrg  # limit of 2048, but all sed's we know have understand at least 4000.
39073143b9aSmrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
39173143b9aSmrg    dirpart=`AS_DIRNAME("$mf")`
39273143b9aSmrg  else
39373143b9aSmrg    continue
39473143b9aSmrg  fi
39573143b9aSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
39673143b9aSmrg  # from the Makefile without running `make'.
39773143b9aSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
39873143b9aSmrg  test -z "$DEPDIR" && continue
39973143b9aSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
40073143b9aSmrg  test -z "am__include" && continue
40173143b9aSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
40273143b9aSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
40373143b9aSmrg  U=`sed -n 's/^U = //p' < "$mf"`
40473143b9aSmrg  # Find all dependency output files, they are included files with
40573143b9aSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
40673143b9aSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
40773143b9aSmrg  # expansion.
40873143b9aSmrg  for file in `sed -n "
40973143b9aSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
41073143b9aSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
41173143b9aSmrg    # Make sure the directory exists.
41273143b9aSmrg    test -f "$dirpart/$file" && continue
41373143b9aSmrg    fdir=`AS_DIRNAME(["$file"])`
41473143b9aSmrg    AS_MKDIR_P([$dirpart/$fdir])
41573143b9aSmrg    # echo "creating $dirpart/$file"
41673143b9aSmrg    echo '# dummy' > "$dirpart/$file"
41773143b9aSmrg  done
41873143b9aSmrgdone
41973143b9aSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
42073143b9aSmrg
42173143b9aSmrg
42273143b9aSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
42373143b9aSmrg# -----------------------------
42473143b9aSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
42573143b9aSmrg#
42673143b9aSmrg# This code is only required when automatic dependency tracking
42773143b9aSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
42873143b9aSmrg# need in order to bootstrap the dependency handling code.
42973143b9aSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
43073143b9aSmrg[AC_CONFIG_COMMANDS([depfiles],
43173143b9aSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
43273143b9aSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
43373143b9aSmrg])
43473143b9aSmrg
43573143b9aSmrg# Do all the work for Automake.                             -*- Autoconf -*-
43673143b9aSmrg
43773143b9aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
43873143b9aSmrg# 2005, 2006, 2008 Free Software Foundation, Inc.
43973143b9aSmrg#
44073143b9aSmrg# This file is free software; the Free Software Foundation
44173143b9aSmrg# gives unlimited permission to copy and/or distribute it,
44273143b9aSmrg# with or without modifications, as long as this notice is preserved.
44373143b9aSmrg
44473143b9aSmrg# serial 13
44573143b9aSmrg
44673143b9aSmrg# This macro actually does too much.  Some checks are only needed if
44773143b9aSmrg# your package does certain things.  But this isn't really a big deal.
44873143b9aSmrg
44973143b9aSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
45073143b9aSmrg# AM_INIT_AUTOMAKE([OPTIONS])
45173143b9aSmrg# -----------------------------------------------
45273143b9aSmrg# The call with PACKAGE and VERSION arguments is the old style
45373143b9aSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
45473143b9aSmrg# and VERSION should now be passed to AC_INIT and removed from
45573143b9aSmrg# the call to AM_INIT_AUTOMAKE.
45673143b9aSmrg# We support both call styles for the transition.  After
45773143b9aSmrg# the next Automake release, Autoconf can make the AC_INIT
45873143b9aSmrg# arguments mandatory, and then we can depend on a new Autoconf
45973143b9aSmrg# release and drop the old call support.
46073143b9aSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
46173143b9aSmrg[AC_PREREQ([2.60])dnl
46273143b9aSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
46373143b9aSmrgdnl the ones we care about.
46473143b9aSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
46573143b9aSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
46673143b9aSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
46773143b9aSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
46873143b9aSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
46973143b9aSmrg  # is not polluted with repeated "-I."
47073143b9aSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
47173143b9aSmrg  # test to see if srcdir already configured
47273143b9aSmrg  if test -f $srcdir/config.status; then
47373143b9aSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
47473143b9aSmrg  fi
47573143b9aSmrgfi
47673143b9aSmrg
47773143b9aSmrg# test whether we have cygpath
47873143b9aSmrgif test -z "$CYGPATH_W"; then
47973143b9aSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
48073143b9aSmrg    CYGPATH_W='cygpath -w'
48173143b9aSmrg  else
48273143b9aSmrg    CYGPATH_W=echo
48373143b9aSmrg  fi
48473143b9aSmrgfi
48573143b9aSmrgAC_SUBST([CYGPATH_W])
48673143b9aSmrg
48773143b9aSmrg# Define the identity of the package.
48873143b9aSmrgdnl Distinguish between old-style and new-style calls.
48973143b9aSmrgm4_ifval([$2],
49073143b9aSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
49173143b9aSmrg AC_SUBST([PACKAGE], [$1])dnl
49273143b9aSmrg AC_SUBST([VERSION], [$2])],
49373143b9aSmrg[_AM_SET_OPTIONS([$1])dnl
49473143b9aSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
49573143b9aSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
49673143b9aSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
49773143b9aSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
49873143b9aSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
49973143b9aSmrg
50073143b9aSmrg_AM_IF_OPTION([no-define],,
50173143b9aSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
50273143b9aSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
50373143b9aSmrg
50473143b9aSmrg# Some tools Automake needs.
50573143b9aSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
50673143b9aSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
50773143b9aSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
50873143b9aSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
50973143b9aSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
51073143b9aSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
51173143b9aSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
51273143b9aSmrgAM_PROG_INSTALL_SH
51373143b9aSmrgAM_PROG_INSTALL_STRIP
51473143b9aSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
51573143b9aSmrg# We need awk for the "check" target.  The system "awk" is bad on
51673143b9aSmrg# some platforms.
51773143b9aSmrgAC_REQUIRE([AC_PROG_AWK])dnl
51873143b9aSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
51973143b9aSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
52073143b9aSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
52173143b9aSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
52273143b9aSmrg	      		     [_AM_PROG_TAR([v7])])])
52373143b9aSmrg_AM_IF_OPTION([no-dependencies],,
52473143b9aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
52573143b9aSmrg                  [_AM_DEPENDENCIES(CC)],
52673143b9aSmrg                  [define([AC_PROG_CC],
52773143b9aSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
52873143b9aSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
52973143b9aSmrg                  [_AM_DEPENDENCIES(CXX)],
53073143b9aSmrg                  [define([AC_PROG_CXX],
53173143b9aSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
53273143b9aSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
53373143b9aSmrg                  [_AM_DEPENDENCIES(OBJC)],
53473143b9aSmrg                  [define([AC_PROG_OBJC],
53573143b9aSmrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
53673143b9aSmrg])
53773143b9aSmrg])
53873143b9aSmrg
53973143b9aSmrg
54073143b9aSmrg# When config.status generates a header, we must update the stamp-h file.
54173143b9aSmrg# This file resides in the same directory as the config header
54273143b9aSmrg# that is generated.  The stamp files are numbered to have different names.
54373143b9aSmrg
54473143b9aSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
54573143b9aSmrg# loop where config.status creates the headers, so we can generate
54673143b9aSmrg# our stamp files there.
54773143b9aSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
54873143b9aSmrg[# Compute $1's index in $config_headers.
54973143b9aSmrg_am_arg=$1
55073143b9aSmrg_am_stamp_count=1
55173143b9aSmrgfor _am_header in $config_headers :; do
55273143b9aSmrg  case $_am_header in
55373143b9aSmrg    $_am_arg | $_am_arg:* )
55473143b9aSmrg      break ;;
55573143b9aSmrg    * )
55673143b9aSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
55773143b9aSmrg  esac
55873143b9aSmrgdone
55973143b9aSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
56073143b9aSmrg
56173143b9aSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
56273143b9aSmrg#
56373143b9aSmrg# This file is free software; the Free Software Foundation
56473143b9aSmrg# gives unlimited permission to copy and/or distribute it,
56573143b9aSmrg# with or without modifications, as long as this notice is preserved.
56673143b9aSmrg
56773143b9aSmrg# AM_PROG_INSTALL_SH
56873143b9aSmrg# ------------------
56973143b9aSmrg# Define $install_sh.
57073143b9aSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
57173143b9aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
57273143b9aSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
57373143b9aSmrgAC_SUBST(install_sh)])
57473143b9aSmrg
57573143b9aSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
57673143b9aSmrg#
57773143b9aSmrg# This file is free software; the Free Software Foundation
57873143b9aSmrg# gives unlimited permission to copy and/or distribute it,
57973143b9aSmrg# with or without modifications, as long as this notice is preserved.
58073143b9aSmrg
58173143b9aSmrg# serial 2
58273143b9aSmrg
58373143b9aSmrg# Check whether the underlying file-system supports filenames
58473143b9aSmrg# with a leading dot.  For instance MS-DOS doesn't.
58573143b9aSmrgAC_DEFUN([AM_SET_LEADING_DOT],
58673143b9aSmrg[rm -rf .tst 2>/dev/null
58773143b9aSmrgmkdir .tst 2>/dev/null
58873143b9aSmrgif test -d .tst; then
58973143b9aSmrg  am__leading_dot=.
59073143b9aSmrgelse
59173143b9aSmrg  am__leading_dot=_
59273143b9aSmrgfi
59373143b9aSmrgrmdir .tst 2>/dev/null
59473143b9aSmrgAC_SUBST([am__leading_dot])])
59573143b9aSmrg
59673143b9aSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
59773143b9aSmrg# From Jim Meyering
59873143b9aSmrg
59973143b9aSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
60073143b9aSmrg# Free Software Foundation, Inc.
60173143b9aSmrg#
60273143b9aSmrg# This file is free software; the Free Software Foundation
60373143b9aSmrg# gives unlimited permission to copy and/or distribute it,
60473143b9aSmrg# with or without modifications, as long as this notice is preserved.
60573143b9aSmrg
60673143b9aSmrg# serial 4
60773143b9aSmrg
60873143b9aSmrgAC_DEFUN([AM_MAINTAINER_MODE],
60973143b9aSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
61073143b9aSmrg  dnl maintainer-mode is disabled by default
61173143b9aSmrg  AC_ARG_ENABLE(maintainer-mode,
61273143b9aSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
61373143b9aSmrg			  (and sometimes confusing) to the casual installer],
61473143b9aSmrg      USE_MAINTAINER_MODE=$enableval,
61573143b9aSmrg      USE_MAINTAINER_MODE=no)
61673143b9aSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
61773143b9aSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
61873143b9aSmrg  MAINT=$MAINTAINER_MODE_TRUE
61973143b9aSmrg  AC_SUBST(MAINT)dnl
62073143b9aSmrg]
62173143b9aSmrg)
62273143b9aSmrg
62373143b9aSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
62473143b9aSmrg
62573143b9aSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
62673143b9aSmrg
62773143b9aSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
62873143b9aSmrg#
62973143b9aSmrg# This file is free software; the Free Software Foundation
63073143b9aSmrg# gives unlimited permission to copy and/or distribute it,
63173143b9aSmrg# with or without modifications, as long as this notice is preserved.
63273143b9aSmrg
63373143b9aSmrg# serial 3
63473143b9aSmrg
63573143b9aSmrg# AM_MAKE_INCLUDE()
63673143b9aSmrg# -----------------
63773143b9aSmrg# Check to see how make treats includes.
63873143b9aSmrgAC_DEFUN([AM_MAKE_INCLUDE],
63973143b9aSmrg[am_make=${MAKE-make}
64073143b9aSmrgcat > confinc << 'END'
64173143b9aSmrgam__doit:
64273143b9aSmrg	@echo done
64373143b9aSmrg.PHONY: am__doit
64473143b9aSmrgEND
64573143b9aSmrg# If we don't find an include directive, just comment out the code.
64673143b9aSmrgAC_MSG_CHECKING([for style of include used by $am_make])
64773143b9aSmrgam__include="#"
64873143b9aSmrgam__quote=
64973143b9aSmrg_am_result=none
65073143b9aSmrg# First try GNU make style include.
65173143b9aSmrgecho "include confinc" > confmf
65273143b9aSmrg# We grep out `Entering directory' and `Leaving directory'
65373143b9aSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
65473143b9aSmrg# In particular we don't look at `^make:' because GNU make might
65573143b9aSmrg# be invoked under some other name (usually "gmake"), in which
65673143b9aSmrg# case it prints its new name instead of `make'.
65773143b9aSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
65873143b9aSmrg   am__include=include
65973143b9aSmrg   am__quote=
66073143b9aSmrg   _am_result=GNU
66173143b9aSmrgfi
66273143b9aSmrg# Now try BSD make style include.
66373143b9aSmrgif test "$am__include" = "#"; then
66473143b9aSmrg   echo '.include "confinc"' > confmf
66573143b9aSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
66673143b9aSmrg      am__include=.include
66773143b9aSmrg      am__quote="\""
66873143b9aSmrg      _am_result=BSD
66973143b9aSmrg   fi
67073143b9aSmrgfi
67173143b9aSmrgAC_SUBST([am__include])
67273143b9aSmrgAC_SUBST([am__quote])
67373143b9aSmrgAC_MSG_RESULT([$_am_result])
67473143b9aSmrgrm -f confinc confmf
67573143b9aSmrg])
67673143b9aSmrg
67773143b9aSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
67873143b9aSmrg
67973143b9aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
68073143b9aSmrg# Free Software Foundation, Inc.
68173143b9aSmrg#
68273143b9aSmrg# This file is free software; the Free Software Foundation
68373143b9aSmrg# gives unlimited permission to copy and/or distribute it,
68473143b9aSmrg# with or without modifications, as long as this notice is preserved.
68573143b9aSmrg
68673143b9aSmrg# serial 5
68773143b9aSmrg
68873143b9aSmrg# AM_MISSING_PROG(NAME, PROGRAM)
68973143b9aSmrg# ------------------------------
69073143b9aSmrgAC_DEFUN([AM_MISSING_PROG],
69173143b9aSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
69273143b9aSmrg$1=${$1-"${am_missing_run}$2"}
69373143b9aSmrgAC_SUBST($1)])
69473143b9aSmrg
69573143b9aSmrg
69673143b9aSmrg# AM_MISSING_HAS_RUN
69773143b9aSmrg# ------------------
69873143b9aSmrg# Define MISSING if not defined so far and test if it supports --run.
69973143b9aSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
70073143b9aSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
70173143b9aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
70273143b9aSmrgAC_REQUIRE_AUX_FILE([missing])dnl
70373143b9aSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
70473143b9aSmrg# Use eval to expand $SHELL
70573143b9aSmrgif eval "$MISSING --run true"; then
70673143b9aSmrg  am_missing_run="$MISSING --run "
70773143b9aSmrgelse
70873143b9aSmrg  am_missing_run=
70973143b9aSmrg  AC_MSG_WARN([`missing' script is too old or missing])
71073143b9aSmrgfi
71173143b9aSmrg])
71273143b9aSmrg
71373143b9aSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
71473143b9aSmrg#
71573143b9aSmrg# This file is free software; the Free Software Foundation
71673143b9aSmrg# gives unlimited permission to copy and/or distribute it,
71773143b9aSmrg# with or without modifications, as long as this notice is preserved.
71873143b9aSmrg
71973143b9aSmrg# AM_PROG_MKDIR_P
72073143b9aSmrg# ---------------
72173143b9aSmrg# Check for `mkdir -p'.
72273143b9aSmrgAC_DEFUN([AM_PROG_MKDIR_P],
72373143b9aSmrg[AC_PREREQ([2.60])dnl
72473143b9aSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
72573143b9aSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
72673143b9aSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
72773143b9aSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
72873143b9aSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
72973143b9aSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
73073143b9aSmrgdnl adjustment using top_builddir (which is defined more often than
73173143b9aSmrgdnl MKDIR_P).
73273143b9aSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
73373143b9aSmrgcase $mkdir_p in
73473143b9aSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
73573143b9aSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
73673143b9aSmrgesac
73773143b9aSmrg])
73873143b9aSmrg
73973143b9aSmrg# Helper functions for option handling.                     -*- Autoconf -*-
74073143b9aSmrg
74173143b9aSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
74273143b9aSmrg#
74373143b9aSmrg# This file is free software; the Free Software Foundation
74473143b9aSmrg# gives unlimited permission to copy and/or distribute it,
74573143b9aSmrg# with or without modifications, as long as this notice is preserved.
74673143b9aSmrg
74773143b9aSmrg# serial 3
74873143b9aSmrg
74973143b9aSmrg# _AM_MANGLE_OPTION(NAME)
75073143b9aSmrg# -----------------------
75173143b9aSmrgAC_DEFUN([_AM_MANGLE_OPTION],
75273143b9aSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
75373143b9aSmrg
75473143b9aSmrg# _AM_SET_OPTION(NAME)
75573143b9aSmrg# ------------------------------
75673143b9aSmrg# Set option NAME.  Presently that only means defining a flag for this option.
75773143b9aSmrgAC_DEFUN([_AM_SET_OPTION],
75873143b9aSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
75973143b9aSmrg
76073143b9aSmrg# _AM_SET_OPTIONS(OPTIONS)
76173143b9aSmrg# ----------------------------------
76273143b9aSmrg# OPTIONS is a space-separated list of Automake options.
76373143b9aSmrgAC_DEFUN([_AM_SET_OPTIONS],
76473143b9aSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
76573143b9aSmrg
76673143b9aSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
76773143b9aSmrg# -------------------------------------------
76873143b9aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
76973143b9aSmrgAC_DEFUN([_AM_IF_OPTION],
77073143b9aSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
77173143b9aSmrg
77273143b9aSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
77373143b9aSmrg
77473143b9aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
77573143b9aSmrg# Free Software Foundation, Inc.
77673143b9aSmrg#
77773143b9aSmrg# This file is free software; the Free Software Foundation
77873143b9aSmrg# gives unlimited permission to copy and/or distribute it,
77973143b9aSmrg# with or without modifications, as long as this notice is preserved.
78073143b9aSmrg
78173143b9aSmrg# serial 4
78273143b9aSmrg
78373143b9aSmrg# AM_SANITY_CHECK
78473143b9aSmrg# ---------------
78573143b9aSmrgAC_DEFUN([AM_SANITY_CHECK],
78673143b9aSmrg[AC_MSG_CHECKING([whether build environment is sane])
78773143b9aSmrg# Just in case
78873143b9aSmrgsleep 1
78973143b9aSmrgecho timestamp > conftest.file
79073143b9aSmrg# Do `set' in a subshell so we don't clobber the current shell's
79173143b9aSmrg# arguments.  Must try -L first in case configure is actually a
79273143b9aSmrg# symlink; some systems play weird games with the mod time of symlinks
79373143b9aSmrg# (eg FreeBSD returns the mod time of the symlink's containing
79473143b9aSmrg# directory).
79573143b9aSmrgif (
79673143b9aSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
79773143b9aSmrg   if test "$[*]" = "X"; then
79873143b9aSmrg      # -L didn't work.
79973143b9aSmrg      set X `ls -t $srcdir/configure conftest.file`
80073143b9aSmrg   fi
80173143b9aSmrg   rm -f conftest.file
80273143b9aSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
80373143b9aSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
80473143b9aSmrg
80573143b9aSmrg      # If neither matched, then we have a broken ls.  This can happen
80673143b9aSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
80773143b9aSmrg      # broken ls alias from the environment.  This has actually
80873143b9aSmrg      # happened.  Such a system could not be considered "sane".
80973143b9aSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
81073143b9aSmrgalias in your environment])
81173143b9aSmrg   fi
81273143b9aSmrg
81373143b9aSmrg   test "$[2]" = conftest.file
81473143b9aSmrg   )
81573143b9aSmrgthen
81673143b9aSmrg   # Ok.
81773143b9aSmrg   :
81873143b9aSmrgelse
81973143b9aSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
82073143b9aSmrgCheck your system clock])
82173143b9aSmrgfi
82273143b9aSmrgAC_MSG_RESULT(yes)])
82373143b9aSmrg
82473143b9aSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
82573143b9aSmrg#
82673143b9aSmrg# This file is free software; the Free Software Foundation
82773143b9aSmrg# gives unlimited permission to copy and/or distribute it,
82873143b9aSmrg# with or without modifications, as long as this notice is preserved.
82973143b9aSmrg
83073143b9aSmrg# AM_PROG_INSTALL_STRIP
83173143b9aSmrg# ---------------------
83273143b9aSmrg# One issue with vendor `install' (even GNU) is that you can't
83373143b9aSmrg# specify the program used to strip binaries.  This is especially
83473143b9aSmrg# annoying in cross-compiling environments, where the build's strip
83573143b9aSmrg# is unlikely to handle the host's binaries.
83673143b9aSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
83773143b9aSmrg# always use install-sh in `make install-strip', and initialize
83873143b9aSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
83973143b9aSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
84073143b9aSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
84173143b9aSmrg# Installed binaries are usually stripped using `strip' when the user
84273143b9aSmrg# run `make install-strip'.  However `strip' might not be the right
84373143b9aSmrg# tool to use in cross-compilation environments, therefore Automake
84473143b9aSmrg# will honor the `STRIP' environment variable to overrule this program.
84573143b9aSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
84673143b9aSmrgif test "$cross_compiling" != no; then
84773143b9aSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
84873143b9aSmrgfi
84973143b9aSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
85073143b9aSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
85173143b9aSmrg
85273143b9aSmrg# Copyright (C) 2006  Free Software Foundation, Inc.
85373143b9aSmrg#
85473143b9aSmrg# This file is free software; the Free Software Foundation
85573143b9aSmrg# gives unlimited permission to copy and/or distribute it,
85673143b9aSmrg# with or without modifications, as long as this notice is preserved.
85773143b9aSmrg
85873143b9aSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
85973143b9aSmrg# ---------------------------
86073143b9aSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
86173143b9aSmrg# This macro is traced by Automake.
86273143b9aSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
86373143b9aSmrg
86473143b9aSmrg# Check how to create a tarball.                            -*- Autoconf -*-
86573143b9aSmrg
86673143b9aSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
86773143b9aSmrg#
86873143b9aSmrg# This file is free software; the Free Software Foundation
86973143b9aSmrg# gives unlimited permission to copy and/or distribute it,
87073143b9aSmrg# with or without modifications, as long as this notice is preserved.
87173143b9aSmrg
87273143b9aSmrg# serial 2
87373143b9aSmrg
87473143b9aSmrg# _AM_PROG_TAR(FORMAT)
87573143b9aSmrg# --------------------
87673143b9aSmrg# Check how to create a tarball in format FORMAT.
87773143b9aSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
87873143b9aSmrg#
87973143b9aSmrg# Substitute a variable $(am__tar) that is a command
88073143b9aSmrg# writing to stdout a FORMAT-tarball containing the directory
88173143b9aSmrg# $tardir.
88273143b9aSmrg#     tardir=directory && $(am__tar) > result.tar
88373143b9aSmrg#
88473143b9aSmrg# Substitute a variable $(am__untar) that extract such
88573143b9aSmrg# a tarball read from stdin.
88673143b9aSmrg#     $(am__untar) < result.tar
88773143b9aSmrgAC_DEFUN([_AM_PROG_TAR],
88873143b9aSmrg[# Always define AMTAR for backward compatibility.
88973143b9aSmrgAM_MISSING_PROG([AMTAR], [tar])
89073143b9aSmrgm4_if([$1], [v7],
89173143b9aSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
89273143b9aSmrg     [m4_case([$1], [ustar],, [pax],,
89373143b9aSmrg              [m4_fatal([Unknown tar format])])
89473143b9aSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
89573143b9aSmrg# Loop over all known methods to create a tar archive until one works.
89673143b9aSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
89773143b9aSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
89873143b9aSmrg# Do not fold the above two line into one, because Tru64 sh and
89973143b9aSmrg# Solaris sh will not grok spaces in the rhs of `-'.
90073143b9aSmrgfor _am_tool in $_am_tools
90173143b9aSmrgdo
90273143b9aSmrg  case $_am_tool in
90373143b9aSmrg  gnutar)
90473143b9aSmrg    for _am_tar in tar gnutar gtar;
90573143b9aSmrg    do
90673143b9aSmrg      AM_RUN_LOG([$_am_tar --version]) && break
90773143b9aSmrg    done
90873143b9aSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
90973143b9aSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
91073143b9aSmrg    am__untar="$_am_tar -xf -"
91173143b9aSmrg    ;;
91273143b9aSmrg  plaintar)
91373143b9aSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
91473143b9aSmrg    # ustar tarball either.
91573143b9aSmrg    (tar --version) >/dev/null 2>&1 && continue
91673143b9aSmrg    am__tar='tar chf - "$$tardir"'
91773143b9aSmrg    am__tar_='tar chf - "$tardir"'
91873143b9aSmrg    am__untar='tar xf -'
91973143b9aSmrg    ;;
92073143b9aSmrg  pax)
92173143b9aSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
92273143b9aSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
92373143b9aSmrg    am__untar='pax -r'
92473143b9aSmrg    ;;
92573143b9aSmrg  cpio)
92673143b9aSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
92773143b9aSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
92873143b9aSmrg    am__untar='cpio -i -H $1 -d'
92973143b9aSmrg    ;;
93073143b9aSmrg  none)
93173143b9aSmrg    am__tar=false
93273143b9aSmrg    am__tar_=false
93373143b9aSmrg    am__untar=false
93473143b9aSmrg    ;;
93573143b9aSmrg  esac
93673143b9aSmrg
93773143b9aSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
93873143b9aSmrg  # and am__untar set.
93973143b9aSmrg  test -n "${am_cv_prog_tar_$1}" && break
94073143b9aSmrg
94173143b9aSmrg  # tar/untar a dummy directory, and stop if the command works
94273143b9aSmrg  rm -rf conftest.dir
94373143b9aSmrg  mkdir conftest.dir
94473143b9aSmrg  echo GrepMe > conftest.dir/file
94573143b9aSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
94673143b9aSmrg  rm -rf conftest.dir
94773143b9aSmrg  if test -s conftest.tar; then
94873143b9aSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
94973143b9aSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
95073143b9aSmrg  fi
95173143b9aSmrgdone
95273143b9aSmrgrm -rf conftest.dir
95373143b9aSmrg
95473143b9aSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
95573143b9aSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
95673143b9aSmrgAC_SUBST([am__tar])
95773143b9aSmrgAC_SUBST([am__untar])
95873143b9aSmrg]) # _AM_PROG_TAR
95973143b9aSmrg
960