aclocal.m4 revision 98049353
198049353Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
298049353Smrg
398049353Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
498049353Smrg# Free Software Foundation, Inc.
598049353Smrg# This file is free software; the Free Software Foundation
698049353Smrg# gives unlimited permission to copy and/or distribute it,
798049353Smrg# with or without modifications, as long as this notice is preserved.
898049353Smrg
998049353Smrg# This program is distributed in the hope that it will be useful,
1098049353Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1198049353Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1298049353Smrg# PARTICULAR PURPOSE.
1398049353Smrg
1498049353Smrg# Do all the work for Automake.                            -*- Autoconf -*-
1598049353Smrg
1698049353Smrg# This macro actually does too much some checks are only needed if
1798049353Smrg# your package does certain things.  But this isn't really a big deal.
1898049353Smrg
1998049353Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
2098049353Smrg# Free Software Foundation, Inc.
2198049353Smrg
2298049353Smrg# This program is free software; you can redistribute it and/or modify
2398049353Smrg# it under the terms of the GNU General Public License as published by
2498049353Smrg# the Free Software Foundation; either version 2, or (at your option)
2598049353Smrg# any later version.
2698049353Smrg
2798049353Smrg# This program is distributed in the hope that it will be useful,
2898049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2998049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3098049353Smrg# GNU General Public License for more details.
3198049353Smrg
3298049353Smrg# You should have received a copy of the GNU General Public License
3398049353Smrg# along with this program; if not, write to the Free Software
3498049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3598049353Smrg# 02111-1307, USA.
3698049353Smrg
3798049353Smrg# serial 10
3898049353Smrg
3998049353SmrgAC_PREREQ([2.54])
4098049353Smrg
4198049353Smrg# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
4298049353Smrg# the ones we care about.
4398049353Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4498049353Smrg
4598049353Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4698049353Smrg# AM_INIT_AUTOMAKE([OPTIONS])
4798049353Smrg# -----------------------------------------------
4898049353Smrg# The call with PACKAGE and VERSION arguments is the old style
4998049353Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
5098049353Smrg# and VERSION should now be passed to AC_INIT and removed from
5198049353Smrg# the call to AM_INIT_AUTOMAKE.
5298049353Smrg# We support both call styles for the transition.  After
5398049353Smrg# the next Automake release, Autoconf can make the AC_INIT
5498049353Smrg# arguments mandatory, and then we can depend on a new Autoconf
5598049353Smrg# release and drop the old call support.
5698049353SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
5798049353Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
5898049353Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl
5998049353Smrg# test to see if srcdir already configured
6098049353Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
6198049353Smrg   test -f $srcdir/config.status; then
6298049353Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6398049353Smrgfi
6498049353Smrg
6598049353Smrg# test whether we have cygpath
6698049353Smrgif test -z "$CYGPATH_W"; then
6798049353Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
6898049353Smrg    CYGPATH_W='cygpath -w'
6998049353Smrg  else
7098049353Smrg    CYGPATH_W=echo
7198049353Smrg  fi
7298049353Smrgfi
7398049353SmrgAC_SUBST([CYGPATH_W])
7498049353Smrg
7598049353Smrg# Define the identity of the package.
7698049353Smrgdnl Distinguish between old-style and new-style calls.
7798049353Smrgm4_ifval([$2],
7898049353Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7998049353Smrg AC_SUBST([PACKAGE], [$1])dnl
8098049353Smrg AC_SUBST([VERSION], [$2])],
8198049353Smrg[_AM_SET_OPTIONS([$1])dnl
8298049353Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8398049353Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8498049353Smrg
8598049353Smrg_AM_IF_OPTION([no-define],,
8698049353Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8798049353Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8898049353Smrg
8998049353Smrg# Some tools Automake needs.
9098049353SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
9198049353SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
9298049353SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9398049353SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
9498049353SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9598049353SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
9698049353SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
9798049353SmrgAM_MISSING_PROG(AMTAR, tar)
9898049353SmrgAM_PROG_INSTALL_SH
9998049353SmrgAM_PROG_INSTALL_STRIP
10098049353Smrg# We need awk for the "check" target.  The system "awk" is bad on
10198049353Smrg# some platforms.
10298049353SmrgAC_REQUIRE([AC_PROG_AWK])dnl
10398049353SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
10498049353SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
10598049353Smrg
10698049353Smrg_AM_IF_OPTION([no-dependencies],,
10798049353Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
10898049353Smrg                  [_AM_DEPENDENCIES(CC)],
10998049353Smrg                  [define([AC_PROG_CC],
11098049353Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
11198049353SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
11298049353Smrg                  [_AM_DEPENDENCIES(CXX)],
11398049353Smrg                  [define([AC_PROG_CXX],
11498049353Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11598049353Smrg])
11698049353Smrg])
11798049353Smrg
11898049353Smrg
11998049353Smrg# When config.status generates a header, we must update the stamp-h file.
12098049353Smrg# This file resides in the same directory as the config header
12198049353Smrg# that is generated.  The stamp files are numbered to have different names.
12298049353Smrg
12398049353Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
12498049353Smrg# loop where config.status creates the headers, so we can generate
12598049353Smrg# our stamp files there.
12698049353SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
12798049353Smrg[# Compute $1's index in $config_headers.
12898049353Smrg_am_stamp_count=1
12998049353Smrgfor _am_header in $config_headers :; do
13098049353Smrg  case $_am_header in
13198049353Smrg    $1 | $1:* )
13298049353Smrg      break ;;
13398049353Smrg    * )
13498049353Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
13598049353Smrg  esac
13698049353Smrgdone
13798049353Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
13898049353Smrg
13998049353Smrg# Copyright 2002  Free Software Foundation, Inc.
14098049353Smrg
14198049353Smrg# This program is free software; you can redistribute it and/or modify
14298049353Smrg# it under the terms of the GNU General Public License as published by
14398049353Smrg# the Free Software Foundation; either version 2, or (at your option)
14498049353Smrg# any later version.
14598049353Smrg
14698049353Smrg# This program is distributed in the hope that it will be useful,
14798049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
14898049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14998049353Smrg# GNU General Public License for more details.
15098049353Smrg
15198049353Smrg# You should have received a copy of the GNU General Public License
15298049353Smrg# along with this program; if not, write to the Free Software
15398049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
15498049353Smrg
15598049353Smrg# AM_AUTOMAKE_VERSION(VERSION)
15698049353Smrg# ----------------------------
15798049353Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
15898049353Smrg# generated from the m4 files accompanying Automake X.Y.
15998049353SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
16098049353Smrg
16198049353Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
16298049353Smrg# -------------------------------
16398049353Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
16498049353Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
16598049353SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
16698049353Smrg	 [AM_AUTOMAKE_VERSION([1.7.9])])
16798049353Smrg
16898049353Smrg# Helper functions for option handling.                    -*- Autoconf -*-
16998049353Smrg
17098049353Smrg# Copyright 2001, 2002  Free Software Foundation, Inc.
17198049353Smrg
17298049353Smrg# This program is free software; you can redistribute it and/or modify
17398049353Smrg# it under the terms of the GNU General Public License as published by
17498049353Smrg# the Free Software Foundation; either version 2, or (at your option)
17598049353Smrg# any later version.
17698049353Smrg
17798049353Smrg# This program is distributed in the hope that it will be useful,
17898049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
17998049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18098049353Smrg# GNU General Public License for more details.
18198049353Smrg
18298049353Smrg# You should have received a copy of the GNU General Public License
18398049353Smrg# along with this program; if not, write to the Free Software
18498049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18598049353Smrg# 02111-1307, USA.
18698049353Smrg
18798049353Smrg# serial 2
18898049353Smrg
18998049353Smrg# _AM_MANGLE_OPTION(NAME)
19098049353Smrg# -----------------------
19198049353SmrgAC_DEFUN([_AM_MANGLE_OPTION],
19298049353Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
19398049353Smrg
19498049353Smrg# _AM_SET_OPTION(NAME)
19598049353Smrg# ------------------------------
19698049353Smrg# Set option NAME.  Presently that only means defining a flag for this option.
19798049353SmrgAC_DEFUN([_AM_SET_OPTION],
19898049353Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
19998049353Smrg
20098049353Smrg# _AM_SET_OPTIONS(OPTIONS)
20198049353Smrg# ----------------------------------
20298049353Smrg# OPTIONS is a space-separated list of Automake options.
20398049353SmrgAC_DEFUN([_AM_SET_OPTIONS],
20498049353Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
20598049353Smrg
20698049353Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
20798049353Smrg# -------------------------------------------
20898049353Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
20998049353SmrgAC_DEFUN([_AM_IF_OPTION],
21098049353Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
21198049353Smrg
21298049353Smrg#
21398049353Smrg# Check to make sure that the build environment is sane.
21498049353Smrg#
21598049353Smrg
21698049353Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
21798049353Smrg
21898049353Smrg# This program is free software; you can redistribute it and/or modify
21998049353Smrg# it under the terms of the GNU General Public License as published by
22098049353Smrg# the Free Software Foundation; either version 2, or (at your option)
22198049353Smrg# any later version.
22298049353Smrg
22398049353Smrg# This program is distributed in the hope that it will be useful,
22498049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
22598049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22698049353Smrg# GNU General Public License for more details.
22798049353Smrg
22898049353Smrg# You should have received a copy of the GNU General Public License
22998049353Smrg# along with this program; if not, write to the Free Software
23098049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23198049353Smrg# 02111-1307, USA.
23298049353Smrg
23398049353Smrg# serial 3
23498049353Smrg
23598049353Smrg# AM_SANITY_CHECK
23698049353Smrg# ---------------
23798049353SmrgAC_DEFUN([AM_SANITY_CHECK],
23898049353Smrg[AC_MSG_CHECKING([whether build environment is sane])
23998049353Smrg# Just in case
24098049353Smrgsleep 1
24198049353Smrgecho timestamp > conftest.file
24298049353Smrg# Do `set' in a subshell so we don't clobber the current shell's
24398049353Smrg# arguments.  Must try -L first in case configure is actually a
24498049353Smrg# symlink; some systems play weird games with the mod time of symlinks
24598049353Smrg# (eg FreeBSD returns the mod time of the symlink's containing
24698049353Smrg# directory).
24798049353Smrgif (
24898049353Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
24998049353Smrg   if test "$[*]" = "X"; then
25098049353Smrg      # -L didn't work.
25198049353Smrg      set X `ls -t $srcdir/configure conftest.file`
25298049353Smrg   fi
25398049353Smrg   rm -f conftest.file
25498049353Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
25598049353Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
25698049353Smrg
25798049353Smrg      # If neither matched, then we have a broken ls.  This can happen
25898049353Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
25998049353Smrg      # broken ls alias from the environment.  This has actually
26098049353Smrg      # happened.  Such a system could not be considered "sane".
26198049353Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
26298049353Smrgalias in your environment])
26398049353Smrg   fi
26498049353Smrg
26598049353Smrg   test "$[2]" = conftest.file
26698049353Smrg   )
26798049353Smrgthen
26898049353Smrg   # Ok.
26998049353Smrg   :
27098049353Smrgelse
27198049353Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
27298049353SmrgCheck your system clock])
27398049353Smrgfi
27498049353SmrgAC_MSG_RESULT(yes)])
27598049353Smrg
27698049353Smrg#  -*- Autoconf -*-
27798049353Smrg
27898049353Smrg
27998049353Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
28098049353Smrg
28198049353Smrg# This program is free software; you can redistribute it and/or modify
28298049353Smrg# it under the terms of the GNU General Public License as published by
28398049353Smrg# the Free Software Foundation; either version 2, or (at your option)
28498049353Smrg# any later version.
28598049353Smrg
28698049353Smrg# This program is distributed in the hope that it will be useful,
28798049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
28898049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28998049353Smrg# GNU General Public License for more details.
29098049353Smrg
29198049353Smrg# You should have received a copy of the GNU General Public License
29298049353Smrg# along with this program; if not, write to the Free Software
29398049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
29498049353Smrg# 02111-1307, USA.
29598049353Smrg
29698049353Smrg# serial 3
29798049353Smrg
29898049353Smrg# AM_MISSING_PROG(NAME, PROGRAM)
29998049353Smrg# ------------------------------
30098049353SmrgAC_DEFUN([AM_MISSING_PROG],
30198049353Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
30298049353Smrg$1=${$1-"${am_missing_run}$2"}
30398049353SmrgAC_SUBST($1)])
30498049353Smrg
30598049353Smrg
30698049353Smrg# AM_MISSING_HAS_RUN
30798049353Smrg# ------------------
30898049353Smrg# Define MISSING if not defined so far and test if it supports --run.
30998049353Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
31098049353SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
31198049353Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
31298049353Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
31398049353Smrg# Use eval to expand $SHELL
31498049353Smrgif eval "$MISSING --run true"; then
31598049353Smrg  am_missing_run="$MISSING --run "
31698049353Smrgelse
31798049353Smrg  am_missing_run=
31898049353Smrg  AC_MSG_WARN([`missing' script is too old or missing])
31998049353Smrgfi
32098049353Smrg])
32198049353Smrg
32298049353Smrg# AM_AUX_DIR_EXPAND
32398049353Smrg
32498049353Smrg# Copyright 2001 Free Software Foundation, Inc.
32598049353Smrg
32698049353Smrg# This program is free software; you can redistribute it and/or modify
32798049353Smrg# it under the terms of the GNU General Public License as published by
32898049353Smrg# the Free Software Foundation; either version 2, or (at your option)
32998049353Smrg# any later version.
33098049353Smrg
33198049353Smrg# This program is distributed in the hope that it will be useful,
33298049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
33398049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33498049353Smrg# GNU General Public License for more details.
33598049353Smrg
33698049353Smrg# You should have received a copy of the GNU General Public License
33798049353Smrg# along with this program; if not, write to the Free Software
33898049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
33998049353Smrg# 02111-1307, USA.
34098049353Smrg
34198049353Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
34298049353Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
34398049353Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
34498049353Smrg#
34598049353Smrg# Of course, Automake must honor this variable whenever it calls a
34698049353Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
34798049353Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
34898049353Smrg# depending on how configure is run.  This is pretty annoying, since
34998049353Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
35098049353Smrg# source directory, any form will work fine, but in subdirectories a
35198049353Smrg# relative path needs to be adjusted first.
35298049353Smrg#
35398049353Smrg# $ac_aux_dir/missing
35498049353Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
35598049353Smrg# $top_srcdir/$ac_aux_dir/missing
35698049353Smrg#    fails if $ac_aux_dir is absolute,
35798049353Smrg#    fails when called from a subdirectory in a VPATH build with
35898049353Smrg#          a relative $ac_aux_dir
35998049353Smrg#
36098049353Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
36198049353Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
36298049353Smrg# harmless because $srcdir is `.', but things will broke when you
36398049353Smrg# start a VPATH build or use an absolute $srcdir.
36498049353Smrg#
36598049353Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
36698049353Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
36798049353Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
36898049353Smrg# and then we would define $MISSING as
36998049353Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
37098049353Smrg# This will work as long as MISSING is not called from configure, because
37198049353Smrg# unfortunately $(top_srcdir) has no meaning in configure.
37298049353Smrg# However there are other variables, like CC, which are often used in
37398049353Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
37498049353Smrg#
37598049353Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
37698049353Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
37798049353Smrg# configured tree to be moved without reconfiguration.
37898049353Smrg
37998049353Smrg# Rely on autoconf to set up CDPATH properly.
38098049353SmrgAC_PREREQ([2.50])
38198049353Smrg
38298049353SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [
38398049353Smrg# expand $ac_aux_dir to an absolute path
38498049353Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
38598049353Smrg])
38698049353Smrg
38798049353Smrg# AM_PROG_INSTALL_SH
38898049353Smrg# ------------------
38998049353Smrg# Define $install_sh.
39098049353Smrg
39198049353Smrg# Copyright 2001 Free Software Foundation, Inc.
39298049353Smrg
39398049353Smrg# This program is free software; you can redistribute it and/or modify
39498049353Smrg# it under the terms of the GNU General Public License as published by
39598049353Smrg# the Free Software Foundation; either version 2, or (at your option)
39698049353Smrg# any later version.
39798049353Smrg
39898049353Smrg# This program is distributed in the hope that it will be useful,
39998049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
40098049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
40198049353Smrg# GNU General Public License for more details.
40298049353Smrg
40398049353Smrg# You should have received a copy of the GNU General Public License
40498049353Smrg# along with this program; if not, write to the Free Software
40598049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
40698049353Smrg# 02111-1307, USA.
40798049353Smrg
40898049353SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
40998049353Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
41098049353Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
41198049353SmrgAC_SUBST(install_sh)])
41298049353Smrg
41398049353Smrg# AM_PROG_INSTALL_STRIP
41498049353Smrg
41598049353Smrg# Copyright 2001 Free Software Foundation, Inc.
41698049353Smrg
41798049353Smrg# This program is free software; you can redistribute it and/or modify
41898049353Smrg# it under the terms of the GNU General Public License as published by
41998049353Smrg# the Free Software Foundation; either version 2, or (at your option)
42098049353Smrg# any later version.
42198049353Smrg
42298049353Smrg# This program is distributed in the hope that it will be useful,
42398049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
42498049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42598049353Smrg# GNU General Public License for more details.
42698049353Smrg
42798049353Smrg# You should have received a copy of the GNU General Public License
42898049353Smrg# along with this program; if not, write to the Free Software
42998049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
43098049353Smrg# 02111-1307, USA.
43198049353Smrg
43298049353Smrg# One issue with vendor `install' (even GNU) is that you can't
43398049353Smrg# specify the program used to strip binaries.  This is especially
43498049353Smrg# annoying in cross-compiling environments, where the build's strip
43598049353Smrg# is unlikely to handle the host's binaries.
43698049353Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
43798049353Smrg# always use install-sh in `make install-strip', and initialize
43898049353Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
43998049353SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
44098049353Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
44198049353Smrg# Installed binaries are usually stripped using `strip' when the user
44298049353Smrg# run `make install-strip'.  However `strip' might not be the right
44398049353Smrg# tool to use in cross-compilation environments, therefore Automake
44498049353Smrg# will honor the `STRIP' environment variable to overrule this program.
44598049353Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
44698049353Smrgif test "$cross_compiling" != no; then
44798049353Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
44898049353Smrgfi
44998049353SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
45098049353SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
45198049353Smrg
45298049353Smrg#                                                          -*- Autoconf -*-
45398049353Smrg# Copyright (C) 2003  Free Software Foundation, Inc.
45498049353Smrg
45598049353Smrg# This program is free software; you can redistribute it and/or modify
45698049353Smrg# it under the terms of the GNU General Public License as published by
45798049353Smrg# the Free Software Foundation; either version 2, or (at your option)
45898049353Smrg# any later version.
45998049353Smrg
46098049353Smrg# This program is distributed in the hope that it will be useful,
46198049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
46298049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
46398049353Smrg# GNU General Public License for more details.
46498049353Smrg
46598049353Smrg# You should have received a copy of the GNU General Public License
46698049353Smrg# along with this program; if not, write to the Free Software
46798049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
46898049353Smrg# 02111-1307, USA.
46998049353Smrg
47098049353Smrg# serial 1
47198049353Smrg
47298049353Smrg# Check whether the underlying file-system supports filenames
47398049353Smrg# with a leading dot.  For instance MS-DOS doesn't.
47498049353SmrgAC_DEFUN([AM_SET_LEADING_DOT],
47598049353Smrg[rm -rf .tst 2>/dev/null
47698049353Smrgmkdir .tst 2>/dev/null
47798049353Smrgif test -d .tst; then
47898049353Smrg  am__leading_dot=.
47998049353Smrgelse
48098049353Smrg  am__leading_dot=_
48198049353Smrgfi
48298049353Smrgrmdir .tst 2>/dev/null
48398049353SmrgAC_SUBST([am__leading_dot])])
48498049353Smrg
48598049353Smrg# serial 5						-*- Autoconf -*-
48698049353Smrg
48798049353Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
48898049353Smrg
48998049353Smrg# This program is free software; you can redistribute it and/or modify
49098049353Smrg# it under the terms of the GNU General Public License as published by
49198049353Smrg# the Free Software Foundation; either version 2, or (at your option)
49298049353Smrg# any later version.
49398049353Smrg
49498049353Smrg# This program is distributed in the hope that it will be useful,
49598049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
49698049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
49798049353Smrg# GNU General Public License for more details.
49898049353Smrg
49998049353Smrg# You should have received a copy of the GNU General Public License
50098049353Smrg# along with this program; if not, write to the Free Software
50198049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
50298049353Smrg# 02111-1307, USA.
50398049353Smrg
50498049353Smrg
50598049353Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
50698049353Smrg# written in clear, in which case automake, when reading aclocal.m4,
50798049353Smrg# will think it sees a *use*, and therefore will trigger all it's
50898049353Smrg# C support machinery.  Also note that it means that autoscan, seeing
50998049353Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
51098049353Smrg
51198049353Smrg
51298049353Smrg
51398049353Smrg# _AM_DEPENDENCIES(NAME)
51498049353Smrg# ----------------------
51598049353Smrg# See how the compiler implements dependency checking.
51698049353Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
51798049353Smrg# We try a few techniques and use that to set a single cache variable.
51898049353Smrg#
51998049353Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
52098049353Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
52198049353Smrg# dependency, and given that the user is not expected to run this macro,
52298049353Smrg# just rely on AC_PROG_CC.
52398049353SmrgAC_DEFUN([_AM_DEPENDENCIES],
52498049353Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
52598049353SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
52698049353SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
52798049353SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
52898049353Smrg
52998049353Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
53098049353Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
53198049353Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
53298049353Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
53398049353Smrg                   [depcc="$$1"   am_compiler_list=])
53498049353Smrg
53598049353SmrgAC_CACHE_CHECK([dependency style of $depcc],
53698049353Smrg               [am_cv_$1_dependencies_compiler_type],
53798049353Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
53898049353Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
53998049353Smrg  # making bogus files that we don't know about and never remove.  For
54098049353Smrg  # instance it was reported that on HP-UX the gcc test will end up
54198049353Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
54298049353Smrg  # in D'.
54398049353Smrg  mkdir conftest.dir
54498049353Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
54598049353Smrg  # using a relative directory.
54698049353Smrg  cp "$am_depcomp" conftest.dir
54798049353Smrg  cd conftest.dir
54898049353Smrg  # We will build objects and dependencies in a subdirectory because
54998049353Smrg  # it helps to detect inapplicable dependency modes.  For instance
55098049353Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
55198049353Smrg  # side effect of compilation, but ICC will put the dependencies in
55298049353Smrg  # the current directory while Tru64 will put them in the object
55398049353Smrg  # directory.
55498049353Smrg  mkdir sub
55598049353Smrg
55698049353Smrg  am_cv_$1_dependencies_compiler_type=none
55798049353Smrg  if test "$am_compiler_list" = ""; then
55898049353Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
55998049353Smrg  fi
56098049353Smrg  for depmode in $am_compiler_list; do
56198049353Smrg    # Setup a source with many dependencies, because some compilers
56298049353Smrg    # like to wrap large dependency lists on column 80 (with \), and
56398049353Smrg    # we should not choose a depcomp mode which is confused by this.
56498049353Smrg    #
56598049353Smrg    # We need to recreate these files for each test, as the compiler may
56698049353Smrg    # overwrite some of them when testing with obscure command lines.
56798049353Smrg    # This happens at least with the AIX C compiler.
56898049353Smrg    : > sub/conftest.c
56998049353Smrg    for i in 1 2 3 4 5 6; do
57098049353Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
57198049353Smrg      : > sub/conftst$i.h
57298049353Smrg    done
57398049353Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
57498049353Smrg
57598049353Smrg    case $depmode in
57698049353Smrg    nosideeffect)
57798049353Smrg      # after this tag, mechanisms are not by side-effect, so they'll
57898049353Smrg      # only be used when explicitly requested
57998049353Smrg      if test "x$enable_dependency_tracking" = xyes; then
58098049353Smrg	continue
58198049353Smrg      else
58298049353Smrg	break
58398049353Smrg      fi
58498049353Smrg      ;;
58598049353Smrg    none) break ;;
58698049353Smrg    esac
58798049353Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
58898049353Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
58998049353Smrg    # handle `-M -o', and we need to detect this.
59098049353Smrg    if depmode=$depmode \
59198049353Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
59298049353Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
59398049353Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
59498049353Smrg         >/dev/null 2>conftest.err &&
59598049353Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
59698049353Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
59798049353Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
59898049353Smrg      # icc doesn't choke on unknown options, it will just issue warnings
59998049353Smrg      # (even with -Werror).  So we grep stderr for any message
60098049353Smrg      # that says an option was ignored.
60198049353Smrg      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
60298049353Smrg        am_cv_$1_dependencies_compiler_type=$depmode
60398049353Smrg        break
60498049353Smrg      fi
60598049353Smrg    fi
60698049353Smrg  done
60798049353Smrg
60898049353Smrg  cd ..
60998049353Smrg  rm -rf conftest.dir
61098049353Smrgelse
61198049353Smrg  am_cv_$1_dependencies_compiler_type=none
61298049353Smrgfi
61398049353Smrg])
61498049353SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
61598049353SmrgAM_CONDITIONAL([am__fastdep$1], [
61698049353Smrg  test "x$enable_dependency_tracking" != xno \
61798049353Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
61898049353Smrg])
61998049353Smrg
62098049353Smrg
62198049353Smrg# AM_SET_DEPDIR
62298049353Smrg# -------------
62398049353Smrg# Choose a directory name for dependency files.
62498049353Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
62598049353SmrgAC_DEFUN([AM_SET_DEPDIR],
62698049353Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
62798049353SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
62898049353Smrg])
62998049353Smrg
63098049353Smrg
63198049353Smrg# AM_DEP_TRACK
63298049353Smrg# ------------
63398049353SmrgAC_DEFUN([AM_DEP_TRACK],
63498049353Smrg[AC_ARG_ENABLE(dependency-tracking,
63598049353Smrg[  --disable-dependency-tracking Speeds up one-time builds
63698049353Smrg  --enable-dependency-tracking  Do not reject slow dependency extractors])
63798049353Smrgif test "x$enable_dependency_tracking" != xno; then
63898049353Smrg  am_depcomp="$ac_aux_dir/depcomp"
63998049353Smrg  AMDEPBACKSLASH='\'
64098049353Smrgfi
64198049353SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
64298049353SmrgAC_SUBST([AMDEPBACKSLASH])
64398049353Smrg])
64498049353Smrg
64598049353Smrg# Generate code to set up dependency tracking.   -*- Autoconf -*-
64698049353Smrg
64798049353Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
64898049353Smrg
64998049353Smrg# This program is free software; you can redistribute it and/or modify
65098049353Smrg# it under the terms of the GNU General Public License as published by
65198049353Smrg# the Free Software Foundation; either version 2, or (at your option)
65298049353Smrg# any later version.
65398049353Smrg
65498049353Smrg# This program is distributed in the hope that it will be useful,
65598049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
65698049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
65798049353Smrg# GNU General Public License for more details.
65898049353Smrg
65998049353Smrg# You should have received a copy of the GNU General Public License
66098049353Smrg# along with this program; if not, write to the Free Software
66198049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
66298049353Smrg# 02111-1307, USA.
66398049353Smrg
66498049353Smrg#serial 2
66598049353Smrg
66698049353Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
66798049353Smrg# ------------------------------
66898049353SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
66998049353Smrg[for mf in $CONFIG_FILES; do
67098049353Smrg  # Strip MF so we end up with the name of the file.
67198049353Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
67298049353Smrg  # Check whether this is an Automake generated Makefile or not.
67398049353Smrg  # We used to match only the files named `Makefile.in', but
67498049353Smrg  # some people rename them; so instead we look at the file content.
67598049353Smrg  # Grep'ing the first line is not enough: some people post-process
67698049353Smrg  # each Makefile.in and add a new line on top of each file to say so.
67798049353Smrg  # So let's grep whole file.
67898049353Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
67998049353Smrg    dirpart=`AS_DIRNAME("$mf")`
68098049353Smrg  else
68198049353Smrg    continue
68298049353Smrg  fi
68398049353Smrg  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
68498049353Smrg  # Extract the definition of DEP_FILES from the Makefile without
68598049353Smrg  # running `make'.
68698049353Smrg  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
68798049353Smrg  test -z "$DEPDIR" && continue
68898049353Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
68998049353Smrg  U=`sed -n -e '/^U = / s///p' < "$mf"`
69098049353Smrg  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
69198049353Smrg  # We invoke sed twice because it is the simplest approach to
69298049353Smrg  # changing $(DEPDIR) to its actual value in the expansion.
69398049353Smrg  for file in `sed -n -e '
69498049353Smrg    /^DEP_FILES = .*\\\\$/ {
69598049353Smrg      s/^DEP_FILES = //
69698049353Smrg      :loop
69798049353Smrg	s/\\\\$//
69898049353Smrg	p
69998049353Smrg	n
70098049353Smrg	/\\\\$/ b loop
70198049353Smrg      p
70298049353Smrg    }
70398049353Smrg    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
70498049353Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
70598049353Smrg    # Make sure the directory exists.
70698049353Smrg    test -f "$dirpart/$file" && continue
70798049353Smrg    fdir=`AS_DIRNAME(["$file"])`
70898049353Smrg    AS_MKDIR_P([$dirpart/$fdir])
70998049353Smrg    # echo "creating $dirpart/$file"
71098049353Smrg    echo '# dummy' > "$dirpart/$file"
71198049353Smrg  done
71298049353Smrgdone
71398049353Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
71498049353Smrg
71598049353Smrg
71698049353Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
71798049353Smrg# -----------------------------
71898049353Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
71998049353Smrg#
72098049353Smrg# This code is only required when automatic dependency tracking
72198049353Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
72298049353Smrg# need in order to bootstrap the dependency handling code.
72398049353SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
72498049353Smrg[AC_CONFIG_COMMANDS([depfiles],
72598049353Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
72698049353Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
72798049353Smrg])
72898049353Smrg
72998049353Smrg# Check to see how 'make' treats includes.	-*- Autoconf -*-
73098049353Smrg
73198049353Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
73298049353Smrg
73398049353Smrg# This program is free software; you can redistribute it and/or modify
73498049353Smrg# it under the terms of the GNU General Public License as published by
73598049353Smrg# the Free Software Foundation; either version 2, or (at your option)
73698049353Smrg# any later version.
73798049353Smrg
73898049353Smrg# This program is distributed in the hope that it will be useful,
73998049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
74098049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
74198049353Smrg# GNU General Public License for more details.
74298049353Smrg
74398049353Smrg# You should have received a copy of the GNU General Public License
74498049353Smrg# along with this program; if not, write to the Free Software
74598049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
74698049353Smrg# 02111-1307, USA.
74798049353Smrg
74898049353Smrg# serial 2
74998049353Smrg
75098049353Smrg# AM_MAKE_INCLUDE()
75198049353Smrg# -----------------
75298049353Smrg# Check to see how make treats includes.
75398049353SmrgAC_DEFUN([AM_MAKE_INCLUDE],
75498049353Smrg[am_make=${MAKE-make}
75598049353Smrgcat > confinc << 'END'
75698049353Smrgam__doit:
75798049353Smrg	@echo done
75898049353Smrg.PHONY: am__doit
75998049353SmrgEND
76098049353Smrg# If we don't find an include directive, just comment out the code.
76198049353SmrgAC_MSG_CHECKING([for style of include used by $am_make])
76298049353Smrgam__include="#"
76398049353Smrgam__quote=
76498049353Smrg_am_result=none
76598049353Smrg# First try GNU make style include.
76698049353Smrgecho "include confinc" > confmf
76798049353Smrg# We grep out `Entering directory' and `Leaving directory'
76898049353Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
76998049353Smrg# In particular we don't look at `^make:' because GNU make might
77098049353Smrg# be invoked under some other name (usually "gmake"), in which
77198049353Smrg# case it prints its new name instead of `make'.
77298049353Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
77398049353Smrg   am__include=include
77498049353Smrg   am__quote=
77598049353Smrg   _am_result=GNU
77698049353Smrgfi
77798049353Smrg# Now try BSD make style include.
77898049353Smrgif test "$am__include" = "#"; then
77998049353Smrg   echo '.include "confinc"' > confmf
78098049353Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
78198049353Smrg      am__include=.include
78298049353Smrg      am__quote="\""
78398049353Smrg      _am_result=BSD
78498049353Smrg   fi
78598049353Smrgfi
78698049353SmrgAC_SUBST([am__include])
78798049353SmrgAC_SUBST([am__quote])
78898049353SmrgAC_MSG_RESULT([$_am_result])
78998049353Smrgrm -f confinc confmf
79098049353Smrg])
79198049353Smrg
79298049353Smrg# AM_CONDITIONAL                                              -*- Autoconf -*-
79398049353Smrg
79498049353Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
79598049353Smrg
79698049353Smrg# This program is free software; you can redistribute it and/or modify
79798049353Smrg# it under the terms of the GNU General Public License as published by
79898049353Smrg# the Free Software Foundation; either version 2, or (at your option)
79998049353Smrg# any later version.
80098049353Smrg
80198049353Smrg# This program is distributed in the hope that it will be useful,
80298049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
80398049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
80498049353Smrg# GNU General Public License for more details.
80598049353Smrg
80698049353Smrg# You should have received a copy of the GNU General Public License
80798049353Smrg# along with this program; if not, write to the Free Software
80898049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
80998049353Smrg# 02111-1307, USA.
81098049353Smrg
81198049353Smrg# serial 5
81298049353Smrg
81398049353SmrgAC_PREREQ(2.52)
81498049353Smrg
81598049353Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
81698049353Smrg# -------------------------------------
81798049353Smrg# Define a conditional.
81898049353SmrgAC_DEFUN([AM_CONDITIONAL],
81998049353Smrg[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
82098049353Smrg        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
82198049353SmrgAC_SUBST([$1_TRUE])
82298049353SmrgAC_SUBST([$1_FALSE])
82398049353Smrgif $2; then
82498049353Smrg  $1_TRUE=
82598049353Smrg  $1_FALSE='#'
82698049353Smrgelse
82798049353Smrg  $1_TRUE='#'
82898049353Smrg  $1_FALSE=
82998049353Smrgfi
83098049353SmrgAC_CONFIG_COMMANDS_PRE(
83198049353Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
83298049353Smrg  AC_MSG_ERROR([conditional "$1" was never defined.
83398049353SmrgUsually this means the macro was only invoked conditionally.])
83498049353Smrgfi])])
83598049353Smrg
83698049353Smrg# Add --enable-maintainer-mode option to configure.
83798049353Smrg# From Jim Meyering
83898049353Smrg
83998049353Smrg# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
84098049353Smrg
84198049353Smrg# This program is free software; you can redistribute it and/or modify
84298049353Smrg# it under the terms of the GNU General Public License as published by
84398049353Smrg# the Free Software Foundation; either version 2, or (at your option)
84498049353Smrg# any later version.
84598049353Smrg
84698049353Smrg# This program is distributed in the hope that it will be useful,
84798049353Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
84898049353Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
84998049353Smrg# GNU General Public License for more details.
85098049353Smrg
85198049353Smrg# You should have received a copy of the GNU General Public License
85298049353Smrg# along with this program; if not, write to the Free Software
85398049353Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
85498049353Smrg# 02111-1307, USA.
85598049353Smrg
85698049353Smrg# serial 2
85798049353Smrg
85898049353SmrgAC_DEFUN([AM_MAINTAINER_MODE],
85998049353Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
86098049353Smrg  dnl maintainer-mode is disabled by default
86198049353Smrg  AC_ARG_ENABLE(maintainer-mode,
86298049353Smrg[  --enable-maintainer-mode enable make rules and dependencies not useful
86398049353Smrg                          (and sometimes confusing) to the casual installer],
86498049353Smrg      USE_MAINTAINER_MODE=$enableval,
86598049353Smrg      USE_MAINTAINER_MODE=no)
86698049353Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
86798049353Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
86898049353Smrg  MAINT=$MAINTAINER_MODE_TRUE
86998049353Smrg  AC_SUBST(MAINT)dnl
87098049353Smrg]
87198049353Smrg)
87298049353Smrg
87398049353SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
87498049353Smrg
87598049353Smrgdnl Copyright 2005 Red Hat, Inc
87698049353Smrgdnl
87798049353Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
87898049353Smrgdnl documentation for any purpose is hereby granted without fee, provided that
87998049353Smrgdnl the above copyright notice appear in all copies and that both that
88098049353Smrgdnl copyright notice and this permission notice appear in supporting
88198049353Smrgdnl documentation.
88298049353Smrgdnl
88398049353Smrgdnl The above copyright notice and this permission notice shall be included
88498049353Smrgdnl in all copies or substantial portions of the Software.
88598049353Smrgdnl
88698049353Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
88798049353Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
88898049353Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
88998049353Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
89098049353Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
89198049353Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
89298049353Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
89398049353Smrgdnl
89498049353Smrgdnl Except as contained in this notice, the name of the copyright holders shall
89598049353Smrgdnl not be used in advertising or otherwise to promote the sale, use or
89698049353Smrgdnl other dealings in this Software without prior written authorization
89798049353Smrgdnl from the copyright holders.
89898049353Smrgdnl
89998049353Smrg
90098049353Smrg# XORG_RELEASE_VERSION
90198049353Smrg# --------------------
90298049353Smrg# Adds --with/without-release-string and changes the PACKAGE and
90398049353Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
90498049353Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
90598049353Smrg 
90698049353SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
90798049353Smrg	AC_ARG_WITH(release-version,
90898049353Smrg			AC_HELP_STRING([--with-release-version=STRING],
90998049353Smrg				[Use release version string in package name]),
91098049353Smrg			[RELEASE_VERSION="$withval"],
91198049353Smrg			[RELEASE_VERSION=""])
91298049353Smrg	if test "x$RELEASE_VERSION" != "x"; then
91398049353Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
91498049353Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
91598049353Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
91698049353Smrg	fi
91798049353Smrg])
91898049353Smrg
919