aclocal.m4 revision 644fc5c1
1644fc5c1Stron# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2644fc5c1Stron
3644fc5c1Stron# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4644fc5c1Stron# Free Software Foundation, Inc.
5644fc5c1Stron# This file is free software; the Free Software Foundation
6644fc5c1Stron# gives unlimited permission to copy and/or distribute it,
7644fc5c1Stron# with or without modifications, as long as this notice is preserved.
8644fc5c1Stron
9644fc5c1Stron# This program is distributed in the hope that it will be useful,
10644fc5c1Stron# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11644fc5c1Stron# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12644fc5c1Stron# PARTICULAR PURPOSE.
13644fc5c1Stron
14644fc5c1Stron# Do all the work for Automake.                            -*- Autoconf -*-
15644fc5c1Stron
16644fc5c1Stron# This macro actually does too much some checks are only needed if
17644fc5c1Stron# your package does certain things.  But this isn't really a big deal.
18644fc5c1Stron
19644fc5c1Stron# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20644fc5c1Stron# Free Software Foundation, Inc.
21644fc5c1Stron
22644fc5c1Stron# This program is free software; you can redistribute it and/or modify
23644fc5c1Stron# it under the terms of the GNU General Public License as published by
24644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
25644fc5c1Stron# any later version.
26644fc5c1Stron
27644fc5c1Stron# This program is distributed in the hope that it will be useful,
28644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
29644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30644fc5c1Stron# GNU General Public License for more details.
31644fc5c1Stron
32644fc5c1Stron# You should have received a copy of the GNU General Public License
33644fc5c1Stron# along with this program; if not, write to the Free Software
34644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35644fc5c1Stron# 02111-1307, USA.
36644fc5c1Stron
37644fc5c1Stron# serial 10
38644fc5c1Stron
39644fc5c1StronAC_PREREQ([2.54])
40644fc5c1Stron
41644fc5c1Stron# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42644fc5c1Stron# the ones we care about.
43644fc5c1Stronm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44644fc5c1Stron
45644fc5c1Stron# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46644fc5c1Stron# AM_INIT_AUTOMAKE([OPTIONS])
47644fc5c1Stron# -----------------------------------------------
48644fc5c1Stron# The call with PACKAGE and VERSION arguments is the old style
49644fc5c1Stron# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50644fc5c1Stron# and VERSION should now be passed to AC_INIT and removed from
51644fc5c1Stron# the call to AM_INIT_AUTOMAKE.
52644fc5c1Stron# We support both call styles for the transition.  After
53644fc5c1Stron# the next Automake release, Autoconf can make the AC_INIT
54644fc5c1Stron# arguments mandatory, and then we can depend on a new Autoconf
55644fc5c1Stron# release and drop the old call support.
56644fc5c1StronAC_DEFUN([AM_INIT_AUTOMAKE],
57644fc5c1Stron[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58644fc5c1Stron AC_REQUIRE([AC_PROG_INSTALL])dnl
59644fc5c1Stron# test to see if srcdir already configured
60644fc5c1Stronif test "`cd $srcdir && pwd`" != "`pwd`" &&
61644fc5c1Stron   test -f $srcdir/config.status; then
62644fc5c1Stron  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63644fc5c1Stronfi
64644fc5c1Stron
65644fc5c1Stron# test whether we have cygpath
66644fc5c1Stronif test -z "$CYGPATH_W"; then
67644fc5c1Stron  if (cygpath --version) >/dev/null 2>/dev/null; then
68644fc5c1Stron    CYGPATH_W='cygpath -w'
69644fc5c1Stron  else
70644fc5c1Stron    CYGPATH_W=echo
71644fc5c1Stron  fi
72644fc5c1Stronfi
73644fc5c1StronAC_SUBST([CYGPATH_W])
74644fc5c1Stron
75644fc5c1Stron# Define the identity of the package.
76644fc5c1Strondnl Distinguish between old-style and new-style calls.
77644fc5c1Stronm4_ifval([$2],
78644fc5c1Stron[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79644fc5c1Stron AC_SUBST([PACKAGE], [$1])dnl
80644fc5c1Stron AC_SUBST([VERSION], [$2])],
81644fc5c1Stron[_AM_SET_OPTIONS([$1])dnl
82644fc5c1Stron AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83644fc5c1Stron AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84644fc5c1Stron
85644fc5c1Stron_AM_IF_OPTION([no-define],,
86644fc5c1Stron[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87644fc5c1Stron AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88644fc5c1Stron
89644fc5c1Stron# Some tools Automake needs.
90644fc5c1StronAC_REQUIRE([AM_SANITY_CHECK])dnl
91644fc5c1StronAC_REQUIRE([AC_ARG_PROGRAM])dnl
92644fc5c1StronAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93644fc5c1StronAM_MISSING_PROG(AUTOCONF, autoconf)
94644fc5c1StronAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95644fc5c1StronAM_MISSING_PROG(AUTOHEADER, autoheader)
96644fc5c1StronAM_MISSING_PROG(MAKEINFO, makeinfo)
97644fc5c1StronAM_MISSING_PROG(AMTAR, tar)
98644fc5c1StronAM_PROG_INSTALL_SH
99644fc5c1StronAM_PROG_INSTALL_STRIP
100644fc5c1Stron# We need awk for the "check" target.  The system "awk" is bad on
101644fc5c1Stron# some platforms.
102644fc5c1StronAC_REQUIRE([AC_PROG_AWK])dnl
103644fc5c1StronAC_REQUIRE([AC_PROG_MAKE_SET])dnl
104644fc5c1StronAC_REQUIRE([AM_SET_LEADING_DOT])dnl
105644fc5c1Stron
106644fc5c1Stron_AM_IF_OPTION([no-dependencies],,
107644fc5c1Stron[AC_PROVIDE_IFELSE([AC_PROG_CC],
108644fc5c1Stron                  [_AM_DEPENDENCIES(CC)],
109644fc5c1Stron                  [define([AC_PROG_CC],
110644fc5c1Stron                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111644fc5c1StronAC_PROVIDE_IFELSE([AC_PROG_CXX],
112644fc5c1Stron                  [_AM_DEPENDENCIES(CXX)],
113644fc5c1Stron                  [define([AC_PROG_CXX],
114644fc5c1Stron                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115644fc5c1Stron])
116644fc5c1Stron])
117644fc5c1Stron
118644fc5c1Stron
119644fc5c1Stron# When config.status generates a header, we must update the stamp-h file.
120644fc5c1Stron# This file resides in the same directory as the config header
121644fc5c1Stron# that is generated.  The stamp files are numbered to have different names.
122644fc5c1Stron
123644fc5c1Stron# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124644fc5c1Stron# loop where config.status creates the headers, so we can generate
125644fc5c1Stron# our stamp files there.
126644fc5c1StronAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127644fc5c1Stron[# Compute $1's index in $config_headers.
128644fc5c1Stron_am_stamp_count=1
129644fc5c1Stronfor _am_header in $config_headers :; do
130644fc5c1Stron  case $_am_header in
131644fc5c1Stron    $1 | $1:* )
132644fc5c1Stron      break ;;
133644fc5c1Stron    * )
134644fc5c1Stron      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135644fc5c1Stron  esac
136644fc5c1Strondone
137644fc5c1Stronecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138644fc5c1Stron
139644fc5c1Stron# Copyright 2002  Free Software Foundation, Inc.
140644fc5c1Stron
141644fc5c1Stron# This program is free software; you can redistribute it and/or modify
142644fc5c1Stron# it under the terms of the GNU General Public License as published by
143644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
144644fc5c1Stron# any later version.
145644fc5c1Stron
146644fc5c1Stron# This program is distributed in the hope that it will be useful,
147644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
148644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149644fc5c1Stron# GNU General Public License for more details.
150644fc5c1Stron
151644fc5c1Stron# You should have received a copy of the GNU General Public License
152644fc5c1Stron# along with this program; if not, write to the Free Software
153644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154644fc5c1Stron
155644fc5c1Stron# AM_AUTOMAKE_VERSION(VERSION)
156644fc5c1Stron# ----------------------------
157644fc5c1Stron# Automake X.Y traces this macro to ensure aclocal.m4 has been
158644fc5c1Stron# generated from the m4 files accompanying Automake X.Y.
159644fc5c1StronAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160644fc5c1Stron
161644fc5c1Stron# AM_SET_CURRENT_AUTOMAKE_VERSION
162644fc5c1Stron# -------------------------------
163644fc5c1Stron# Call AM_AUTOMAKE_VERSION so it can be traced.
164644fc5c1Stron# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165644fc5c1StronAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166644fc5c1Stron	 [AM_AUTOMAKE_VERSION([1.7.9])])
167644fc5c1Stron
168644fc5c1Stron# Helper functions for option handling.                    -*- Autoconf -*-
169644fc5c1Stron
170644fc5c1Stron# Copyright 2001, 2002  Free Software Foundation, Inc.
171644fc5c1Stron
172644fc5c1Stron# This program is free software; you can redistribute it and/or modify
173644fc5c1Stron# it under the terms of the GNU General Public License as published by
174644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
175644fc5c1Stron# any later version.
176644fc5c1Stron
177644fc5c1Stron# This program is distributed in the hope that it will be useful,
178644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
179644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180644fc5c1Stron# GNU General Public License for more details.
181644fc5c1Stron
182644fc5c1Stron# You should have received a copy of the GNU General Public License
183644fc5c1Stron# along with this program; if not, write to the Free Software
184644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185644fc5c1Stron# 02111-1307, USA.
186644fc5c1Stron
187644fc5c1Stron# serial 2
188644fc5c1Stron
189644fc5c1Stron# _AM_MANGLE_OPTION(NAME)
190644fc5c1Stron# -----------------------
191644fc5c1StronAC_DEFUN([_AM_MANGLE_OPTION],
192644fc5c1Stron[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193644fc5c1Stron
194644fc5c1Stron# _AM_SET_OPTION(NAME)
195644fc5c1Stron# ------------------------------
196644fc5c1Stron# Set option NAME.  Presently that only means defining a flag for this option.
197644fc5c1StronAC_DEFUN([_AM_SET_OPTION],
198644fc5c1Stron[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199644fc5c1Stron
200644fc5c1Stron# _AM_SET_OPTIONS(OPTIONS)
201644fc5c1Stron# ----------------------------------
202644fc5c1Stron# OPTIONS is a space-separated list of Automake options.
203644fc5c1StronAC_DEFUN([_AM_SET_OPTIONS],
204644fc5c1Stron[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205644fc5c1Stron
206644fc5c1Stron# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207644fc5c1Stron# -------------------------------------------
208644fc5c1Stron# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209644fc5c1StronAC_DEFUN([_AM_IF_OPTION],
210644fc5c1Stron[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211644fc5c1Stron
212644fc5c1Stron#
213644fc5c1Stron# Check to make sure that the build environment is sane.
214644fc5c1Stron#
215644fc5c1Stron
216644fc5c1Stron# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217644fc5c1Stron
218644fc5c1Stron# This program is free software; you can redistribute it and/or modify
219644fc5c1Stron# it under the terms of the GNU General Public License as published by
220644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
221644fc5c1Stron# any later version.
222644fc5c1Stron
223644fc5c1Stron# This program is distributed in the hope that it will be useful,
224644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
225644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226644fc5c1Stron# GNU General Public License for more details.
227644fc5c1Stron
228644fc5c1Stron# You should have received a copy of the GNU General Public License
229644fc5c1Stron# along with this program; if not, write to the Free Software
230644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231644fc5c1Stron# 02111-1307, USA.
232644fc5c1Stron
233644fc5c1Stron# serial 3
234644fc5c1Stron
235644fc5c1Stron# AM_SANITY_CHECK
236644fc5c1Stron# ---------------
237644fc5c1StronAC_DEFUN([AM_SANITY_CHECK],
238644fc5c1Stron[AC_MSG_CHECKING([whether build environment is sane])
239644fc5c1Stron# Just in case
240644fc5c1Stronsleep 1
241644fc5c1Stronecho timestamp > conftest.file
242644fc5c1Stron# Do `set' in a subshell so we don't clobber the current shell's
243644fc5c1Stron# arguments.  Must try -L first in case configure is actually a
244644fc5c1Stron# symlink; some systems play weird games with the mod time of symlinks
245644fc5c1Stron# (eg FreeBSD returns the mod time of the symlink's containing
246644fc5c1Stron# directory).
247644fc5c1Stronif (
248644fc5c1Stron   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249644fc5c1Stron   if test "$[*]" = "X"; then
250644fc5c1Stron      # -L didn't work.
251644fc5c1Stron      set X `ls -t $srcdir/configure conftest.file`
252644fc5c1Stron   fi
253644fc5c1Stron   rm -f conftest.file
254644fc5c1Stron   if test "$[*]" != "X $srcdir/configure conftest.file" \
255644fc5c1Stron      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256644fc5c1Stron
257644fc5c1Stron      # If neither matched, then we have a broken ls.  This can happen
258644fc5c1Stron      # if, for instance, CONFIG_SHELL is bash and it inherits a
259644fc5c1Stron      # broken ls alias from the environment.  This has actually
260644fc5c1Stron      # happened.  Such a system could not be considered "sane".
261644fc5c1Stron      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262644fc5c1Stronalias in your environment])
263644fc5c1Stron   fi
264644fc5c1Stron
265644fc5c1Stron   test "$[2]" = conftest.file
266644fc5c1Stron   )
267644fc5c1Stronthen
268644fc5c1Stron   # Ok.
269644fc5c1Stron   :
270644fc5c1Stronelse
271644fc5c1Stron   AC_MSG_ERROR([newly created file is older than distributed files!
272644fc5c1StronCheck your system clock])
273644fc5c1Stronfi
274644fc5c1StronAC_MSG_RESULT(yes)])
275644fc5c1Stron
276644fc5c1Stron#  -*- Autoconf -*-
277644fc5c1Stron
278644fc5c1Stron
279644fc5c1Stron# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280644fc5c1Stron
281644fc5c1Stron# This program is free software; you can redistribute it and/or modify
282644fc5c1Stron# it under the terms of the GNU General Public License as published by
283644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
284644fc5c1Stron# any later version.
285644fc5c1Stron
286644fc5c1Stron# This program is distributed in the hope that it will be useful,
287644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
288644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289644fc5c1Stron# GNU General Public License for more details.
290644fc5c1Stron
291644fc5c1Stron# You should have received a copy of the GNU General Public License
292644fc5c1Stron# along with this program; if not, write to the Free Software
293644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294644fc5c1Stron# 02111-1307, USA.
295644fc5c1Stron
296644fc5c1Stron# serial 3
297644fc5c1Stron
298644fc5c1Stron# AM_MISSING_PROG(NAME, PROGRAM)
299644fc5c1Stron# ------------------------------
300644fc5c1StronAC_DEFUN([AM_MISSING_PROG],
301644fc5c1Stron[AC_REQUIRE([AM_MISSING_HAS_RUN])
302644fc5c1Stron$1=${$1-"${am_missing_run}$2"}
303644fc5c1StronAC_SUBST($1)])
304644fc5c1Stron
305644fc5c1Stron
306644fc5c1Stron# AM_MISSING_HAS_RUN
307644fc5c1Stron# ------------------
308644fc5c1Stron# Define MISSING if not defined so far and test if it supports --run.
309644fc5c1Stron# If it does, set am_missing_run to use it, otherwise, to nothing.
310644fc5c1StronAC_DEFUN([AM_MISSING_HAS_RUN],
311644fc5c1Stron[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312644fc5c1Strontest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313644fc5c1Stron# Use eval to expand $SHELL
314644fc5c1Stronif eval "$MISSING --run true"; then
315644fc5c1Stron  am_missing_run="$MISSING --run "
316644fc5c1Stronelse
317644fc5c1Stron  am_missing_run=
318644fc5c1Stron  AC_MSG_WARN([`missing' script is too old or missing])
319644fc5c1Stronfi
320644fc5c1Stron])
321644fc5c1Stron
322644fc5c1Stron# AM_AUX_DIR_EXPAND
323644fc5c1Stron
324644fc5c1Stron# Copyright 2001 Free Software Foundation, Inc.
325644fc5c1Stron
326644fc5c1Stron# This program is free software; you can redistribute it and/or modify
327644fc5c1Stron# it under the terms of the GNU General Public License as published by
328644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
329644fc5c1Stron# any later version.
330644fc5c1Stron
331644fc5c1Stron# This program is distributed in the hope that it will be useful,
332644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
333644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334644fc5c1Stron# GNU General Public License for more details.
335644fc5c1Stron
336644fc5c1Stron# You should have received a copy of the GNU General Public License
337644fc5c1Stron# along with this program; if not, write to the Free Software
338644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339644fc5c1Stron# 02111-1307, USA.
340644fc5c1Stron
341644fc5c1Stron# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342644fc5c1Stron# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
343644fc5c1Stron# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344644fc5c1Stron#
345644fc5c1Stron# Of course, Automake must honor this variable whenever it calls a
346644fc5c1Stron# tool from the auxiliary directory.  The problem is that $srcdir (and
347644fc5c1Stron# therefore $ac_aux_dir as well) can be either absolute or relative,
348644fc5c1Stron# depending on how configure is run.  This is pretty annoying, since
349644fc5c1Stron# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350644fc5c1Stron# source directory, any form will work fine, but in subdirectories a
351644fc5c1Stron# relative path needs to be adjusted first.
352644fc5c1Stron#
353644fc5c1Stron# $ac_aux_dir/missing
354644fc5c1Stron#    fails when called from a subdirectory if $ac_aux_dir is relative
355644fc5c1Stron# $top_srcdir/$ac_aux_dir/missing
356644fc5c1Stron#    fails if $ac_aux_dir is absolute,
357644fc5c1Stron#    fails when called from a subdirectory in a VPATH build with
358644fc5c1Stron#          a relative $ac_aux_dir
359644fc5c1Stron#
360644fc5c1Stron# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361644fc5c1Stron# are both prefixed by $srcdir.  In an in-source build this is usually
362644fc5c1Stron# harmless because $srcdir is `.', but things will broke when you
363644fc5c1Stron# start a VPATH build or use an absolute $srcdir.
364644fc5c1Stron#
365644fc5c1Stron# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366644fc5c1Stron# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
367644fc5c1Stron#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368644fc5c1Stron# and then we would define $MISSING as
369644fc5c1Stron#   MISSING="\${SHELL} $am_aux_dir/missing"
370644fc5c1Stron# This will work as long as MISSING is not called from configure, because
371644fc5c1Stron# unfortunately $(top_srcdir) has no meaning in configure.
372644fc5c1Stron# However there are other variables, like CC, which are often used in
373644fc5c1Stron# configure, and could therefore not use this "fixed" $ac_aux_dir.
374644fc5c1Stron#
375644fc5c1Stron# Another solution, used here, is to always expand $ac_aux_dir to an
376644fc5c1Stron# absolute PATH.  The drawback is that using absolute paths prevent a
377644fc5c1Stron# configured tree to be moved without reconfiguration.
378644fc5c1Stron
379644fc5c1Stron# Rely on autoconf to set up CDPATH properly.
380644fc5c1StronAC_PREREQ([2.50])
381644fc5c1Stron
382644fc5c1StronAC_DEFUN([AM_AUX_DIR_EXPAND], [
383644fc5c1Stron# expand $ac_aux_dir to an absolute path
384644fc5c1Stronam_aux_dir=`cd $ac_aux_dir && pwd`
385644fc5c1Stron])
386644fc5c1Stron
387644fc5c1Stron# AM_PROG_INSTALL_SH
388644fc5c1Stron# ------------------
389644fc5c1Stron# Define $install_sh.
390644fc5c1Stron
391644fc5c1Stron# Copyright 2001 Free Software Foundation, Inc.
392644fc5c1Stron
393644fc5c1Stron# This program is free software; you can redistribute it and/or modify
394644fc5c1Stron# it under the terms of the GNU General Public License as published by
395644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
396644fc5c1Stron# any later version.
397644fc5c1Stron
398644fc5c1Stron# This program is distributed in the hope that it will be useful,
399644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
400644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401644fc5c1Stron# GNU General Public License for more details.
402644fc5c1Stron
403644fc5c1Stron# You should have received a copy of the GNU General Public License
404644fc5c1Stron# along with this program; if not, write to the Free Software
405644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406644fc5c1Stron# 02111-1307, USA.
407644fc5c1Stron
408644fc5c1StronAC_DEFUN([AM_PROG_INSTALL_SH],
409644fc5c1Stron[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410644fc5c1Stroninstall_sh=${install_sh-"$am_aux_dir/install-sh"}
411644fc5c1StronAC_SUBST(install_sh)])
412644fc5c1Stron
413644fc5c1Stron# AM_PROG_INSTALL_STRIP
414644fc5c1Stron
415644fc5c1Stron# Copyright 2001 Free Software Foundation, Inc.
416644fc5c1Stron
417644fc5c1Stron# This program is free software; you can redistribute it and/or modify
418644fc5c1Stron# it under the terms of the GNU General Public License as published by
419644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
420644fc5c1Stron# any later version.
421644fc5c1Stron
422644fc5c1Stron# This program is distributed in the hope that it will be useful,
423644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
424644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425644fc5c1Stron# GNU General Public License for more details.
426644fc5c1Stron
427644fc5c1Stron# You should have received a copy of the GNU General Public License
428644fc5c1Stron# along with this program; if not, write to the Free Software
429644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430644fc5c1Stron# 02111-1307, USA.
431644fc5c1Stron
432644fc5c1Stron# One issue with vendor `install' (even GNU) is that you can't
433644fc5c1Stron# specify the program used to strip binaries.  This is especially
434644fc5c1Stron# annoying in cross-compiling environments, where the build's strip
435644fc5c1Stron# is unlikely to handle the host's binaries.
436644fc5c1Stron# Fortunately install-sh will honor a STRIPPROG variable, so we
437644fc5c1Stron# always use install-sh in `make install-strip', and initialize
438644fc5c1Stron# STRIPPROG with the value of the STRIP variable (set by the user).
439644fc5c1StronAC_DEFUN([AM_PROG_INSTALL_STRIP],
440644fc5c1Stron[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441644fc5c1Stron# Installed binaries are usually stripped using `strip' when the user
442644fc5c1Stron# run `make install-strip'.  However `strip' might not be the right
443644fc5c1Stron# tool to use in cross-compilation environments, therefore Automake
444644fc5c1Stron# will honor the `STRIP' environment variable to overrule this program.
445644fc5c1Strondnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446644fc5c1Stronif test "$cross_compiling" != no; then
447644fc5c1Stron  AC_CHECK_TOOL([STRIP], [strip], :)
448644fc5c1Stronfi
449644fc5c1StronINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450644fc5c1StronAC_SUBST([INSTALL_STRIP_PROGRAM])])
451644fc5c1Stron
452644fc5c1Stron#                                                          -*- Autoconf -*-
453644fc5c1Stron# Copyright (C) 2003  Free Software Foundation, Inc.
454644fc5c1Stron
455644fc5c1Stron# This program is free software; you can redistribute it and/or modify
456644fc5c1Stron# it under the terms of the GNU General Public License as published by
457644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
458644fc5c1Stron# any later version.
459644fc5c1Stron
460644fc5c1Stron# This program is distributed in the hope that it will be useful,
461644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
462644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463644fc5c1Stron# GNU General Public License for more details.
464644fc5c1Stron
465644fc5c1Stron# You should have received a copy of the GNU General Public License
466644fc5c1Stron# along with this program; if not, write to the Free Software
467644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468644fc5c1Stron# 02111-1307, USA.
469644fc5c1Stron
470644fc5c1Stron# serial 1
471644fc5c1Stron
472644fc5c1Stron# Check whether the underlying file-system supports filenames
473644fc5c1Stron# with a leading dot.  For instance MS-DOS doesn't.
474644fc5c1StronAC_DEFUN([AM_SET_LEADING_DOT],
475644fc5c1Stron[rm -rf .tst 2>/dev/null
476644fc5c1Stronmkdir .tst 2>/dev/null
477644fc5c1Stronif test -d .tst; then
478644fc5c1Stron  am__leading_dot=.
479644fc5c1Stronelse
480644fc5c1Stron  am__leading_dot=_
481644fc5c1Stronfi
482644fc5c1Stronrmdir .tst 2>/dev/null
483644fc5c1StronAC_SUBST([am__leading_dot])])
484644fc5c1Stron
485644fc5c1Stron# serial 5						-*- Autoconf -*-
486644fc5c1Stron
487644fc5c1Stron# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488644fc5c1Stron
489644fc5c1Stron# This program is free software; you can redistribute it and/or modify
490644fc5c1Stron# it under the terms of the GNU General Public License as published by
491644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
492644fc5c1Stron# any later version.
493644fc5c1Stron
494644fc5c1Stron# This program is distributed in the hope that it will be useful,
495644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
496644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497644fc5c1Stron# GNU General Public License for more details.
498644fc5c1Stron
499644fc5c1Stron# You should have received a copy of the GNU General Public License
500644fc5c1Stron# along with this program; if not, write to the Free Software
501644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502644fc5c1Stron# 02111-1307, USA.
503644fc5c1Stron
504644fc5c1Stron
505644fc5c1Stron# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506644fc5c1Stron# written in clear, in which case automake, when reading aclocal.m4,
507644fc5c1Stron# will think it sees a *use*, and therefore will trigger all it's
508644fc5c1Stron# C support machinery.  Also note that it means that autoscan, seeing
509644fc5c1Stron# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510644fc5c1Stron
511644fc5c1Stron
512644fc5c1Stron
513644fc5c1Stron# _AM_DEPENDENCIES(NAME)
514644fc5c1Stron# ----------------------
515644fc5c1Stron# See how the compiler implements dependency checking.
516644fc5c1Stron# NAME is "CC", "CXX", "GCJ", or "OBJC".
517644fc5c1Stron# We try a few techniques and use that to set a single cache variable.
518644fc5c1Stron#
519644fc5c1Stron# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520644fc5c1Stron# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521644fc5c1Stron# dependency, and given that the user is not expected to run this macro,
522644fc5c1Stron# just rely on AC_PROG_CC.
523644fc5c1StronAC_DEFUN([_AM_DEPENDENCIES],
524644fc5c1Stron[AC_REQUIRE([AM_SET_DEPDIR])dnl
525644fc5c1StronAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526644fc5c1StronAC_REQUIRE([AM_MAKE_INCLUDE])dnl
527644fc5c1StronAC_REQUIRE([AM_DEP_TRACK])dnl
528644fc5c1Stron
529644fc5c1Stronifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
530644fc5c1Stron       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
531644fc5c1Stron       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532644fc5c1Stron       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
533644fc5c1Stron                   [depcc="$$1"   am_compiler_list=])
534644fc5c1Stron
535644fc5c1StronAC_CACHE_CHECK([dependency style of $depcc],
536644fc5c1Stron               [am_cv_$1_dependencies_compiler_type],
537644fc5c1Stron[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538644fc5c1Stron  # We make a subdir and do the tests there.  Otherwise we can end up
539644fc5c1Stron  # making bogus files that we don't know about and never remove.  For
540644fc5c1Stron  # instance it was reported that on HP-UX the gcc test will end up
541644fc5c1Stron  # making a dummy file named `D' -- because `-MD' means `put the output
542644fc5c1Stron  # in D'.
543644fc5c1Stron  mkdir conftest.dir
544644fc5c1Stron  # Copy depcomp to subdir because otherwise we won't find it if we're
545644fc5c1Stron  # using a relative directory.
546644fc5c1Stron  cp "$am_depcomp" conftest.dir
547644fc5c1Stron  cd conftest.dir
548644fc5c1Stron  # We will build objects and dependencies in a subdirectory because
549644fc5c1Stron  # it helps to detect inapplicable dependency modes.  For instance
550644fc5c1Stron  # both Tru64's cc and ICC support -MD to output dependencies as a
551644fc5c1Stron  # side effect of compilation, but ICC will put the dependencies in
552644fc5c1Stron  # the current directory while Tru64 will put them in the object
553644fc5c1Stron  # directory.
554644fc5c1Stron  mkdir sub
555644fc5c1Stron
556644fc5c1Stron  am_cv_$1_dependencies_compiler_type=none
557644fc5c1Stron  if test "$am_compiler_list" = ""; then
558644fc5c1Stron     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
559644fc5c1Stron  fi
560644fc5c1Stron  for depmode in $am_compiler_list; do
561644fc5c1Stron    # Setup a source with many dependencies, because some compilers
562644fc5c1Stron    # like to wrap large dependency lists on column 80 (with \), and
563644fc5c1Stron    # we should not choose a depcomp mode which is confused by this.
564644fc5c1Stron    #
565644fc5c1Stron    # We need to recreate these files for each test, as the compiler may
566644fc5c1Stron    # overwrite some of them when testing with obscure command lines.
567644fc5c1Stron    # This happens at least with the AIX C compiler.
568644fc5c1Stron    : > sub/conftest.c
569644fc5c1Stron    for i in 1 2 3 4 5 6; do
570644fc5c1Stron      echo '#include "conftst'$i'.h"' >> sub/conftest.c
571644fc5c1Stron      : > sub/conftst$i.h
572644fc5c1Stron    done
573644fc5c1Stron    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
574644fc5c1Stron
575644fc5c1Stron    case $depmode in
576644fc5c1Stron    nosideeffect)
577644fc5c1Stron      # after this tag, mechanisms are not by side-effect, so they'll
578644fc5c1Stron      # only be used when explicitly requested
579644fc5c1Stron      if test "x$enable_dependency_tracking" = xyes; then
580644fc5c1Stron	continue
581644fc5c1Stron      else
582644fc5c1Stron	break
583644fc5c1Stron      fi
584644fc5c1Stron      ;;
585644fc5c1Stron    none) break ;;
586644fc5c1Stron    esac
587644fc5c1Stron    # We check with `-c' and `-o' for the sake of the "dashmstdout"
588644fc5c1Stron    # mode.  It turns out that the SunPro C++ compiler does not properly
589644fc5c1Stron    # handle `-M -o', and we need to detect this.
590644fc5c1Stron    if depmode=$depmode \
591644fc5c1Stron       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592644fc5c1Stron       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593644fc5c1Stron       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594644fc5c1Stron         >/dev/null 2>conftest.err &&
595644fc5c1Stron       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596644fc5c1Stron       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597644fc5c1Stron       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598644fc5c1Stron      # icc doesn't choke on unknown options, it will just issue warnings
599644fc5c1Stron      # (even with -Werror).  So we grep stderr for any message
600644fc5c1Stron      # that says an option was ignored.
601644fc5c1Stron      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602644fc5c1Stron        am_cv_$1_dependencies_compiler_type=$depmode
603644fc5c1Stron        break
604644fc5c1Stron      fi
605644fc5c1Stron    fi
606644fc5c1Stron  done
607644fc5c1Stron
608644fc5c1Stron  cd ..
609644fc5c1Stron  rm -rf conftest.dir
610644fc5c1Stronelse
611644fc5c1Stron  am_cv_$1_dependencies_compiler_type=none
612644fc5c1Stronfi
613644fc5c1Stron])
614644fc5c1StronAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615644fc5c1StronAM_CONDITIONAL([am__fastdep$1], [
616644fc5c1Stron  test "x$enable_dependency_tracking" != xno \
617644fc5c1Stron  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
618644fc5c1Stron])
619644fc5c1Stron
620644fc5c1Stron
621644fc5c1Stron# AM_SET_DEPDIR
622644fc5c1Stron# -------------
623644fc5c1Stron# Choose a directory name for dependency files.
624644fc5c1Stron# This macro is AC_REQUIREd in _AM_DEPENDENCIES
625644fc5c1StronAC_DEFUN([AM_SET_DEPDIR],
626644fc5c1Stron[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627644fc5c1StronAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
628644fc5c1Stron])
629644fc5c1Stron
630644fc5c1Stron
631644fc5c1Stron# AM_DEP_TRACK
632644fc5c1Stron# ------------
633644fc5c1StronAC_DEFUN([AM_DEP_TRACK],
634644fc5c1Stron[AC_ARG_ENABLE(dependency-tracking,
635644fc5c1Stron[  --disable-dependency-tracking Speeds up one-time builds
636644fc5c1Stron  --enable-dependency-tracking  Do not reject slow dependency extractors])
637644fc5c1Stronif test "x$enable_dependency_tracking" != xno; then
638644fc5c1Stron  am_depcomp="$ac_aux_dir/depcomp"
639644fc5c1Stron  AMDEPBACKSLASH='\'
640644fc5c1Stronfi
641644fc5c1StronAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642644fc5c1StronAC_SUBST([AMDEPBACKSLASH])
643644fc5c1Stron])
644644fc5c1Stron
645644fc5c1Stron# Generate code to set up dependency tracking.   -*- Autoconf -*-
646644fc5c1Stron
647644fc5c1Stron# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
648644fc5c1Stron
649644fc5c1Stron# This program is free software; you can redistribute it and/or modify
650644fc5c1Stron# it under the terms of the GNU General Public License as published by
651644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
652644fc5c1Stron# any later version.
653644fc5c1Stron
654644fc5c1Stron# This program is distributed in the hope that it will be useful,
655644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
656644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
657644fc5c1Stron# GNU General Public License for more details.
658644fc5c1Stron
659644fc5c1Stron# You should have received a copy of the GNU General Public License
660644fc5c1Stron# along with this program; if not, write to the Free Software
661644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
662644fc5c1Stron# 02111-1307, USA.
663644fc5c1Stron
664644fc5c1Stron#serial 2
665644fc5c1Stron
666644fc5c1Stron# _AM_OUTPUT_DEPENDENCY_COMMANDS
667644fc5c1Stron# ------------------------------
668644fc5c1StronAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669644fc5c1Stron[for mf in $CONFIG_FILES; do
670644fc5c1Stron  # Strip MF so we end up with the name of the file.
671644fc5c1Stron  mf=`echo "$mf" | sed -e 's/:.*$//'`
672644fc5c1Stron  # Check whether this is an Automake generated Makefile or not.
673644fc5c1Stron  # We used to match only the files named `Makefile.in', but
674644fc5c1Stron  # some people rename them; so instead we look at the file content.
675644fc5c1Stron  # Grep'ing the first line is not enough: some people post-process
676644fc5c1Stron  # each Makefile.in and add a new line on top of each file to say so.
677644fc5c1Stron  # So let's grep whole file.
678644fc5c1Stron  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679644fc5c1Stron    dirpart=`AS_DIRNAME("$mf")`
680644fc5c1Stron  else
681644fc5c1Stron    continue
682644fc5c1Stron  fi
683644fc5c1Stron  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684644fc5c1Stron  # Extract the definition of DEP_FILES from the Makefile without
685644fc5c1Stron  # running `make'.
686644fc5c1Stron  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687644fc5c1Stron  test -z "$DEPDIR" && continue
688644fc5c1Stron  # When using ansi2knr, U may be empty or an underscore; expand it
689644fc5c1Stron  U=`sed -n -e '/^U = / s///p' < "$mf"`
690644fc5c1Stron  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691644fc5c1Stron  # We invoke sed twice because it is the simplest approach to
692644fc5c1Stron  # changing $(DEPDIR) to its actual value in the expansion.
693644fc5c1Stron  for file in `sed -n -e '
694644fc5c1Stron    /^DEP_FILES = .*\\\\$/ {
695644fc5c1Stron      s/^DEP_FILES = //
696644fc5c1Stron      :loop
697644fc5c1Stron	s/\\\\$//
698644fc5c1Stron	p
699644fc5c1Stron	n
700644fc5c1Stron	/\\\\$/ b loop
701644fc5c1Stron      p
702644fc5c1Stron    }
703644fc5c1Stron    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704644fc5c1Stron       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705644fc5c1Stron    # Make sure the directory exists.
706644fc5c1Stron    test -f "$dirpart/$file" && continue
707644fc5c1Stron    fdir=`AS_DIRNAME(["$file"])`
708644fc5c1Stron    AS_MKDIR_P([$dirpart/$fdir])
709644fc5c1Stron    # echo "creating $dirpart/$file"
710644fc5c1Stron    echo '# dummy' > "$dirpart/$file"
711644fc5c1Stron  done
712644fc5c1Strondone
713644fc5c1Stron])# _AM_OUTPUT_DEPENDENCY_COMMANDS
714644fc5c1Stron
715644fc5c1Stron
716644fc5c1Stron# AM_OUTPUT_DEPENDENCY_COMMANDS
717644fc5c1Stron# -----------------------------
718644fc5c1Stron# This macro should only be invoked once -- use via AC_REQUIRE.
719644fc5c1Stron#
720644fc5c1Stron# This code is only required when automatic dependency tracking
721644fc5c1Stron# is enabled.  FIXME.  This creates each `.P' file that we will
722644fc5c1Stron# need in order to bootstrap the dependency handling code.
723644fc5c1StronAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724644fc5c1Stron[AC_CONFIG_COMMANDS([depfiles],
725644fc5c1Stron     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726644fc5c1Stron     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
727644fc5c1Stron])
728644fc5c1Stron
729644fc5c1Stron# Check to see how 'make' treats includes.	-*- Autoconf -*-
730644fc5c1Stron
731644fc5c1Stron# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
732644fc5c1Stron
733644fc5c1Stron# This program is free software; you can redistribute it and/or modify
734644fc5c1Stron# it under the terms of the GNU General Public License as published by
735644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
736644fc5c1Stron# any later version.
737644fc5c1Stron
738644fc5c1Stron# This program is distributed in the hope that it will be useful,
739644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
740644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741644fc5c1Stron# GNU General Public License for more details.
742644fc5c1Stron
743644fc5c1Stron# You should have received a copy of the GNU General Public License
744644fc5c1Stron# along with this program; if not, write to the Free Software
745644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746644fc5c1Stron# 02111-1307, USA.
747644fc5c1Stron
748644fc5c1Stron# serial 2
749644fc5c1Stron
750644fc5c1Stron# AM_MAKE_INCLUDE()
751644fc5c1Stron# -----------------
752644fc5c1Stron# Check to see how make treats includes.
753644fc5c1StronAC_DEFUN([AM_MAKE_INCLUDE],
754644fc5c1Stron[am_make=${MAKE-make}
755644fc5c1Stroncat > confinc << 'END'
756644fc5c1Stronam__doit:
757644fc5c1Stron	@echo done
758644fc5c1Stron.PHONY: am__doit
759644fc5c1StronEND
760644fc5c1Stron# If we don't find an include directive, just comment out the code.
761644fc5c1StronAC_MSG_CHECKING([for style of include used by $am_make])
762644fc5c1Stronam__include="#"
763644fc5c1Stronam__quote=
764644fc5c1Stron_am_result=none
765644fc5c1Stron# First try GNU make style include.
766644fc5c1Stronecho "include confinc" > confmf
767644fc5c1Stron# We grep out `Entering directory' and `Leaving directory'
768644fc5c1Stron# messages which can occur if `w' ends up in MAKEFLAGS.
769644fc5c1Stron# In particular we don't look at `^make:' because GNU make might
770644fc5c1Stron# be invoked under some other name (usually "gmake"), in which
771644fc5c1Stron# case it prints its new name instead of `make'.
772644fc5c1Stronif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
773644fc5c1Stron   am__include=include
774644fc5c1Stron   am__quote=
775644fc5c1Stron   _am_result=GNU
776644fc5c1Stronfi
777644fc5c1Stron# Now try BSD make style include.
778644fc5c1Stronif test "$am__include" = "#"; then
779644fc5c1Stron   echo '.include "confinc"' > confmf
780644fc5c1Stron   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
781644fc5c1Stron      am__include=.include
782644fc5c1Stron      am__quote="\""
783644fc5c1Stron      _am_result=BSD
784644fc5c1Stron   fi
785644fc5c1Stronfi
786644fc5c1StronAC_SUBST([am__include])
787644fc5c1StronAC_SUBST([am__quote])
788644fc5c1StronAC_MSG_RESULT([$_am_result])
789644fc5c1Stronrm -f confinc confmf
790644fc5c1Stron])
791644fc5c1Stron
792644fc5c1Stron# AM_CONDITIONAL                                              -*- Autoconf -*-
793644fc5c1Stron
794644fc5c1Stron# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
795644fc5c1Stron
796644fc5c1Stron# This program is free software; you can redistribute it and/or modify
797644fc5c1Stron# it under the terms of the GNU General Public License as published by
798644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
799644fc5c1Stron# any later version.
800644fc5c1Stron
801644fc5c1Stron# This program is distributed in the hope that it will be useful,
802644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
803644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
804644fc5c1Stron# GNU General Public License for more details.
805644fc5c1Stron
806644fc5c1Stron# You should have received a copy of the GNU General Public License
807644fc5c1Stron# along with this program; if not, write to the Free Software
808644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
809644fc5c1Stron# 02111-1307, USA.
810644fc5c1Stron
811644fc5c1Stron# serial 5
812644fc5c1Stron
813644fc5c1StronAC_PREREQ(2.52)
814644fc5c1Stron
815644fc5c1Stron# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816644fc5c1Stron# -------------------------------------
817644fc5c1Stron# Define a conditional.
818644fc5c1StronAC_DEFUN([AM_CONDITIONAL],
819644fc5c1Stron[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
820644fc5c1Stron        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821644fc5c1StronAC_SUBST([$1_TRUE])
822644fc5c1StronAC_SUBST([$1_FALSE])
823644fc5c1Stronif $2; then
824644fc5c1Stron  $1_TRUE=
825644fc5c1Stron  $1_FALSE='#'
826644fc5c1Stronelse
827644fc5c1Stron  $1_TRUE='#'
828644fc5c1Stron  $1_FALSE=
829644fc5c1Stronfi
830644fc5c1StronAC_CONFIG_COMMANDS_PRE(
831644fc5c1Stron[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832644fc5c1Stron  AC_MSG_ERROR([conditional "$1" was never defined.
833644fc5c1StronUsually this means the macro was only invoked conditionally.])
834644fc5c1Stronfi])])
835644fc5c1Stron
836644fc5c1Stron# Add --enable-maintainer-mode option to configure.
837644fc5c1Stron# From Jim Meyering
838644fc5c1Stron
839644fc5c1Stron# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
840644fc5c1Stron
841644fc5c1Stron# This program is free software; you can redistribute it and/or modify
842644fc5c1Stron# it under the terms of the GNU General Public License as published by
843644fc5c1Stron# the Free Software Foundation; either version 2, or (at your option)
844644fc5c1Stron# any later version.
845644fc5c1Stron
846644fc5c1Stron# This program is distributed in the hope that it will be useful,
847644fc5c1Stron# but WITHOUT ANY WARRANTY; without even the implied warranty of
848644fc5c1Stron# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
849644fc5c1Stron# GNU General Public License for more details.
850644fc5c1Stron
851644fc5c1Stron# You should have received a copy of the GNU General Public License
852644fc5c1Stron# along with this program; if not, write to the Free Software
853644fc5c1Stron# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
854644fc5c1Stron# 02111-1307, USA.
855644fc5c1Stron
856644fc5c1Stron# serial 2
857644fc5c1Stron
858644fc5c1StronAC_DEFUN([AM_MAINTAINER_MODE],
859644fc5c1Stron[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
860644fc5c1Stron  dnl maintainer-mode is disabled by default
861644fc5c1Stron  AC_ARG_ENABLE(maintainer-mode,
862644fc5c1Stron[  --enable-maintainer-mode enable make rules and dependencies not useful
863644fc5c1Stron                          (and sometimes confusing) to the casual installer],
864644fc5c1Stron      USE_MAINTAINER_MODE=$enableval,
865644fc5c1Stron      USE_MAINTAINER_MODE=no)
866644fc5c1Stron  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
867644fc5c1Stron  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
868644fc5c1Stron  MAINT=$MAINTAINER_MODE_TRUE
869644fc5c1Stron  AC_SUBST(MAINT)dnl
870644fc5c1Stron]
871644fc5c1Stron)
872644fc5c1Stron
873644fc5c1StronAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
874644fc5c1Stron
875644fc5c1Strondnl Copyright 2005 Red Hat, Inc
876644fc5c1Strondnl
877644fc5c1Strondnl Permission to use, copy, modify, distribute, and sell this software and its
878644fc5c1Strondnl documentation for any purpose is hereby granted without fee, provided that
879644fc5c1Strondnl the above copyright notice appear in all copies and that both that
880644fc5c1Strondnl copyright notice and this permission notice appear in supporting
881644fc5c1Strondnl documentation.
882644fc5c1Strondnl
883644fc5c1Strondnl The above copyright notice and this permission notice shall be included
884644fc5c1Strondnl in all copies or substantial portions of the Software.
885644fc5c1Strondnl
886644fc5c1Strondnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
887644fc5c1Strondnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
888644fc5c1Strondnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
889644fc5c1Strondnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
890644fc5c1Strondnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
891644fc5c1Strondnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
892644fc5c1Strondnl OTHER DEALINGS IN THE SOFTWARE.
893644fc5c1Strondnl
894644fc5c1Strondnl Except as contained in this notice, the name of the copyright holders shall
895644fc5c1Strondnl not be used in advertising or otherwise to promote the sale, use or
896644fc5c1Strondnl other dealings in this Software without prior written authorization
897644fc5c1Strondnl from the copyright holders.
898644fc5c1Strondnl
899644fc5c1Stron
900644fc5c1Stron# XORG_RELEASE_VERSION
901644fc5c1Stron# --------------------
902644fc5c1Stron# Adds --with/without-release-string and changes the PACKAGE and
903644fc5c1Stron# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
904644fc5c1Stron# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
905644fc5c1Stron 
906644fc5c1StronAC_DEFUN([XORG_RELEASE_VERSION],[
907644fc5c1Stron	AC_ARG_WITH(release-version,
908644fc5c1Stron			AC_HELP_STRING([--with-release-version=STRING],
909644fc5c1Stron				[Use release version string in package name]),
910644fc5c1Stron			[RELEASE_VERSION="$withval"],
911644fc5c1Stron			[RELEASE_VERSION=""])
912644fc5c1Stron	if test "x$RELEASE_VERSION" != "x"; then
913644fc5c1Stron		PACKAGE="$PACKAGE-$RELEASE_VERSION"
914644fc5c1Stron		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
915644fc5c1Stron		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
916644fc5c1Stron	fi
917644fc5c1Stron])
918644fc5c1Stron
919