aclocal.m4 revision 11d341ca
111d341caSmrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
211d341caSmrg
311d341caSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
411d341caSmrg# 2005  Free Software Foundation, Inc.
511d341caSmrg# This file is free software; the Free Software Foundation
611d341caSmrg# gives unlimited permission to copy and/or distribute it,
711d341caSmrg# with or without modifications, as long as this notice is preserved.
811d341caSmrg
911d341caSmrg# This program is distributed in the hope that it will be useful,
1011d341caSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1111d341caSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1211d341caSmrg# PARTICULAR PURPOSE.
1311d341caSmrg
1411d341caSmrgdnl Copyright 2005 Red Hat, Inc
1511d341caSmrgdnl
1611d341caSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1711d341caSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1811d341caSmrgdnl the above copyright notice appear in all copies and that both that
1911d341caSmrgdnl copyright notice and this permission notice appear in supporting
2011d341caSmrgdnl documentation.
2111d341caSmrgdnl
2211d341caSmrgdnl The above copyright notice and this permission notice shall be included
2311d341caSmrgdnl in all copies or substantial portions of the Software.
2411d341caSmrgdnl
2511d341caSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2611d341caSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2711d341caSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2811d341caSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2911d341caSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
3011d341caSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3111d341caSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
3211d341caSmrgdnl
3311d341caSmrgdnl Except as contained in this notice, the name of the copyright holders shall
3411d341caSmrgdnl not be used in advertising or otherwise to promote the sale, use or
3511d341caSmrgdnl other dealings in this Software without prior written authorization
3611d341caSmrgdnl from the copyright holders.
3711d341caSmrgdnl
3811d341caSmrg
3911d341caSmrg# XORG_RELEASE_VERSION
4011d341caSmrg# --------------------
4111d341caSmrg# Adds --with/without-release-string and changes the PACKAGE and
4211d341caSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
4311d341caSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
4411d341caSmrg 
4511d341caSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
4611d341caSmrg	AC_ARG_WITH(release-version,
4711d341caSmrg			AC_HELP_STRING([--with-release-version=STRING],
4811d341caSmrg				[Use release version string in package name]),
4911d341caSmrg			[RELEASE_VERSION="$withval"],
5011d341caSmrg			[RELEASE_VERSION=""])
5111d341caSmrg	if test "x$RELEASE_VERSION" != "x"; then
5211d341caSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
5311d341caSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
5411d341caSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
5511d341caSmrg	fi
5611d341caSmrg])
5711d341caSmrg
5811d341caSmrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
5911d341caSmrg#
6011d341caSmrg# This file is free software; the Free Software Foundation
6111d341caSmrg# gives unlimited permission to copy and/or distribute it,
6211d341caSmrg# with or without modifications, as long as this notice is preserved.
6311d341caSmrg
6411d341caSmrg# AM_AUTOMAKE_VERSION(VERSION)
6511d341caSmrg# ----------------------------
6611d341caSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
6711d341caSmrg# generated from the m4 files accompanying Automake X.Y.
6811d341caSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6911d341caSmrg
7011d341caSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
7111d341caSmrg# -------------------------------
7211d341caSmrg# Call AM_AUTOMAKE_VERSION so it can be traced.
7311d341caSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
7411d341caSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7511d341caSmrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
7611d341caSmrg
7711d341caSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
7811d341caSmrg
7911d341caSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8011d341caSmrg#
8111d341caSmrg# This file is free software; the Free Software Foundation
8211d341caSmrg# gives unlimited permission to copy and/or distribute it,
8311d341caSmrg# with or without modifications, as long as this notice is preserved.
8411d341caSmrg
8511d341caSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8611d341caSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8711d341caSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8811d341caSmrg#
8911d341caSmrg# Of course, Automake must honor this variable whenever it calls a
9011d341caSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
9111d341caSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
9211d341caSmrg# depending on how configure is run.  This is pretty annoying, since
9311d341caSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9411d341caSmrg# source directory, any form will work fine, but in subdirectories a
9511d341caSmrg# relative path needs to be adjusted first.
9611d341caSmrg#
9711d341caSmrg# $ac_aux_dir/missing
9811d341caSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
9911d341caSmrg# $top_srcdir/$ac_aux_dir/missing
10011d341caSmrg#    fails if $ac_aux_dir is absolute,
10111d341caSmrg#    fails when called from a subdirectory in a VPATH build with
10211d341caSmrg#          a relative $ac_aux_dir
10311d341caSmrg#
10411d341caSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10511d341caSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
10611d341caSmrg# harmless because $srcdir is `.', but things will broke when you
10711d341caSmrg# start a VPATH build or use an absolute $srcdir.
10811d341caSmrg#
10911d341caSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
11011d341caSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
11111d341caSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
11211d341caSmrg# and then we would define $MISSING as
11311d341caSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
11411d341caSmrg# This will work as long as MISSING is not called from configure, because
11511d341caSmrg# unfortunately $(top_srcdir) has no meaning in configure.
11611d341caSmrg# However there are other variables, like CC, which are often used in
11711d341caSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
11811d341caSmrg#
11911d341caSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
12011d341caSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
12111d341caSmrg# configured tree to be moved without reconfiguration.
12211d341caSmrg
12311d341caSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
12411d341caSmrg[dnl Rely on autoconf to set up CDPATH properly.
12511d341caSmrgAC_PREREQ([2.50])dnl
12611d341caSmrg# expand $ac_aux_dir to an absolute path
12711d341caSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
12811d341caSmrg])
12911d341caSmrg
13011d341caSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
13111d341caSmrg
13211d341caSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
13311d341caSmrg# Free Software Foundation, Inc.
13411d341caSmrg#
13511d341caSmrg# This file is free software; the Free Software Foundation
13611d341caSmrg# gives unlimited permission to copy and/or distribute it,
13711d341caSmrg# with or without modifications, as long as this notice is preserved.
13811d341caSmrg
13911d341caSmrg# serial 7
14011d341caSmrg
14111d341caSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
14211d341caSmrg# -------------------------------------
14311d341caSmrg# Define a conditional.
14411d341caSmrgAC_DEFUN([AM_CONDITIONAL],
14511d341caSmrg[AC_PREREQ(2.52)dnl
14611d341caSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
14711d341caSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
14811d341caSmrgAC_SUBST([$1_TRUE])
14911d341caSmrgAC_SUBST([$1_FALSE])
15011d341caSmrgif $2; then
15111d341caSmrg  $1_TRUE=
15211d341caSmrg  $1_FALSE='#'
15311d341caSmrgelse
15411d341caSmrg  $1_TRUE='#'
15511d341caSmrg  $1_FALSE=
15611d341caSmrgfi
15711d341caSmrgAC_CONFIG_COMMANDS_PRE(
15811d341caSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
15911d341caSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
16011d341caSmrgUsually this means the macro was only invoked conditionally.]])
16111d341caSmrgfi])])
16211d341caSmrg
16311d341caSmrg# Do all the work for Automake.                             -*- Autoconf -*-
16411d341caSmrg
16511d341caSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
16611d341caSmrg# Free Software Foundation, Inc.
16711d341caSmrg#
16811d341caSmrg# This file is free software; the Free Software Foundation
16911d341caSmrg# gives unlimited permission to copy and/or distribute it,
17011d341caSmrg# with or without modifications, as long as this notice is preserved.
17111d341caSmrg
17211d341caSmrg# serial 12
17311d341caSmrg
17411d341caSmrg# This macro actually does too much.  Some checks are only needed if
17511d341caSmrg# your package does certain things.  But this isn't really a big deal.
17611d341caSmrg
17711d341caSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
17811d341caSmrg# AM_INIT_AUTOMAKE([OPTIONS])
17911d341caSmrg# -----------------------------------------------
18011d341caSmrg# The call with PACKAGE and VERSION arguments is the old style
18111d341caSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
18211d341caSmrg# and VERSION should now be passed to AC_INIT and removed from
18311d341caSmrg# the call to AM_INIT_AUTOMAKE.
18411d341caSmrg# We support both call styles for the transition.  After
18511d341caSmrg# the next Automake release, Autoconf can make the AC_INIT
18611d341caSmrg# arguments mandatory, and then we can depend on a new Autoconf
18711d341caSmrg# release and drop the old call support.
18811d341caSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
18911d341caSmrg[AC_PREREQ([2.58])dnl
19011d341caSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
19111d341caSmrgdnl the ones we care about.
19211d341caSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
19311d341caSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
19411d341caSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
19511d341caSmrg# test to see if srcdir already configured
19611d341caSmrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
19711d341caSmrg   test -f $srcdir/config.status; then
19811d341caSmrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
19911d341caSmrgfi
20011d341caSmrg
20111d341caSmrg# test whether we have cygpath
20211d341caSmrgif test -z "$CYGPATH_W"; then
20311d341caSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
20411d341caSmrg    CYGPATH_W='cygpath -w'
20511d341caSmrg  else
20611d341caSmrg    CYGPATH_W=echo
20711d341caSmrg  fi
20811d341caSmrgfi
20911d341caSmrgAC_SUBST([CYGPATH_W])
21011d341caSmrg
21111d341caSmrg# Define the identity of the package.
21211d341caSmrgdnl Distinguish between old-style and new-style calls.
21311d341caSmrgm4_ifval([$2],
21411d341caSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
21511d341caSmrg AC_SUBST([PACKAGE], [$1])dnl
21611d341caSmrg AC_SUBST([VERSION], [$2])],
21711d341caSmrg[_AM_SET_OPTIONS([$1])dnl
21811d341caSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
21911d341caSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
22011d341caSmrg
22111d341caSmrg_AM_IF_OPTION([no-define],,
22211d341caSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
22311d341caSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
22411d341caSmrg
22511d341caSmrg# Some tools Automake needs.
22611d341caSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
22711d341caSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
22811d341caSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
22911d341caSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
23011d341caSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
23111d341caSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
23211d341caSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
23311d341caSmrgAM_PROG_INSTALL_SH
23411d341caSmrgAM_PROG_INSTALL_STRIP
23511d341caSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
23611d341caSmrg# We need awk for the "check" target.  The system "awk" is bad on
23711d341caSmrg# some platforms.
23811d341caSmrgAC_REQUIRE([AC_PROG_AWK])dnl
23911d341caSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
24011d341caSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
24111d341caSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
24211d341caSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
24311d341caSmrg	      		     [_AM_PROG_TAR([v7])])])
24411d341caSmrg_AM_IF_OPTION([no-dependencies],,
24511d341caSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
24611d341caSmrg                  [_AM_DEPENDENCIES(CC)],
24711d341caSmrg                  [define([AC_PROG_CC],
24811d341caSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
24911d341caSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
25011d341caSmrg                  [_AM_DEPENDENCIES(CXX)],
25111d341caSmrg                  [define([AC_PROG_CXX],
25211d341caSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
25311d341caSmrg])
25411d341caSmrg])
25511d341caSmrg
25611d341caSmrg
25711d341caSmrg# When config.status generates a header, we must update the stamp-h file.
25811d341caSmrg# This file resides in the same directory as the config header
25911d341caSmrg# that is generated.  The stamp files are numbered to have different names.
26011d341caSmrg
26111d341caSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
26211d341caSmrg# loop where config.status creates the headers, so we can generate
26311d341caSmrg# our stamp files there.
26411d341caSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
26511d341caSmrg[# Compute $1's index in $config_headers.
26611d341caSmrg_am_stamp_count=1
26711d341caSmrgfor _am_header in $config_headers :; do
26811d341caSmrg  case $_am_header in
26911d341caSmrg    $1 | $1:* )
27011d341caSmrg      break ;;
27111d341caSmrg    * )
27211d341caSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
27311d341caSmrg  esac
27411d341caSmrgdone
27511d341caSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
27611d341caSmrg
27711d341caSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
27811d341caSmrg#
27911d341caSmrg# This file is free software; the Free Software Foundation
28011d341caSmrg# gives unlimited permission to copy and/or distribute it,
28111d341caSmrg# with or without modifications, as long as this notice is preserved.
28211d341caSmrg
28311d341caSmrg# AM_PROG_INSTALL_SH
28411d341caSmrg# ------------------
28511d341caSmrg# Define $install_sh.
28611d341caSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
28711d341caSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
28811d341caSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
28911d341caSmrgAC_SUBST(install_sh)])
29011d341caSmrg
29111d341caSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
29211d341caSmrg#
29311d341caSmrg# This file is free software; the Free Software Foundation
29411d341caSmrg# gives unlimited permission to copy and/or distribute it,
29511d341caSmrg# with or without modifications, as long as this notice is preserved.
29611d341caSmrg
29711d341caSmrg# serial 2
29811d341caSmrg
29911d341caSmrg# Check whether the underlying file-system supports filenames
30011d341caSmrg# with a leading dot.  For instance MS-DOS doesn't.
30111d341caSmrgAC_DEFUN([AM_SET_LEADING_DOT],
30211d341caSmrg[rm -rf .tst 2>/dev/null
30311d341caSmrgmkdir .tst 2>/dev/null
30411d341caSmrgif test -d .tst; then
30511d341caSmrg  am__leading_dot=.
30611d341caSmrgelse
30711d341caSmrg  am__leading_dot=_
30811d341caSmrgfi
30911d341caSmrgrmdir .tst 2>/dev/null
31011d341caSmrgAC_SUBST([am__leading_dot])])
31111d341caSmrg
31211d341caSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
31311d341caSmrg# From Jim Meyering
31411d341caSmrg
31511d341caSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
31611d341caSmrg# Free Software Foundation, Inc.
31711d341caSmrg#
31811d341caSmrg# This file is free software; the Free Software Foundation
31911d341caSmrg# gives unlimited permission to copy and/or distribute it,
32011d341caSmrg# with or without modifications, as long as this notice is preserved.
32111d341caSmrg
32211d341caSmrg# serial 4
32311d341caSmrg
32411d341caSmrgAC_DEFUN([AM_MAINTAINER_MODE],
32511d341caSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
32611d341caSmrg  dnl maintainer-mode is disabled by default
32711d341caSmrg  AC_ARG_ENABLE(maintainer-mode,
32811d341caSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
32911d341caSmrg			  (and sometimes confusing) to the casual installer],
33011d341caSmrg      USE_MAINTAINER_MODE=$enableval,
33111d341caSmrg      USE_MAINTAINER_MODE=no)
33211d341caSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
33311d341caSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
33411d341caSmrg  MAINT=$MAINTAINER_MODE_TRUE
33511d341caSmrg  AC_SUBST(MAINT)dnl
33611d341caSmrg]
33711d341caSmrg)
33811d341caSmrg
33911d341caSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
34011d341caSmrg
34111d341caSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
34211d341caSmrg
34311d341caSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
34411d341caSmrg# Free Software Foundation, Inc.
34511d341caSmrg#
34611d341caSmrg# This file is free software; the Free Software Foundation
34711d341caSmrg# gives unlimited permission to copy and/or distribute it,
34811d341caSmrg# with or without modifications, as long as this notice is preserved.
34911d341caSmrg
35011d341caSmrg# serial 4
35111d341caSmrg
35211d341caSmrg# AM_MISSING_PROG(NAME, PROGRAM)
35311d341caSmrg# ------------------------------
35411d341caSmrgAC_DEFUN([AM_MISSING_PROG],
35511d341caSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
35611d341caSmrg$1=${$1-"${am_missing_run}$2"}
35711d341caSmrgAC_SUBST($1)])
35811d341caSmrg
35911d341caSmrg
36011d341caSmrg# AM_MISSING_HAS_RUN
36111d341caSmrg# ------------------
36211d341caSmrg# Define MISSING if not defined so far and test if it supports --run.
36311d341caSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
36411d341caSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
36511d341caSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
36611d341caSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
36711d341caSmrg# Use eval to expand $SHELL
36811d341caSmrgif eval "$MISSING --run true"; then
36911d341caSmrg  am_missing_run="$MISSING --run "
37011d341caSmrgelse
37111d341caSmrg  am_missing_run=
37211d341caSmrg  AC_MSG_WARN([`missing' script is too old or missing])
37311d341caSmrgfi
37411d341caSmrg])
37511d341caSmrg
37611d341caSmrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
37711d341caSmrg#
37811d341caSmrg# This file is free software; the Free Software Foundation
37911d341caSmrg# gives unlimited permission to copy and/or distribute it,
38011d341caSmrg# with or without modifications, as long as this notice is preserved.
38111d341caSmrg
38211d341caSmrg# AM_PROG_MKDIR_P
38311d341caSmrg# ---------------
38411d341caSmrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
38511d341caSmrg#
38611d341caSmrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
38711d341caSmrg# created by `make install' are always world readable, even if the
38811d341caSmrg# installer happens to have an overly restrictive umask (e.g. 077).
38911d341caSmrg# This was a mistake.  There are at least two reasons why we must not
39011d341caSmrg# use `-m 0755':
39111d341caSmrg#   - it causes special bits like SGID to be ignored,
39211d341caSmrg#   - it may be too restrictive (some setups expect 775 directories).
39311d341caSmrg#
39411d341caSmrg# Do not use -m 0755 and let people choose whatever they expect by
39511d341caSmrg# setting umask.
39611d341caSmrg#
39711d341caSmrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
39811d341caSmrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
39911d341caSmrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
40011d341caSmrg# concurrently, both version can detect that a/ is missing, but only
40111d341caSmrg# one can create it and the other will error out.  Consequently we
40211d341caSmrg# restrict ourselves to GNU make (using the --version option ensures
40311d341caSmrg# this.)
40411d341caSmrgAC_DEFUN([AM_PROG_MKDIR_P],
40511d341caSmrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
40611d341caSmrg  # We used to keeping the `.' as first argument, in order to
40711d341caSmrg  # allow $(mkdir_p) to be used without argument.  As in
40811d341caSmrg  #   $(mkdir_p) $(somedir)
40911d341caSmrg  # where $(somedir) is conditionally defined.  However this is wrong
41011d341caSmrg  # for two reasons:
41111d341caSmrg  #  1. if the package is installed by a user who cannot write `.'
41211d341caSmrg  #     make install will fail,
41311d341caSmrg  #  2. the above comment should most certainly read
41411d341caSmrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
41511d341caSmrg  #     so it does not work when $(somedir) is undefined and
41611d341caSmrg  #     $(DESTDIR) is not.
41711d341caSmrg  #  To support the latter case, we have to write
41811d341caSmrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
41911d341caSmrg  #  so the `.' trick is pointless.
42011d341caSmrg  mkdir_p='mkdir -p --'
42111d341caSmrgelse
42211d341caSmrg  # On NextStep and OpenStep, the `mkdir' command does not
42311d341caSmrg  # recognize any option.  It will interpret all options as
42411d341caSmrg  # directories to create, and then abort because `.' already
42511d341caSmrg  # exists.
42611d341caSmrg  for d in ./-p ./--version;
42711d341caSmrg  do
42811d341caSmrg    test -d $d && rmdir $d
42911d341caSmrg  done
43011d341caSmrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
43111d341caSmrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
43211d341caSmrg    mkdir_p='$(mkinstalldirs)'
43311d341caSmrg  else
43411d341caSmrg    mkdir_p='$(install_sh) -d'
43511d341caSmrg  fi
43611d341caSmrgfi
43711d341caSmrgAC_SUBST([mkdir_p])])
43811d341caSmrg
43911d341caSmrg# Helper functions for option handling.                     -*- Autoconf -*-
44011d341caSmrg
44111d341caSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
44211d341caSmrg#
44311d341caSmrg# This file is free software; the Free Software Foundation
44411d341caSmrg# gives unlimited permission to copy and/or distribute it,
44511d341caSmrg# with or without modifications, as long as this notice is preserved.
44611d341caSmrg
44711d341caSmrg# serial 3
44811d341caSmrg
44911d341caSmrg# _AM_MANGLE_OPTION(NAME)
45011d341caSmrg# -----------------------
45111d341caSmrgAC_DEFUN([_AM_MANGLE_OPTION],
45211d341caSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
45311d341caSmrg
45411d341caSmrg# _AM_SET_OPTION(NAME)
45511d341caSmrg# ------------------------------
45611d341caSmrg# Set option NAME.  Presently that only means defining a flag for this option.
45711d341caSmrgAC_DEFUN([_AM_SET_OPTION],
45811d341caSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
45911d341caSmrg
46011d341caSmrg# _AM_SET_OPTIONS(OPTIONS)
46111d341caSmrg# ----------------------------------
46211d341caSmrg# OPTIONS is a space-separated list of Automake options.
46311d341caSmrgAC_DEFUN([_AM_SET_OPTIONS],
46411d341caSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
46511d341caSmrg
46611d341caSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
46711d341caSmrg# -------------------------------------------
46811d341caSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
46911d341caSmrgAC_DEFUN([_AM_IF_OPTION],
47011d341caSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
47111d341caSmrg
47211d341caSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
47311d341caSmrg
47411d341caSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
47511d341caSmrg# Free Software Foundation, Inc.
47611d341caSmrg#
47711d341caSmrg# This file is free software; the Free Software Foundation
47811d341caSmrg# gives unlimited permission to copy and/or distribute it,
47911d341caSmrg# with or without modifications, as long as this notice is preserved.
48011d341caSmrg
48111d341caSmrg# serial 4
48211d341caSmrg
48311d341caSmrg# AM_SANITY_CHECK
48411d341caSmrg# ---------------
48511d341caSmrgAC_DEFUN([AM_SANITY_CHECK],
48611d341caSmrg[AC_MSG_CHECKING([whether build environment is sane])
48711d341caSmrg# Just in case
48811d341caSmrgsleep 1
48911d341caSmrgecho timestamp > conftest.file
49011d341caSmrg# Do `set' in a subshell so we don't clobber the current shell's
49111d341caSmrg# arguments.  Must try -L first in case configure is actually a
49211d341caSmrg# symlink; some systems play weird games with the mod time of symlinks
49311d341caSmrg# (eg FreeBSD returns the mod time of the symlink's containing
49411d341caSmrg# directory).
49511d341caSmrgif (
49611d341caSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
49711d341caSmrg   if test "$[*]" = "X"; then
49811d341caSmrg      # -L didn't work.
49911d341caSmrg      set X `ls -t $srcdir/configure conftest.file`
50011d341caSmrg   fi
50111d341caSmrg   rm -f conftest.file
50211d341caSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
50311d341caSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
50411d341caSmrg
50511d341caSmrg      # If neither matched, then we have a broken ls.  This can happen
50611d341caSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
50711d341caSmrg      # broken ls alias from the environment.  This has actually
50811d341caSmrg      # happened.  Such a system could not be considered "sane".
50911d341caSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
51011d341caSmrgalias in your environment])
51111d341caSmrg   fi
51211d341caSmrg
51311d341caSmrg   test "$[2]" = conftest.file
51411d341caSmrg   )
51511d341caSmrgthen
51611d341caSmrg   # Ok.
51711d341caSmrg   :
51811d341caSmrgelse
51911d341caSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
52011d341caSmrgCheck your system clock])
52111d341caSmrgfi
52211d341caSmrgAC_MSG_RESULT(yes)])
52311d341caSmrg
52411d341caSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
52511d341caSmrg#
52611d341caSmrg# This file is free software; the Free Software Foundation
52711d341caSmrg# gives unlimited permission to copy and/or distribute it,
52811d341caSmrg# with or without modifications, as long as this notice is preserved.
52911d341caSmrg
53011d341caSmrg# AM_PROG_INSTALL_STRIP
53111d341caSmrg# ---------------------
53211d341caSmrg# One issue with vendor `install' (even GNU) is that you can't
53311d341caSmrg# specify the program used to strip binaries.  This is especially
53411d341caSmrg# annoying in cross-compiling environments, where the build's strip
53511d341caSmrg# is unlikely to handle the host's binaries.
53611d341caSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
53711d341caSmrg# always use install-sh in `make install-strip', and initialize
53811d341caSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
53911d341caSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
54011d341caSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
54111d341caSmrg# Installed binaries are usually stripped using `strip' when the user
54211d341caSmrg# run `make install-strip'.  However `strip' might not be the right
54311d341caSmrg# tool to use in cross-compilation environments, therefore Automake
54411d341caSmrg# will honor the `STRIP' environment variable to overrule this program.
54511d341caSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
54611d341caSmrgif test "$cross_compiling" != no; then
54711d341caSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
54811d341caSmrgfi
54911d341caSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
55011d341caSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
55111d341caSmrg
55211d341caSmrg# Check how to create a tarball.                            -*- Autoconf -*-
55311d341caSmrg
55411d341caSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
55511d341caSmrg#
55611d341caSmrg# This file is free software; the Free Software Foundation
55711d341caSmrg# gives unlimited permission to copy and/or distribute it,
55811d341caSmrg# with or without modifications, as long as this notice is preserved.
55911d341caSmrg
56011d341caSmrg# serial 2
56111d341caSmrg
56211d341caSmrg# _AM_PROG_TAR(FORMAT)
56311d341caSmrg# --------------------
56411d341caSmrg# Check how to create a tarball in format FORMAT.
56511d341caSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
56611d341caSmrg#
56711d341caSmrg# Substitute a variable $(am__tar) that is a command
56811d341caSmrg# writing to stdout a FORMAT-tarball containing the directory
56911d341caSmrg# $tardir.
57011d341caSmrg#     tardir=directory && $(am__tar) > result.tar
57111d341caSmrg#
57211d341caSmrg# Substitute a variable $(am__untar) that extract such
57311d341caSmrg# a tarball read from stdin.
57411d341caSmrg#     $(am__untar) < result.tar
57511d341caSmrgAC_DEFUN([_AM_PROG_TAR],
57611d341caSmrg[# Always define AMTAR for backward compatibility.
57711d341caSmrgAM_MISSING_PROG([AMTAR], [tar])
57811d341caSmrgm4_if([$1], [v7],
57911d341caSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
58011d341caSmrg     [m4_case([$1], [ustar],, [pax],,
58111d341caSmrg              [m4_fatal([Unknown tar format])])
58211d341caSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
58311d341caSmrg# Loop over all known methods to create a tar archive until one works.
58411d341caSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
58511d341caSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
58611d341caSmrg# Do not fold the above two line into one, because Tru64 sh and
58711d341caSmrg# Solaris sh will not grok spaces in the rhs of `-'.
58811d341caSmrgfor _am_tool in $_am_tools
58911d341caSmrgdo
59011d341caSmrg  case $_am_tool in
59111d341caSmrg  gnutar)
59211d341caSmrg    for _am_tar in tar gnutar gtar;
59311d341caSmrg    do
59411d341caSmrg      AM_RUN_LOG([$_am_tar --version]) && break
59511d341caSmrg    done
59611d341caSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
59711d341caSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
59811d341caSmrg    am__untar="$_am_tar -xf -"
59911d341caSmrg    ;;
60011d341caSmrg  plaintar)
60111d341caSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
60211d341caSmrg    # ustar tarball either.
60311d341caSmrg    (tar --version) >/dev/null 2>&1 && continue
60411d341caSmrg    am__tar='tar chf - "$$tardir"'
60511d341caSmrg    am__tar_='tar chf - "$tardir"'
60611d341caSmrg    am__untar='tar xf -'
60711d341caSmrg    ;;
60811d341caSmrg  pax)
60911d341caSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
61011d341caSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
61111d341caSmrg    am__untar='pax -r'
61211d341caSmrg    ;;
61311d341caSmrg  cpio)
61411d341caSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
61511d341caSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
61611d341caSmrg    am__untar='cpio -i -H $1 -d'
61711d341caSmrg    ;;
61811d341caSmrg  none)
61911d341caSmrg    am__tar=false
62011d341caSmrg    am__tar_=false
62111d341caSmrg    am__untar=false
62211d341caSmrg    ;;
62311d341caSmrg  esac
62411d341caSmrg
62511d341caSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
62611d341caSmrg  # and am__untar set.
62711d341caSmrg  test -n "${am_cv_prog_tar_$1}" && break
62811d341caSmrg
62911d341caSmrg  # tar/untar a dummy directory, and stop if the command works
63011d341caSmrg  rm -rf conftest.dir
63111d341caSmrg  mkdir conftest.dir
63211d341caSmrg  echo GrepMe > conftest.dir/file
63311d341caSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
63411d341caSmrg  rm -rf conftest.dir
63511d341caSmrg  if test -s conftest.tar; then
63611d341caSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
63711d341caSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
63811d341caSmrg  fi
63911d341caSmrgdone
64011d341caSmrgrm -rf conftest.dir
64111d341caSmrg
64211d341caSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
64311d341caSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
64411d341caSmrgAC_SUBST([am__tar])
64511d341caSmrgAC_SUBST([am__untar])
64611d341caSmrg]) # _AM_PROG_TAR
64711d341caSmrg
648