aclocal.m4 revision 1cc8c64f
11cc8c64fSmrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
21cc8c64fSmrg
31cc8c64fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
41cc8c64fSmrg# Free Software Foundation, Inc.
51cc8c64fSmrg# This file is free software; the Free Software Foundation
61cc8c64fSmrg# gives unlimited permission to copy and/or distribute it,
71cc8c64fSmrg# with or without modifications, as long as this notice is preserved.
81cc8c64fSmrg
91cc8c64fSmrg# This program is distributed in the hope that it will be useful,
101cc8c64fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
111cc8c64fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
121cc8c64fSmrg# PARTICULAR PURPOSE.
131cc8c64fSmrg
141cc8c64fSmrg# Do all the work for Automake.                            -*- Autoconf -*-
151cc8c64fSmrg
161cc8c64fSmrg# This macro actually does too much some checks are only needed if
171cc8c64fSmrg# your package does certain things.  But this isn't really a big deal.
181cc8c64fSmrg
191cc8c64fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
201cc8c64fSmrg# Free Software Foundation, Inc.
211cc8c64fSmrg
221cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
231cc8c64fSmrg# it under the terms of the GNU General Public License as published by
241cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
251cc8c64fSmrg# any later version.
261cc8c64fSmrg
271cc8c64fSmrg# This program is distributed in the hope that it will be useful,
281cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
291cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
301cc8c64fSmrg# GNU General Public License for more details.
311cc8c64fSmrg
321cc8c64fSmrg# You should have received a copy of the GNU General Public License
331cc8c64fSmrg# along with this program; if not, write to the Free Software
341cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
351cc8c64fSmrg# 02111-1307, USA.
361cc8c64fSmrg
371cc8c64fSmrg# serial 10
381cc8c64fSmrg
391cc8c64fSmrgAC_PREREQ([2.54])
401cc8c64fSmrg
411cc8c64fSmrg# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
421cc8c64fSmrg# the ones we care about.
431cc8c64fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
441cc8c64fSmrg
451cc8c64fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
461cc8c64fSmrg# AM_INIT_AUTOMAKE([OPTIONS])
471cc8c64fSmrg# -----------------------------------------------
481cc8c64fSmrg# The call with PACKAGE and VERSION arguments is the old style
491cc8c64fSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
501cc8c64fSmrg# and VERSION should now be passed to AC_INIT and removed from
511cc8c64fSmrg# the call to AM_INIT_AUTOMAKE.
521cc8c64fSmrg# We support both call styles for the transition.  After
531cc8c64fSmrg# the next Automake release, Autoconf can make the AC_INIT
541cc8c64fSmrg# arguments mandatory, and then we can depend on a new Autoconf
551cc8c64fSmrg# release and drop the old call support.
561cc8c64fSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
571cc8c64fSmrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
581cc8c64fSmrg AC_REQUIRE([AC_PROG_INSTALL])dnl
591cc8c64fSmrg# test to see if srcdir already configured
601cc8c64fSmrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
611cc8c64fSmrg   test -f $srcdir/config.status; then
621cc8c64fSmrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
631cc8c64fSmrgfi
641cc8c64fSmrg
651cc8c64fSmrg# test whether we have cygpath
661cc8c64fSmrgif test -z "$CYGPATH_W"; then
671cc8c64fSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
681cc8c64fSmrg    CYGPATH_W='cygpath -w'
691cc8c64fSmrg  else
701cc8c64fSmrg    CYGPATH_W=echo
711cc8c64fSmrg  fi
721cc8c64fSmrgfi
731cc8c64fSmrgAC_SUBST([CYGPATH_W])
741cc8c64fSmrg
751cc8c64fSmrg# Define the identity of the package.
761cc8c64fSmrgdnl Distinguish between old-style and new-style calls.
771cc8c64fSmrgm4_ifval([$2],
781cc8c64fSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
791cc8c64fSmrg AC_SUBST([PACKAGE], [$1])dnl
801cc8c64fSmrg AC_SUBST([VERSION], [$2])],
811cc8c64fSmrg[_AM_SET_OPTIONS([$1])dnl
821cc8c64fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
831cc8c64fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
841cc8c64fSmrg
851cc8c64fSmrg_AM_IF_OPTION([no-define],,
861cc8c64fSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
871cc8c64fSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
881cc8c64fSmrg
891cc8c64fSmrg# Some tools Automake needs.
901cc8c64fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
911cc8c64fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
921cc8c64fSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
931cc8c64fSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
941cc8c64fSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
951cc8c64fSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
961cc8c64fSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
971cc8c64fSmrgAM_MISSING_PROG(AMTAR, tar)
981cc8c64fSmrgAM_PROG_INSTALL_SH
991cc8c64fSmrgAM_PROG_INSTALL_STRIP
1001cc8c64fSmrg# We need awk for the "check" target.  The system "awk" is bad on
1011cc8c64fSmrg# some platforms.
1021cc8c64fSmrgAC_REQUIRE([AC_PROG_AWK])dnl
1031cc8c64fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
1041cc8c64fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
1051cc8c64fSmrg
1061cc8c64fSmrg_AM_IF_OPTION([no-dependencies],,
1071cc8c64fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
1081cc8c64fSmrg                  [_AM_DEPENDENCIES(CC)],
1091cc8c64fSmrg                  [define([AC_PROG_CC],
1101cc8c64fSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1111cc8c64fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
1121cc8c64fSmrg                  [_AM_DEPENDENCIES(CXX)],
1131cc8c64fSmrg                  [define([AC_PROG_CXX],
1141cc8c64fSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1151cc8c64fSmrg])
1161cc8c64fSmrg])
1171cc8c64fSmrg
1181cc8c64fSmrg
1191cc8c64fSmrg# When config.status generates a header, we must update the stamp-h file.
1201cc8c64fSmrg# This file resides in the same directory as the config header
1211cc8c64fSmrg# that is generated.  The stamp files are numbered to have different names.
1221cc8c64fSmrg
1231cc8c64fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1241cc8c64fSmrg# loop where config.status creates the headers, so we can generate
1251cc8c64fSmrg# our stamp files there.
1261cc8c64fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1271cc8c64fSmrg[# Compute $1's index in $config_headers.
1281cc8c64fSmrg_am_stamp_count=1
1291cc8c64fSmrgfor _am_header in $config_headers :; do
1301cc8c64fSmrg  case $_am_header in
1311cc8c64fSmrg    $1 | $1:* )
1321cc8c64fSmrg      break ;;
1331cc8c64fSmrg    * )
1341cc8c64fSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1351cc8c64fSmrg  esac
1361cc8c64fSmrgdone
1371cc8c64fSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1381cc8c64fSmrg
1391cc8c64fSmrg# Copyright 2002  Free Software Foundation, Inc.
1401cc8c64fSmrg
1411cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
1421cc8c64fSmrg# it under the terms of the GNU General Public License as published by
1431cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
1441cc8c64fSmrg# any later version.
1451cc8c64fSmrg
1461cc8c64fSmrg# This program is distributed in the hope that it will be useful,
1471cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1481cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1491cc8c64fSmrg# GNU General Public License for more details.
1501cc8c64fSmrg
1511cc8c64fSmrg# You should have received a copy of the GNU General Public License
1521cc8c64fSmrg# along with this program; if not, write to the Free Software
1531cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1541cc8c64fSmrg
1551cc8c64fSmrg# AM_AUTOMAKE_VERSION(VERSION)
1561cc8c64fSmrg# ----------------------------
1571cc8c64fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
1581cc8c64fSmrg# generated from the m4 files accompanying Automake X.Y.
1591cc8c64fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1601cc8c64fSmrg
1611cc8c64fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
1621cc8c64fSmrg# -------------------------------
1631cc8c64fSmrg# Call AM_AUTOMAKE_VERSION so it can be traced.
1641cc8c64fSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1651cc8c64fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1661cc8c64fSmrg	 [AM_AUTOMAKE_VERSION([1.7.9])])
1671cc8c64fSmrg
1681cc8c64fSmrg# Helper functions for option handling.                    -*- Autoconf -*-
1691cc8c64fSmrg
1701cc8c64fSmrg# Copyright 2001, 2002  Free Software Foundation, Inc.
1711cc8c64fSmrg
1721cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
1731cc8c64fSmrg# it under the terms of the GNU General Public License as published by
1741cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
1751cc8c64fSmrg# any later version.
1761cc8c64fSmrg
1771cc8c64fSmrg# This program is distributed in the hope that it will be useful,
1781cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1791cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1801cc8c64fSmrg# GNU General Public License for more details.
1811cc8c64fSmrg
1821cc8c64fSmrg# You should have received a copy of the GNU General Public License
1831cc8c64fSmrg# along with this program; if not, write to the Free Software
1841cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1851cc8c64fSmrg# 02111-1307, USA.
1861cc8c64fSmrg
1871cc8c64fSmrg# serial 2
1881cc8c64fSmrg
1891cc8c64fSmrg# _AM_MANGLE_OPTION(NAME)
1901cc8c64fSmrg# -----------------------
1911cc8c64fSmrgAC_DEFUN([_AM_MANGLE_OPTION],
1921cc8c64fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1931cc8c64fSmrg
1941cc8c64fSmrg# _AM_SET_OPTION(NAME)
1951cc8c64fSmrg# ------------------------------
1961cc8c64fSmrg# Set option NAME.  Presently that only means defining a flag for this option.
1971cc8c64fSmrgAC_DEFUN([_AM_SET_OPTION],
1981cc8c64fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1991cc8c64fSmrg
2001cc8c64fSmrg# _AM_SET_OPTIONS(OPTIONS)
2011cc8c64fSmrg# ----------------------------------
2021cc8c64fSmrg# OPTIONS is a space-separated list of Automake options.
2031cc8c64fSmrgAC_DEFUN([_AM_SET_OPTIONS],
2041cc8c64fSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2051cc8c64fSmrg
2061cc8c64fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2071cc8c64fSmrg# -------------------------------------------
2081cc8c64fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2091cc8c64fSmrgAC_DEFUN([_AM_IF_OPTION],
2101cc8c64fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2111cc8c64fSmrg
2121cc8c64fSmrg#
2131cc8c64fSmrg# Check to make sure that the build environment is sane.
2141cc8c64fSmrg#
2151cc8c64fSmrg
2161cc8c64fSmrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2171cc8c64fSmrg
2181cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
2191cc8c64fSmrg# it under the terms of the GNU General Public License as published by
2201cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
2211cc8c64fSmrg# any later version.
2221cc8c64fSmrg
2231cc8c64fSmrg# This program is distributed in the hope that it will be useful,
2241cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2251cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2261cc8c64fSmrg# GNU General Public License for more details.
2271cc8c64fSmrg
2281cc8c64fSmrg# You should have received a copy of the GNU General Public License
2291cc8c64fSmrg# along with this program; if not, write to the Free Software
2301cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2311cc8c64fSmrg# 02111-1307, USA.
2321cc8c64fSmrg
2331cc8c64fSmrg# serial 3
2341cc8c64fSmrg
2351cc8c64fSmrg# AM_SANITY_CHECK
2361cc8c64fSmrg# ---------------
2371cc8c64fSmrgAC_DEFUN([AM_SANITY_CHECK],
2381cc8c64fSmrg[AC_MSG_CHECKING([whether build environment is sane])
2391cc8c64fSmrg# Just in case
2401cc8c64fSmrgsleep 1
2411cc8c64fSmrgecho timestamp > conftest.file
2421cc8c64fSmrg# Do `set' in a subshell so we don't clobber the current shell's
2431cc8c64fSmrg# arguments.  Must try -L first in case configure is actually a
2441cc8c64fSmrg# symlink; some systems play weird games with the mod time of symlinks
2451cc8c64fSmrg# (eg FreeBSD returns the mod time of the symlink's containing
2461cc8c64fSmrg# directory).
2471cc8c64fSmrgif (
2481cc8c64fSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2491cc8c64fSmrg   if test "$[*]" = "X"; then
2501cc8c64fSmrg      # -L didn't work.
2511cc8c64fSmrg      set X `ls -t $srcdir/configure conftest.file`
2521cc8c64fSmrg   fi
2531cc8c64fSmrg   rm -f conftest.file
2541cc8c64fSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
2551cc8c64fSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
2561cc8c64fSmrg
2571cc8c64fSmrg      # If neither matched, then we have a broken ls.  This can happen
2581cc8c64fSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
2591cc8c64fSmrg      # broken ls alias from the environment.  This has actually
2601cc8c64fSmrg      # happened.  Such a system could not be considered "sane".
2611cc8c64fSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2621cc8c64fSmrgalias in your environment])
2631cc8c64fSmrg   fi
2641cc8c64fSmrg
2651cc8c64fSmrg   test "$[2]" = conftest.file
2661cc8c64fSmrg   )
2671cc8c64fSmrgthen
2681cc8c64fSmrg   # Ok.
2691cc8c64fSmrg   :
2701cc8c64fSmrgelse
2711cc8c64fSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
2721cc8c64fSmrgCheck your system clock])
2731cc8c64fSmrgfi
2741cc8c64fSmrgAC_MSG_RESULT(yes)])
2751cc8c64fSmrg
2761cc8c64fSmrg#  -*- Autoconf -*-
2771cc8c64fSmrg
2781cc8c64fSmrg
2791cc8c64fSmrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2801cc8c64fSmrg
2811cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
2821cc8c64fSmrg# it under the terms of the GNU General Public License as published by
2831cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
2841cc8c64fSmrg# any later version.
2851cc8c64fSmrg
2861cc8c64fSmrg# This program is distributed in the hope that it will be useful,
2871cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2881cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2891cc8c64fSmrg# GNU General Public License for more details.
2901cc8c64fSmrg
2911cc8c64fSmrg# You should have received a copy of the GNU General Public License
2921cc8c64fSmrg# along with this program; if not, write to the Free Software
2931cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2941cc8c64fSmrg# 02111-1307, USA.
2951cc8c64fSmrg
2961cc8c64fSmrg# serial 3
2971cc8c64fSmrg
2981cc8c64fSmrg# AM_MISSING_PROG(NAME, PROGRAM)
2991cc8c64fSmrg# ------------------------------
3001cc8c64fSmrgAC_DEFUN([AM_MISSING_PROG],
3011cc8c64fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
3021cc8c64fSmrg$1=${$1-"${am_missing_run}$2"}
3031cc8c64fSmrgAC_SUBST($1)])
3041cc8c64fSmrg
3051cc8c64fSmrg
3061cc8c64fSmrg# AM_MISSING_HAS_RUN
3071cc8c64fSmrg# ------------------
3081cc8c64fSmrg# Define MISSING if not defined so far and test if it supports --run.
3091cc8c64fSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
3101cc8c64fSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
3111cc8c64fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3121cc8c64fSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3131cc8c64fSmrg# Use eval to expand $SHELL
3141cc8c64fSmrgif eval "$MISSING --run true"; then
3151cc8c64fSmrg  am_missing_run="$MISSING --run "
3161cc8c64fSmrgelse
3171cc8c64fSmrg  am_missing_run=
3181cc8c64fSmrg  AC_MSG_WARN([`missing' script is too old or missing])
3191cc8c64fSmrgfi
3201cc8c64fSmrg])
3211cc8c64fSmrg
3221cc8c64fSmrg# AM_AUX_DIR_EXPAND
3231cc8c64fSmrg
3241cc8c64fSmrg# Copyright 2001 Free Software Foundation, Inc.
3251cc8c64fSmrg
3261cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
3271cc8c64fSmrg# it under the terms of the GNU General Public License as published by
3281cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
3291cc8c64fSmrg# any later version.
3301cc8c64fSmrg
3311cc8c64fSmrg# This program is distributed in the hope that it will be useful,
3321cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
3331cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3341cc8c64fSmrg# GNU General Public License for more details.
3351cc8c64fSmrg
3361cc8c64fSmrg# You should have received a copy of the GNU General Public License
3371cc8c64fSmrg# along with this program; if not, write to the Free Software
3381cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3391cc8c64fSmrg# 02111-1307, USA.
3401cc8c64fSmrg
3411cc8c64fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3421cc8c64fSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
3431cc8c64fSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
3441cc8c64fSmrg#
3451cc8c64fSmrg# Of course, Automake must honor this variable whenever it calls a
3461cc8c64fSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
3471cc8c64fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
3481cc8c64fSmrg# depending on how configure is run.  This is pretty annoying, since
3491cc8c64fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
3501cc8c64fSmrg# source directory, any form will work fine, but in subdirectories a
3511cc8c64fSmrg# relative path needs to be adjusted first.
3521cc8c64fSmrg#
3531cc8c64fSmrg# $ac_aux_dir/missing
3541cc8c64fSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
3551cc8c64fSmrg# $top_srcdir/$ac_aux_dir/missing
3561cc8c64fSmrg#    fails if $ac_aux_dir is absolute,
3571cc8c64fSmrg#    fails when called from a subdirectory in a VPATH build with
3581cc8c64fSmrg#          a relative $ac_aux_dir
3591cc8c64fSmrg#
3601cc8c64fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3611cc8c64fSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
3621cc8c64fSmrg# harmless because $srcdir is `.', but things will broke when you
3631cc8c64fSmrg# start a VPATH build or use an absolute $srcdir.
3641cc8c64fSmrg#
3651cc8c64fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3661cc8c64fSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
3671cc8c64fSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3681cc8c64fSmrg# and then we would define $MISSING as
3691cc8c64fSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
3701cc8c64fSmrg# This will work as long as MISSING is not called from configure, because
3711cc8c64fSmrg# unfortunately $(top_srcdir) has no meaning in configure.
3721cc8c64fSmrg# However there are other variables, like CC, which are often used in
3731cc8c64fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
3741cc8c64fSmrg#
3751cc8c64fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
3761cc8c64fSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
3771cc8c64fSmrg# configured tree to be moved without reconfiguration.
3781cc8c64fSmrg
3791cc8c64fSmrg# Rely on autoconf to set up CDPATH properly.
3801cc8c64fSmrgAC_PREREQ([2.50])
3811cc8c64fSmrg
3821cc8c64fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [
3831cc8c64fSmrg# expand $ac_aux_dir to an absolute path
3841cc8c64fSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
3851cc8c64fSmrg])
3861cc8c64fSmrg
3871cc8c64fSmrg# AM_PROG_INSTALL_SH
3881cc8c64fSmrg# ------------------
3891cc8c64fSmrg# Define $install_sh.
3901cc8c64fSmrg
3911cc8c64fSmrg# Copyright 2001 Free Software Foundation, Inc.
3921cc8c64fSmrg
3931cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
3941cc8c64fSmrg# it under the terms of the GNU General Public License as published by
3951cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
3961cc8c64fSmrg# any later version.
3971cc8c64fSmrg
3981cc8c64fSmrg# This program is distributed in the hope that it will be useful,
3991cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4001cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4011cc8c64fSmrg# GNU General Public License for more details.
4021cc8c64fSmrg
4031cc8c64fSmrg# You should have received a copy of the GNU General Public License
4041cc8c64fSmrg# along with this program; if not, write to the Free Software
4051cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4061cc8c64fSmrg# 02111-1307, USA.
4071cc8c64fSmrg
4081cc8c64fSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
4091cc8c64fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4101cc8c64fSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
4111cc8c64fSmrgAC_SUBST(install_sh)])
4121cc8c64fSmrg
4131cc8c64fSmrg# AM_PROG_INSTALL_STRIP
4141cc8c64fSmrg
4151cc8c64fSmrg# Copyright 2001 Free Software Foundation, Inc.
4161cc8c64fSmrg
4171cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
4181cc8c64fSmrg# it under the terms of the GNU General Public License as published by
4191cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
4201cc8c64fSmrg# any later version.
4211cc8c64fSmrg
4221cc8c64fSmrg# This program is distributed in the hope that it will be useful,
4231cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4241cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4251cc8c64fSmrg# GNU General Public License for more details.
4261cc8c64fSmrg
4271cc8c64fSmrg# You should have received a copy of the GNU General Public License
4281cc8c64fSmrg# along with this program; if not, write to the Free Software
4291cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4301cc8c64fSmrg# 02111-1307, USA.
4311cc8c64fSmrg
4321cc8c64fSmrg# One issue with vendor `install' (even GNU) is that you can't
4331cc8c64fSmrg# specify the program used to strip binaries.  This is especially
4341cc8c64fSmrg# annoying in cross-compiling environments, where the build's strip
4351cc8c64fSmrg# is unlikely to handle the host's binaries.
4361cc8c64fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
4371cc8c64fSmrg# always use install-sh in `make install-strip', and initialize
4381cc8c64fSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
4391cc8c64fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
4401cc8c64fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4411cc8c64fSmrg# Installed binaries are usually stripped using `strip' when the user
4421cc8c64fSmrg# run `make install-strip'.  However `strip' might not be the right
4431cc8c64fSmrg# tool to use in cross-compilation environments, therefore Automake
4441cc8c64fSmrg# will honor the `STRIP' environment variable to overrule this program.
4451cc8c64fSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4461cc8c64fSmrgif test "$cross_compiling" != no; then
4471cc8c64fSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
4481cc8c64fSmrgfi
4491cc8c64fSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
4501cc8c64fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
4511cc8c64fSmrg
4521cc8c64fSmrg#                                                          -*- Autoconf -*-
4531cc8c64fSmrg# Copyright (C) 2003  Free Software Foundation, Inc.
4541cc8c64fSmrg
4551cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
4561cc8c64fSmrg# it under the terms of the GNU General Public License as published by
4571cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
4581cc8c64fSmrg# any later version.
4591cc8c64fSmrg
4601cc8c64fSmrg# This program is distributed in the hope that it will be useful,
4611cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4621cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4631cc8c64fSmrg# GNU General Public License for more details.
4641cc8c64fSmrg
4651cc8c64fSmrg# You should have received a copy of the GNU General Public License
4661cc8c64fSmrg# along with this program; if not, write to the Free Software
4671cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4681cc8c64fSmrg# 02111-1307, USA.
4691cc8c64fSmrg
4701cc8c64fSmrg# serial 1
4711cc8c64fSmrg
4721cc8c64fSmrg# Check whether the underlying file-system supports filenames
4731cc8c64fSmrg# with a leading dot.  For instance MS-DOS doesn't.
4741cc8c64fSmrgAC_DEFUN([AM_SET_LEADING_DOT],
4751cc8c64fSmrg[rm -rf .tst 2>/dev/null
4761cc8c64fSmrgmkdir .tst 2>/dev/null
4771cc8c64fSmrgif test -d .tst; then
4781cc8c64fSmrg  am__leading_dot=.
4791cc8c64fSmrgelse
4801cc8c64fSmrg  am__leading_dot=_
4811cc8c64fSmrgfi
4821cc8c64fSmrgrmdir .tst 2>/dev/null
4831cc8c64fSmrgAC_SUBST([am__leading_dot])])
4841cc8c64fSmrg
4851cc8c64fSmrg# serial 5						-*- Autoconf -*-
4861cc8c64fSmrg
4871cc8c64fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
4881cc8c64fSmrg
4891cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
4901cc8c64fSmrg# it under the terms of the GNU General Public License as published by
4911cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
4921cc8c64fSmrg# any later version.
4931cc8c64fSmrg
4941cc8c64fSmrg# This program is distributed in the hope that it will be useful,
4951cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4961cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4971cc8c64fSmrg# GNU General Public License for more details.
4981cc8c64fSmrg
4991cc8c64fSmrg# You should have received a copy of the GNU General Public License
5001cc8c64fSmrg# along with this program; if not, write to the Free Software
5011cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
5021cc8c64fSmrg# 02111-1307, USA.
5031cc8c64fSmrg
5041cc8c64fSmrg
5051cc8c64fSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
5061cc8c64fSmrg# written in clear, in which case automake, when reading aclocal.m4,
5071cc8c64fSmrg# will think it sees a *use*, and therefore will trigger all it's
5081cc8c64fSmrg# C support machinery.  Also note that it means that autoscan, seeing
5091cc8c64fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
5101cc8c64fSmrg
5111cc8c64fSmrg
5121cc8c64fSmrg
5131cc8c64fSmrg# _AM_DEPENDENCIES(NAME)
5141cc8c64fSmrg# ----------------------
5151cc8c64fSmrg# See how the compiler implements dependency checking.
5161cc8c64fSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
5171cc8c64fSmrg# We try a few techniques and use that to set a single cache variable.
5181cc8c64fSmrg#
5191cc8c64fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
5201cc8c64fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
5211cc8c64fSmrg# dependency, and given that the user is not expected to run this macro,
5221cc8c64fSmrg# just rely on AC_PROG_CC.
5231cc8c64fSmrgAC_DEFUN([_AM_DEPENDENCIES],
5241cc8c64fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
5251cc8c64fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
5261cc8c64fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
5271cc8c64fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
5281cc8c64fSmrg
5291cc8c64fSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
5301cc8c64fSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
5311cc8c64fSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
5321cc8c64fSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
5331cc8c64fSmrg                   [depcc="$$1"   am_compiler_list=])
5341cc8c64fSmrg
5351cc8c64fSmrgAC_CACHE_CHECK([dependency style of $depcc],
5361cc8c64fSmrg               [am_cv_$1_dependencies_compiler_type],
5371cc8c64fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5381cc8c64fSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
5391cc8c64fSmrg  # making bogus files that we don't know about and never remove.  For
5401cc8c64fSmrg  # instance it was reported that on HP-UX the gcc test will end up
5411cc8c64fSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
5421cc8c64fSmrg  # in D'.
5431cc8c64fSmrg  mkdir conftest.dir
5441cc8c64fSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
5451cc8c64fSmrg  # using a relative directory.
5461cc8c64fSmrg  cp "$am_depcomp" conftest.dir
5471cc8c64fSmrg  cd conftest.dir
5481cc8c64fSmrg  # We will build objects and dependencies in a subdirectory because
5491cc8c64fSmrg  # it helps to detect inapplicable dependency modes.  For instance
5501cc8c64fSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
5511cc8c64fSmrg  # side effect of compilation, but ICC will put the dependencies in
5521cc8c64fSmrg  # the current directory while Tru64 will put them in the object
5531cc8c64fSmrg  # directory.
5541cc8c64fSmrg  mkdir sub
5551cc8c64fSmrg
5561cc8c64fSmrg  am_cv_$1_dependencies_compiler_type=none
5571cc8c64fSmrg  if test "$am_compiler_list" = ""; then
5581cc8c64fSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
5591cc8c64fSmrg  fi
5601cc8c64fSmrg  for depmode in $am_compiler_list; do
5611cc8c64fSmrg    # Setup a source with many dependencies, because some compilers
5621cc8c64fSmrg    # like to wrap large dependency lists on column 80 (with \), and
5631cc8c64fSmrg    # we should not choose a depcomp mode which is confused by this.
5641cc8c64fSmrg    #
5651cc8c64fSmrg    # We need to recreate these files for each test, as the compiler may
5661cc8c64fSmrg    # overwrite some of them when testing with obscure command lines.
5671cc8c64fSmrg    # This happens at least with the AIX C compiler.
5681cc8c64fSmrg    : > sub/conftest.c
5691cc8c64fSmrg    for i in 1 2 3 4 5 6; do
5701cc8c64fSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5711cc8c64fSmrg      : > sub/conftst$i.h
5721cc8c64fSmrg    done
5731cc8c64fSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5741cc8c64fSmrg
5751cc8c64fSmrg    case $depmode in
5761cc8c64fSmrg    nosideeffect)
5771cc8c64fSmrg      # after this tag, mechanisms are not by side-effect, so they'll
5781cc8c64fSmrg      # only be used when explicitly requested
5791cc8c64fSmrg      if test "x$enable_dependency_tracking" = xyes; then
5801cc8c64fSmrg	continue
5811cc8c64fSmrg      else
5821cc8c64fSmrg	break
5831cc8c64fSmrg      fi
5841cc8c64fSmrg      ;;
5851cc8c64fSmrg    none) break ;;
5861cc8c64fSmrg    esac
5871cc8c64fSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
5881cc8c64fSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
5891cc8c64fSmrg    # handle `-M -o', and we need to detect this.
5901cc8c64fSmrg    if depmode=$depmode \
5911cc8c64fSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5921cc8c64fSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5931cc8c64fSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5941cc8c64fSmrg         >/dev/null 2>conftest.err &&
5951cc8c64fSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5961cc8c64fSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5971cc8c64fSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5981cc8c64fSmrg      # icc doesn't choke on unknown options, it will just issue warnings
5991cc8c64fSmrg      # (even with -Werror).  So we grep stderr for any message
6001cc8c64fSmrg      # that says an option was ignored.
6011cc8c64fSmrg      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
6021cc8c64fSmrg        am_cv_$1_dependencies_compiler_type=$depmode
6031cc8c64fSmrg        break
6041cc8c64fSmrg      fi
6051cc8c64fSmrg    fi
6061cc8c64fSmrg  done
6071cc8c64fSmrg
6081cc8c64fSmrg  cd ..
6091cc8c64fSmrg  rm -rf conftest.dir
6101cc8c64fSmrgelse
6111cc8c64fSmrg  am_cv_$1_dependencies_compiler_type=none
6121cc8c64fSmrgfi
6131cc8c64fSmrg])
6141cc8c64fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6151cc8c64fSmrgAM_CONDITIONAL([am__fastdep$1], [
6161cc8c64fSmrg  test "x$enable_dependency_tracking" != xno \
6171cc8c64fSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6181cc8c64fSmrg])
6191cc8c64fSmrg
6201cc8c64fSmrg
6211cc8c64fSmrg# AM_SET_DEPDIR
6221cc8c64fSmrg# -------------
6231cc8c64fSmrg# Choose a directory name for dependency files.
6241cc8c64fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6251cc8c64fSmrgAC_DEFUN([AM_SET_DEPDIR],
6261cc8c64fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6271cc8c64fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6281cc8c64fSmrg])
6291cc8c64fSmrg
6301cc8c64fSmrg
6311cc8c64fSmrg# AM_DEP_TRACK
6321cc8c64fSmrg# ------------
6331cc8c64fSmrgAC_DEFUN([AM_DEP_TRACK],
6341cc8c64fSmrg[AC_ARG_ENABLE(dependency-tracking,
6351cc8c64fSmrg[  --disable-dependency-tracking Speeds up one-time builds
6361cc8c64fSmrg  --enable-dependency-tracking  Do not reject slow dependency extractors])
6371cc8c64fSmrgif test "x$enable_dependency_tracking" != xno; then
6381cc8c64fSmrg  am_depcomp="$ac_aux_dir/depcomp"
6391cc8c64fSmrg  AMDEPBACKSLASH='\'
6401cc8c64fSmrgfi
6411cc8c64fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6421cc8c64fSmrgAC_SUBST([AMDEPBACKSLASH])
6431cc8c64fSmrg])
6441cc8c64fSmrg
6451cc8c64fSmrg# Generate code to set up dependency tracking.   -*- Autoconf -*-
6461cc8c64fSmrg
6471cc8c64fSmrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6481cc8c64fSmrg
6491cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
6501cc8c64fSmrg# it under the terms of the GNU General Public License as published by
6511cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
6521cc8c64fSmrg# any later version.
6531cc8c64fSmrg
6541cc8c64fSmrg# This program is distributed in the hope that it will be useful,
6551cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
6561cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6571cc8c64fSmrg# GNU General Public License for more details.
6581cc8c64fSmrg
6591cc8c64fSmrg# You should have received a copy of the GNU General Public License
6601cc8c64fSmrg# along with this program; if not, write to the Free Software
6611cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6621cc8c64fSmrg# 02111-1307, USA.
6631cc8c64fSmrg
6641cc8c64fSmrg#serial 2
6651cc8c64fSmrg
6661cc8c64fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
6671cc8c64fSmrg# ------------------------------
6681cc8c64fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6691cc8c64fSmrg[for mf in $CONFIG_FILES; do
6701cc8c64fSmrg  # Strip MF so we end up with the name of the file.
6711cc8c64fSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
6721cc8c64fSmrg  # Check whether this is an Automake generated Makefile or not.
6731cc8c64fSmrg  # We used to match only the files named `Makefile.in', but
6741cc8c64fSmrg  # some people rename them; so instead we look at the file content.
6751cc8c64fSmrg  # Grep'ing the first line is not enough: some people post-process
6761cc8c64fSmrg  # each Makefile.in and add a new line on top of each file to say so.
6771cc8c64fSmrg  # So let's grep whole file.
6781cc8c64fSmrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6791cc8c64fSmrg    dirpart=`AS_DIRNAME("$mf")`
6801cc8c64fSmrg  else
6811cc8c64fSmrg    continue
6821cc8c64fSmrg  fi
6831cc8c64fSmrg  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
6841cc8c64fSmrg  # Extract the definition of DEP_FILES from the Makefile without
6851cc8c64fSmrg  # running `make'.
6861cc8c64fSmrg  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
6871cc8c64fSmrg  test -z "$DEPDIR" && continue
6881cc8c64fSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
6891cc8c64fSmrg  U=`sed -n -e '/^U = / s///p' < "$mf"`
6901cc8c64fSmrg  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6911cc8c64fSmrg  # We invoke sed twice because it is the simplest approach to
6921cc8c64fSmrg  # changing $(DEPDIR) to its actual value in the expansion.
6931cc8c64fSmrg  for file in `sed -n -e '
6941cc8c64fSmrg    /^DEP_FILES = .*\\\\$/ {
6951cc8c64fSmrg      s/^DEP_FILES = //
6961cc8c64fSmrg      :loop
6971cc8c64fSmrg	s/\\\\$//
6981cc8c64fSmrg	p
6991cc8c64fSmrg	n
7001cc8c64fSmrg	/\\\\$/ b loop
7011cc8c64fSmrg      p
7021cc8c64fSmrg    }
7031cc8c64fSmrg    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7041cc8c64fSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7051cc8c64fSmrg    # Make sure the directory exists.
7061cc8c64fSmrg    test -f "$dirpart/$file" && continue
7071cc8c64fSmrg    fdir=`AS_DIRNAME(["$file"])`
7081cc8c64fSmrg    AS_MKDIR_P([$dirpart/$fdir])
7091cc8c64fSmrg    # echo "creating $dirpart/$file"
7101cc8c64fSmrg    echo '# dummy' > "$dirpart/$file"
7111cc8c64fSmrg  done
7121cc8c64fSmrgdone
7131cc8c64fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7141cc8c64fSmrg
7151cc8c64fSmrg
7161cc8c64fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
7171cc8c64fSmrg# -----------------------------
7181cc8c64fSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
7191cc8c64fSmrg#
7201cc8c64fSmrg# This code is only required when automatic dependency tracking
7211cc8c64fSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
7221cc8c64fSmrg# need in order to bootstrap the dependency handling code.
7231cc8c64fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7241cc8c64fSmrg[AC_CONFIG_COMMANDS([depfiles],
7251cc8c64fSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7261cc8c64fSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7271cc8c64fSmrg])
7281cc8c64fSmrg
7291cc8c64fSmrg# Check to see how 'make' treats includes.	-*- Autoconf -*-
7301cc8c64fSmrg
7311cc8c64fSmrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7321cc8c64fSmrg
7331cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
7341cc8c64fSmrg# it under the terms of the GNU General Public License as published by
7351cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
7361cc8c64fSmrg# any later version.
7371cc8c64fSmrg
7381cc8c64fSmrg# This program is distributed in the hope that it will be useful,
7391cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
7401cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7411cc8c64fSmrg# GNU General Public License for more details.
7421cc8c64fSmrg
7431cc8c64fSmrg# You should have received a copy of the GNU General Public License
7441cc8c64fSmrg# along with this program; if not, write to the Free Software
7451cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7461cc8c64fSmrg# 02111-1307, USA.
7471cc8c64fSmrg
7481cc8c64fSmrg# serial 2
7491cc8c64fSmrg
7501cc8c64fSmrg# AM_MAKE_INCLUDE()
7511cc8c64fSmrg# -----------------
7521cc8c64fSmrg# Check to see how make treats includes.
7531cc8c64fSmrgAC_DEFUN([AM_MAKE_INCLUDE],
7541cc8c64fSmrg[am_make=${MAKE-make}
7551cc8c64fSmrgcat > confinc << 'END'
7561cc8c64fSmrgam__doit:
7571cc8c64fSmrg	@echo done
7581cc8c64fSmrg.PHONY: am__doit
7591cc8c64fSmrgEND
7601cc8c64fSmrg# If we don't find an include directive, just comment out the code.
7611cc8c64fSmrgAC_MSG_CHECKING([for style of include used by $am_make])
7621cc8c64fSmrgam__include="#"
7631cc8c64fSmrgam__quote=
7641cc8c64fSmrg_am_result=none
7651cc8c64fSmrg# First try GNU make style include.
7661cc8c64fSmrgecho "include confinc" > confmf
7671cc8c64fSmrg# We grep out `Entering directory' and `Leaving directory'
7681cc8c64fSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
7691cc8c64fSmrg# In particular we don't look at `^make:' because GNU make might
7701cc8c64fSmrg# be invoked under some other name (usually "gmake"), in which
7711cc8c64fSmrg# case it prints its new name instead of `make'.
7721cc8c64fSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7731cc8c64fSmrg   am__include=include
7741cc8c64fSmrg   am__quote=
7751cc8c64fSmrg   _am_result=GNU
7761cc8c64fSmrgfi
7771cc8c64fSmrg# Now try BSD make style include.
7781cc8c64fSmrgif test "$am__include" = "#"; then
7791cc8c64fSmrg   echo '.include "confinc"' > confmf
7801cc8c64fSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7811cc8c64fSmrg      am__include=.include
7821cc8c64fSmrg      am__quote="\""
7831cc8c64fSmrg      _am_result=BSD
7841cc8c64fSmrg   fi
7851cc8c64fSmrgfi
7861cc8c64fSmrgAC_SUBST([am__include])
7871cc8c64fSmrgAC_SUBST([am__quote])
7881cc8c64fSmrgAC_MSG_RESULT([$_am_result])
7891cc8c64fSmrgrm -f confinc confmf
7901cc8c64fSmrg])
7911cc8c64fSmrg
7921cc8c64fSmrg# AM_CONDITIONAL                                              -*- Autoconf -*-
7931cc8c64fSmrg
7941cc8c64fSmrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
7951cc8c64fSmrg
7961cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
7971cc8c64fSmrg# it under the terms of the GNU General Public License as published by
7981cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
7991cc8c64fSmrg# any later version.
8001cc8c64fSmrg
8011cc8c64fSmrg# This program is distributed in the hope that it will be useful,
8021cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8031cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8041cc8c64fSmrg# GNU General Public License for more details.
8051cc8c64fSmrg
8061cc8c64fSmrg# You should have received a copy of the GNU General Public License
8071cc8c64fSmrg# along with this program; if not, write to the Free Software
8081cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8091cc8c64fSmrg# 02111-1307, USA.
8101cc8c64fSmrg
8111cc8c64fSmrg# serial 5
8121cc8c64fSmrg
8131cc8c64fSmrgAC_PREREQ(2.52)
8141cc8c64fSmrg
8151cc8c64fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8161cc8c64fSmrg# -------------------------------------
8171cc8c64fSmrg# Define a conditional.
8181cc8c64fSmrgAC_DEFUN([AM_CONDITIONAL],
8191cc8c64fSmrg[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8201cc8c64fSmrg        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8211cc8c64fSmrgAC_SUBST([$1_TRUE])
8221cc8c64fSmrgAC_SUBST([$1_FALSE])
8231cc8c64fSmrgif $2; then
8241cc8c64fSmrg  $1_TRUE=
8251cc8c64fSmrg  $1_FALSE='#'
8261cc8c64fSmrgelse
8271cc8c64fSmrg  $1_TRUE='#'
8281cc8c64fSmrg  $1_FALSE=
8291cc8c64fSmrgfi
8301cc8c64fSmrgAC_CONFIG_COMMANDS_PRE(
8311cc8c64fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8321cc8c64fSmrg  AC_MSG_ERROR([conditional "$1" was never defined.
8331cc8c64fSmrgUsually this means the macro was only invoked conditionally.])
8341cc8c64fSmrgfi])])
8351cc8c64fSmrg
8361cc8c64fSmrg# Add --enable-maintainer-mode option to configure.
8371cc8c64fSmrg# From Jim Meyering
8381cc8c64fSmrg
8391cc8c64fSmrg# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
8401cc8c64fSmrg
8411cc8c64fSmrg# This program is free software; you can redistribute it and/or modify
8421cc8c64fSmrg# it under the terms of the GNU General Public License as published by
8431cc8c64fSmrg# the Free Software Foundation; either version 2, or (at your option)
8441cc8c64fSmrg# any later version.
8451cc8c64fSmrg
8461cc8c64fSmrg# This program is distributed in the hope that it will be useful,
8471cc8c64fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8481cc8c64fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8491cc8c64fSmrg# GNU General Public License for more details.
8501cc8c64fSmrg
8511cc8c64fSmrg# You should have received a copy of the GNU General Public License
8521cc8c64fSmrg# along with this program; if not, write to the Free Software
8531cc8c64fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8541cc8c64fSmrg# 02111-1307, USA.
8551cc8c64fSmrg
8561cc8c64fSmrg# serial 2
8571cc8c64fSmrg
8581cc8c64fSmrgAC_DEFUN([AM_MAINTAINER_MODE],
8591cc8c64fSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
8601cc8c64fSmrg  dnl maintainer-mode is disabled by default
8611cc8c64fSmrg  AC_ARG_ENABLE(maintainer-mode,
8621cc8c64fSmrg[  --enable-maintainer-mode enable make rules and dependencies not useful
8631cc8c64fSmrg                          (and sometimes confusing) to the casual installer],
8641cc8c64fSmrg      USE_MAINTAINER_MODE=$enableval,
8651cc8c64fSmrg      USE_MAINTAINER_MODE=no)
8661cc8c64fSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8671cc8c64fSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
8681cc8c64fSmrg  MAINT=$MAINTAINER_MODE_TRUE
8691cc8c64fSmrg  AC_SUBST(MAINT)dnl
8701cc8c64fSmrg]
8711cc8c64fSmrg)
8721cc8c64fSmrg
8731cc8c64fSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8741cc8c64fSmrg
8751cc8c64fSmrgdnl Copyright 2005 Red Hat, Inc
8761cc8c64fSmrgdnl
8771cc8c64fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
8781cc8c64fSmrgdnl documentation for any purpose is hereby granted without fee, provided that
8791cc8c64fSmrgdnl the above copyright notice appear in all copies and that both that
8801cc8c64fSmrgdnl copyright notice and this permission notice appear in supporting
8811cc8c64fSmrgdnl documentation.
8821cc8c64fSmrgdnl
8831cc8c64fSmrgdnl The above copyright notice and this permission notice shall be included
8841cc8c64fSmrgdnl in all copies or substantial portions of the Software.
8851cc8c64fSmrgdnl
8861cc8c64fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8871cc8c64fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8881cc8c64fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
8891cc8c64fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
8901cc8c64fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
8911cc8c64fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8921cc8c64fSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
8931cc8c64fSmrgdnl
8941cc8c64fSmrgdnl Except as contained in this notice, the name of the copyright holders shall
8951cc8c64fSmrgdnl not be used in advertising or otherwise to promote the sale, use or
8961cc8c64fSmrgdnl other dealings in this Software without prior written authorization
8971cc8c64fSmrgdnl from the copyright holders.
8981cc8c64fSmrgdnl
8991cc8c64fSmrg
9001cc8c64fSmrg# XORG_RELEASE_VERSION
9011cc8c64fSmrg# --------------------
9021cc8c64fSmrg# Adds --with/without-release-string and changes the PACKAGE and
9031cc8c64fSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
9041cc8c64fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
9051cc8c64fSmrg 
9061cc8c64fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
9071cc8c64fSmrg	AC_ARG_WITH(release-version,
9081cc8c64fSmrg			AC_HELP_STRING([--with-release-version=STRING],
9091cc8c64fSmrg				[Use release version string in package name]),
9101cc8c64fSmrg			[RELEASE_VERSION="$withval"],
9111cc8c64fSmrg			[RELEASE_VERSION=""])
9121cc8c64fSmrg	if test "x$RELEASE_VERSION" != "x"; then
9131cc8c64fSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
9141cc8c64fSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
9151cc8c64fSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
9161cc8c64fSmrg	fi
9171cc8c64fSmrg])
9181cc8c64fSmrg
919