aclocal.m4 revision 129be1b7
1129be1b7Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2129be1b7Smrg
3129be1b7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4129be1b7Smrg# Free Software Foundation, Inc.
5129be1b7Smrg# This file is free software; the Free Software Foundation
6129be1b7Smrg# gives unlimited permission to copy and/or distribute it,
7129be1b7Smrg# with or without modifications, as long as this notice is preserved.
8129be1b7Smrg
9129be1b7Smrg# This program is distributed in the hope that it will be useful,
10129be1b7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11129be1b7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12129be1b7Smrg# PARTICULAR PURPOSE.
13129be1b7Smrg
14129be1b7Smrg# Do all the work for Automake.                            -*- Autoconf -*-
15129be1b7Smrg
16129be1b7Smrg# This macro actually does too much some checks are only needed if
17129be1b7Smrg# your package does certain things.  But this isn't really a big deal.
18129be1b7Smrg
19129be1b7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20129be1b7Smrg# Free Software Foundation, Inc.
21129be1b7Smrg
22129be1b7Smrg# This program is free software; you can redistribute it and/or modify
23129be1b7Smrg# it under the terms of the GNU General Public License as published by
24129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
25129be1b7Smrg# any later version.
26129be1b7Smrg
27129be1b7Smrg# This program is distributed in the hope that it will be useful,
28129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
29129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30129be1b7Smrg# GNU General Public License for more details.
31129be1b7Smrg
32129be1b7Smrg# You should have received a copy of the GNU General Public License
33129be1b7Smrg# along with this program; if not, write to the Free Software
34129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35129be1b7Smrg# 02111-1307, USA.
36129be1b7Smrg
37129be1b7Smrg# serial 10
38129be1b7Smrg
39129be1b7SmrgAC_PREREQ([2.54])
40129be1b7Smrg
41129be1b7Smrg# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42129be1b7Smrg# the ones we care about.
43129be1b7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44129be1b7Smrg
45129be1b7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46129be1b7Smrg# AM_INIT_AUTOMAKE([OPTIONS])
47129be1b7Smrg# -----------------------------------------------
48129be1b7Smrg# The call with PACKAGE and VERSION arguments is the old style
49129be1b7Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50129be1b7Smrg# and VERSION should now be passed to AC_INIT and removed from
51129be1b7Smrg# the call to AM_INIT_AUTOMAKE.
52129be1b7Smrg# We support both call styles for the transition.  After
53129be1b7Smrg# the next Automake release, Autoconf can make the AC_INIT
54129be1b7Smrg# arguments mandatory, and then we can depend on a new Autoconf
55129be1b7Smrg# release and drop the old call support.
56129be1b7SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
57129be1b7Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58129be1b7Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl
59129be1b7Smrg# test to see if srcdir already configured
60129be1b7Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
61129be1b7Smrg   test -f $srcdir/config.status; then
62129be1b7Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63129be1b7Smrgfi
64129be1b7Smrg
65129be1b7Smrg# test whether we have cygpath
66129be1b7Smrgif test -z "$CYGPATH_W"; then
67129be1b7Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
68129be1b7Smrg    CYGPATH_W='cygpath -w'
69129be1b7Smrg  else
70129be1b7Smrg    CYGPATH_W=echo
71129be1b7Smrg  fi
72129be1b7Smrgfi
73129be1b7SmrgAC_SUBST([CYGPATH_W])
74129be1b7Smrg
75129be1b7Smrg# Define the identity of the package.
76129be1b7Smrgdnl Distinguish between old-style and new-style calls.
77129be1b7Smrgm4_ifval([$2],
78129be1b7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79129be1b7Smrg AC_SUBST([PACKAGE], [$1])dnl
80129be1b7Smrg AC_SUBST([VERSION], [$2])],
81129be1b7Smrg[_AM_SET_OPTIONS([$1])dnl
82129be1b7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83129be1b7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84129be1b7Smrg
85129be1b7Smrg_AM_IF_OPTION([no-define],,
86129be1b7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87129be1b7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88129be1b7Smrg
89129be1b7Smrg# Some tools Automake needs.
90129be1b7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
91129be1b7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
92129be1b7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93129be1b7SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
94129be1b7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95129be1b7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
96129be1b7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
97129be1b7SmrgAM_MISSING_PROG(AMTAR, tar)
98129be1b7SmrgAM_PROG_INSTALL_SH
99129be1b7SmrgAM_PROG_INSTALL_STRIP
100129be1b7Smrg# We need awk for the "check" target.  The system "awk" is bad on
101129be1b7Smrg# some platforms.
102129be1b7SmrgAC_REQUIRE([AC_PROG_AWK])dnl
103129be1b7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
104129be1b7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
105129be1b7Smrg
106129be1b7Smrg_AM_IF_OPTION([no-dependencies],,
107129be1b7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
108129be1b7Smrg                  [_AM_DEPENDENCIES(CC)],
109129be1b7Smrg                  [define([AC_PROG_CC],
110129be1b7Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111129be1b7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
112129be1b7Smrg                  [_AM_DEPENDENCIES(CXX)],
113129be1b7Smrg                  [define([AC_PROG_CXX],
114129be1b7Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115129be1b7Smrg])
116129be1b7Smrg])
117129be1b7Smrg
118129be1b7Smrg
119129be1b7Smrg# When config.status generates a header, we must update the stamp-h file.
120129be1b7Smrg# This file resides in the same directory as the config header
121129be1b7Smrg# that is generated.  The stamp files are numbered to have different names.
122129be1b7Smrg
123129be1b7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124129be1b7Smrg# loop where config.status creates the headers, so we can generate
125129be1b7Smrg# our stamp files there.
126129be1b7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127129be1b7Smrg[# Compute $1's index in $config_headers.
128129be1b7Smrg_am_stamp_count=1
129129be1b7Smrgfor _am_header in $config_headers :; do
130129be1b7Smrg  case $_am_header in
131129be1b7Smrg    $1 | $1:* )
132129be1b7Smrg      break ;;
133129be1b7Smrg    * )
134129be1b7Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135129be1b7Smrg  esac
136129be1b7Smrgdone
137129be1b7Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138129be1b7Smrg
139129be1b7Smrg# Copyright 2002  Free Software Foundation, Inc.
140129be1b7Smrg
141129be1b7Smrg# This program is free software; you can redistribute it and/or modify
142129be1b7Smrg# it under the terms of the GNU General Public License as published by
143129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
144129be1b7Smrg# any later version.
145129be1b7Smrg
146129be1b7Smrg# This program is distributed in the hope that it will be useful,
147129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
148129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149129be1b7Smrg# GNU General Public License for more details.
150129be1b7Smrg
151129be1b7Smrg# You should have received a copy of the GNU General Public License
152129be1b7Smrg# along with this program; if not, write to the Free Software
153129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154129be1b7Smrg
155129be1b7Smrg# AM_AUTOMAKE_VERSION(VERSION)
156129be1b7Smrg# ----------------------------
157129be1b7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
158129be1b7Smrg# generated from the m4 files accompanying Automake X.Y.
159129be1b7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160129be1b7Smrg
161129be1b7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
162129be1b7Smrg# -------------------------------
163129be1b7Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
164129be1b7Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165129be1b7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166129be1b7Smrg	 [AM_AUTOMAKE_VERSION([1.7.9])])
167129be1b7Smrg
168129be1b7Smrg# Helper functions for option handling.                    -*- Autoconf -*-
169129be1b7Smrg
170129be1b7Smrg# Copyright 2001, 2002  Free Software Foundation, Inc.
171129be1b7Smrg
172129be1b7Smrg# This program is free software; you can redistribute it and/or modify
173129be1b7Smrg# it under the terms of the GNU General Public License as published by
174129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
175129be1b7Smrg# any later version.
176129be1b7Smrg
177129be1b7Smrg# This program is distributed in the hope that it will be useful,
178129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
179129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180129be1b7Smrg# GNU General Public License for more details.
181129be1b7Smrg
182129be1b7Smrg# You should have received a copy of the GNU General Public License
183129be1b7Smrg# along with this program; if not, write to the Free Software
184129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185129be1b7Smrg# 02111-1307, USA.
186129be1b7Smrg
187129be1b7Smrg# serial 2
188129be1b7Smrg
189129be1b7Smrg# _AM_MANGLE_OPTION(NAME)
190129be1b7Smrg# -----------------------
191129be1b7SmrgAC_DEFUN([_AM_MANGLE_OPTION],
192129be1b7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193129be1b7Smrg
194129be1b7Smrg# _AM_SET_OPTION(NAME)
195129be1b7Smrg# ------------------------------
196129be1b7Smrg# Set option NAME.  Presently that only means defining a flag for this option.
197129be1b7SmrgAC_DEFUN([_AM_SET_OPTION],
198129be1b7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199129be1b7Smrg
200129be1b7Smrg# _AM_SET_OPTIONS(OPTIONS)
201129be1b7Smrg# ----------------------------------
202129be1b7Smrg# OPTIONS is a space-separated list of Automake options.
203129be1b7SmrgAC_DEFUN([_AM_SET_OPTIONS],
204129be1b7Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205129be1b7Smrg
206129be1b7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207129be1b7Smrg# -------------------------------------------
208129be1b7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209129be1b7SmrgAC_DEFUN([_AM_IF_OPTION],
210129be1b7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211129be1b7Smrg
212129be1b7Smrg#
213129be1b7Smrg# Check to make sure that the build environment is sane.
214129be1b7Smrg#
215129be1b7Smrg
216129be1b7Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217129be1b7Smrg
218129be1b7Smrg# This program is free software; you can redistribute it and/or modify
219129be1b7Smrg# it under the terms of the GNU General Public License as published by
220129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
221129be1b7Smrg# any later version.
222129be1b7Smrg
223129be1b7Smrg# This program is distributed in the hope that it will be useful,
224129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
225129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226129be1b7Smrg# GNU General Public License for more details.
227129be1b7Smrg
228129be1b7Smrg# You should have received a copy of the GNU General Public License
229129be1b7Smrg# along with this program; if not, write to the Free Software
230129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231129be1b7Smrg# 02111-1307, USA.
232129be1b7Smrg
233129be1b7Smrg# serial 3
234129be1b7Smrg
235129be1b7Smrg# AM_SANITY_CHECK
236129be1b7Smrg# ---------------
237129be1b7SmrgAC_DEFUN([AM_SANITY_CHECK],
238129be1b7Smrg[AC_MSG_CHECKING([whether build environment is sane])
239129be1b7Smrg# Just in case
240129be1b7Smrgsleep 1
241129be1b7Smrgecho timestamp > conftest.file
242129be1b7Smrg# Do `set' in a subshell so we don't clobber the current shell's
243129be1b7Smrg# arguments.  Must try -L first in case configure is actually a
244129be1b7Smrg# symlink; some systems play weird games with the mod time of symlinks
245129be1b7Smrg# (eg FreeBSD returns the mod time of the symlink's containing
246129be1b7Smrg# directory).
247129be1b7Smrgif (
248129be1b7Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249129be1b7Smrg   if test "$[*]" = "X"; then
250129be1b7Smrg      # -L didn't work.
251129be1b7Smrg      set X `ls -t $srcdir/configure conftest.file`
252129be1b7Smrg   fi
253129be1b7Smrg   rm -f conftest.file
254129be1b7Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
255129be1b7Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256129be1b7Smrg
257129be1b7Smrg      # If neither matched, then we have a broken ls.  This can happen
258129be1b7Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
259129be1b7Smrg      # broken ls alias from the environment.  This has actually
260129be1b7Smrg      # happened.  Such a system could not be considered "sane".
261129be1b7Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262129be1b7Smrgalias in your environment])
263129be1b7Smrg   fi
264129be1b7Smrg
265129be1b7Smrg   test "$[2]" = conftest.file
266129be1b7Smrg   )
267129be1b7Smrgthen
268129be1b7Smrg   # Ok.
269129be1b7Smrg   :
270129be1b7Smrgelse
271129be1b7Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
272129be1b7SmrgCheck your system clock])
273129be1b7Smrgfi
274129be1b7SmrgAC_MSG_RESULT(yes)])
275129be1b7Smrg
276129be1b7Smrg#  -*- Autoconf -*-
277129be1b7Smrg
278129be1b7Smrg
279129be1b7Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280129be1b7Smrg
281129be1b7Smrg# This program is free software; you can redistribute it and/or modify
282129be1b7Smrg# it under the terms of the GNU General Public License as published by
283129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
284129be1b7Smrg# any later version.
285129be1b7Smrg
286129be1b7Smrg# This program is distributed in the hope that it will be useful,
287129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
288129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289129be1b7Smrg# GNU General Public License for more details.
290129be1b7Smrg
291129be1b7Smrg# You should have received a copy of the GNU General Public License
292129be1b7Smrg# along with this program; if not, write to the Free Software
293129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294129be1b7Smrg# 02111-1307, USA.
295129be1b7Smrg
296129be1b7Smrg# serial 3
297129be1b7Smrg
298129be1b7Smrg# AM_MISSING_PROG(NAME, PROGRAM)
299129be1b7Smrg# ------------------------------
300129be1b7SmrgAC_DEFUN([AM_MISSING_PROG],
301129be1b7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
302129be1b7Smrg$1=${$1-"${am_missing_run}$2"}
303129be1b7SmrgAC_SUBST($1)])
304129be1b7Smrg
305129be1b7Smrg
306129be1b7Smrg# AM_MISSING_HAS_RUN
307129be1b7Smrg# ------------------
308129be1b7Smrg# Define MISSING if not defined so far and test if it supports --run.
309129be1b7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
310129be1b7SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
311129be1b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312129be1b7Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313129be1b7Smrg# Use eval to expand $SHELL
314129be1b7Smrgif eval "$MISSING --run true"; then
315129be1b7Smrg  am_missing_run="$MISSING --run "
316129be1b7Smrgelse
317129be1b7Smrg  am_missing_run=
318129be1b7Smrg  AC_MSG_WARN([`missing' script is too old or missing])
319129be1b7Smrgfi
320129be1b7Smrg])
321129be1b7Smrg
322129be1b7Smrg# AM_AUX_DIR_EXPAND
323129be1b7Smrg
324129be1b7Smrg# Copyright 2001 Free Software Foundation, Inc.
325129be1b7Smrg
326129be1b7Smrg# This program is free software; you can redistribute it and/or modify
327129be1b7Smrg# it under the terms of the GNU General Public License as published by
328129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
329129be1b7Smrg# any later version.
330129be1b7Smrg
331129be1b7Smrg# This program is distributed in the hope that it will be useful,
332129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
333129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334129be1b7Smrg# GNU General Public License for more details.
335129be1b7Smrg
336129be1b7Smrg# You should have received a copy of the GNU General Public License
337129be1b7Smrg# along with this program; if not, write to the Free Software
338129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339129be1b7Smrg# 02111-1307, USA.
340129be1b7Smrg
341129be1b7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342129be1b7Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
343129be1b7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344129be1b7Smrg#
345129be1b7Smrg# Of course, Automake must honor this variable whenever it calls a
346129be1b7Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
347129be1b7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
348129be1b7Smrg# depending on how configure is run.  This is pretty annoying, since
349129be1b7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350129be1b7Smrg# source directory, any form will work fine, but in subdirectories a
351129be1b7Smrg# relative path needs to be adjusted first.
352129be1b7Smrg#
353129be1b7Smrg# $ac_aux_dir/missing
354129be1b7Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
355129be1b7Smrg# $top_srcdir/$ac_aux_dir/missing
356129be1b7Smrg#    fails if $ac_aux_dir is absolute,
357129be1b7Smrg#    fails when called from a subdirectory in a VPATH build with
358129be1b7Smrg#          a relative $ac_aux_dir
359129be1b7Smrg#
360129be1b7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361129be1b7Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
362129be1b7Smrg# harmless because $srcdir is `.', but things will broke when you
363129be1b7Smrg# start a VPATH build or use an absolute $srcdir.
364129be1b7Smrg#
365129be1b7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366129be1b7Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
367129be1b7Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368129be1b7Smrg# and then we would define $MISSING as
369129be1b7Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
370129be1b7Smrg# This will work as long as MISSING is not called from configure, because
371129be1b7Smrg# unfortunately $(top_srcdir) has no meaning in configure.
372129be1b7Smrg# However there are other variables, like CC, which are often used in
373129be1b7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
374129be1b7Smrg#
375129be1b7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
376129be1b7Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
377129be1b7Smrg# configured tree to be moved without reconfiguration.
378129be1b7Smrg
379129be1b7Smrg# Rely on autoconf to set up CDPATH properly.
380129be1b7SmrgAC_PREREQ([2.50])
381129be1b7Smrg
382129be1b7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [
383129be1b7Smrg# expand $ac_aux_dir to an absolute path
384129be1b7Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
385129be1b7Smrg])
386129be1b7Smrg
387129be1b7Smrg# AM_PROG_INSTALL_SH
388129be1b7Smrg# ------------------
389129be1b7Smrg# Define $install_sh.
390129be1b7Smrg
391129be1b7Smrg# Copyright 2001 Free Software Foundation, Inc.
392129be1b7Smrg
393129be1b7Smrg# This program is free software; you can redistribute it and/or modify
394129be1b7Smrg# it under the terms of the GNU General Public License as published by
395129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
396129be1b7Smrg# any later version.
397129be1b7Smrg
398129be1b7Smrg# This program is distributed in the hope that it will be useful,
399129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
400129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401129be1b7Smrg# GNU General Public License for more details.
402129be1b7Smrg
403129be1b7Smrg# You should have received a copy of the GNU General Public License
404129be1b7Smrg# along with this program; if not, write to the Free Software
405129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406129be1b7Smrg# 02111-1307, USA.
407129be1b7Smrg
408129be1b7SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
409129be1b7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410129be1b7Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
411129be1b7SmrgAC_SUBST(install_sh)])
412129be1b7Smrg
413129be1b7Smrg# AM_PROG_INSTALL_STRIP
414129be1b7Smrg
415129be1b7Smrg# Copyright 2001 Free Software Foundation, Inc.
416129be1b7Smrg
417129be1b7Smrg# This program is free software; you can redistribute it and/or modify
418129be1b7Smrg# it under the terms of the GNU General Public License as published by
419129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
420129be1b7Smrg# any later version.
421129be1b7Smrg
422129be1b7Smrg# This program is distributed in the hope that it will be useful,
423129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
424129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425129be1b7Smrg# GNU General Public License for more details.
426129be1b7Smrg
427129be1b7Smrg# You should have received a copy of the GNU General Public License
428129be1b7Smrg# along with this program; if not, write to the Free Software
429129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430129be1b7Smrg# 02111-1307, USA.
431129be1b7Smrg
432129be1b7Smrg# One issue with vendor `install' (even GNU) is that you can't
433129be1b7Smrg# specify the program used to strip binaries.  This is especially
434129be1b7Smrg# annoying in cross-compiling environments, where the build's strip
435129be1b7Smrg# is unlikely to handle the host's binaries.
436129be1b7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
437129be1b7Smrg# always use install-sh in `make install-strip', and initialize
438129be1b7Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
439129be1b7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
440129be1b7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441129be1b7Smrg# Installed binaries are usually stripped using `strip' when the user
442129be1b7Smrg# run `make install-strip'.  However `strip' might not be the right
443129be1b7Smrg# tool to use in cross-compilation environments, therefore Automake
444129be1b7Smrg# will honor the `STRIP' environment variable to overrule this program.
445129be1b7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446129be1b7Smrgif test "$cross_compiling" != no; then
447129be1b7Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
448129be1b7Smrgfi
449129be1b7SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450129be1b7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
451129be1b7Smrg
452129be1b7Smrg#                                                          -*- Autoconf -*-
453129be1b7Smrg# Copyright (C) 2003  Free Software Foundation, Inc.
454129be1b7Smrg
455129be1b7Smrg# This program is free software; you can redistribute it and/or modify
456129be1b7Smrg# it under the terms of the GNU General Public License as published by
457129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
458129be1b7Smrg# any later version.
459129be1b7Smrg
460129be1b7Smrg# This program is distributed in the hope that it will be useful,
461129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
462129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463129be1b7Smrg# GNU General Public License for more details.
464129be1b7Smrg
465129be1b7Smrg# You should have received a copy of the GNU General Public License
466129be1b7Smrg# along with this program; if not, write to the Free Software
467129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468129be1b7Smrg# 02111-1307, USA.
469129be1b7Smrg
470129be1b7Smrg# serial 1
471129be1b7Smrg
472129be1b7Smrg# Check whether the underlying file-system supports filenames
473129be1b7Smrg# with a leading dot.  For instance MS-DOS doesn't.
474129be1b7SmrgAC_DEFUN([AM_SET_LEADING_DOT],
475129be1b7Smrg[rm -rf .tst 2>/dev/null
476129be1b7Smrgmkdir .tst 2>/dev/null
477129be1b7Smrgif test -d .tst; then
478129be1b7Smrg  am__leading_dot=.
479129be1b7Smrgelse
480129be1b7Smrg  am__leading_dot=_
481129be1b7Smrgfi
482129be1b7Smrgrmdir .tst 2>/dev/null
483129be1b7SmrgAC_SUBST([am__leading_dot])])
484129be1b7Smrg
485129be1b7Smrg# serial 5						-*- Autoconf -*-
486129be1b7Smrg
487129be1b7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488129be1b7Smrg
489129be1b7Smrg# This program is free software; you can redistribute it and/or modify
490129be1b7Smrg# it under the terms of the GNU General Public License as published by
491129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
492129be1b7Smrg# any later version.
493129be1b7Smrg
494129be1b7Smrg# This program is distributed in the hope that it will be useful,
495129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
496129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497129be1b7Smrg# GNU General Public License for more details.
498129be1b7Smrg
499129be1b7Smrg# You should have received a copy of the GNU General Public License
500129be1b7Smrg# along with this program; if not, write to the Free Software
501129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502129be1b7Smrg# 02111-1307, USA.
503129be1b7Smrg
504129be1b7Smrg
505129be1b7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506129be1b7Smrg# written in clear, in which case automake, when reading aclocal.m4,
507129be1b7Smrg# will think it sees a *use*, and therefore will trigger all it's
508129be1b7Smrg# C support machinery.  Also note that it means that autoscan, seeing
509129be1b7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510129be1b7Smrg
511129be1b7Smrg
512129be1b7Smrg
513129be1b7Smrg# _AM_DEPENDENCIES(NAME)
514129be1b7Smrg# ----------------------
515129be1b7Smrg# See how the compiler implements dependency checking.
516129be1b7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
517129be1b7Smrg# We try a few techniques and use that to set a single cache variable.
518129be1b7Smrg#
519129be1b7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520129be1b7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521129be1b7Smrg# dependency, and given that the user is not expected to run this macro,
522129be1b7Smrg# just rely on AC_PROG_CC.
523129be1b7SmrgAC_DEFUN([_AM_DEPENDENCIES],
524129be1b7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
525129be1b7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526129be1b7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
527129be1b7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
528129be1b7Smrg
529129be1b7Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
530129be1b7Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
531129be1b7Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532129be1b7Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
533129be1b7Smrg                   [depcc="$$1"   am_compiler_list=])
534129be1b7Smrg
535129be1b7SmrgAC_CACHE_CHECK([dependency style of $depcc],
536129be1b7Smrg               [am_cv_$1_dependencies_compiler_type],
537129be1b7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538129be1b7Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
539129be1b7Smrg  # making bogus files that we don't know about and never remove.  For
540129be1b7Smrg  # instance it was reported that on HP-UX the gcc test will end up
541129be1b7Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
542129be1b7Smrg  # in D'.
543129be1b7Smrg  mkdir conftest.dir
544129be1b7Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
545129be1b7Smrg  # using a relative directory.
546129be1b7Smrg  cp "$am_depcomp" conftest.dir
547129be1b7Smrg  cd conftest.dir
548129be1b7Smrg  # We will build objects and dependencies in a subdirectory because
549129be1b7Smrg  # it helps to detect inapplicable dependency modes.  For instance
550129be1b7Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
551129be1b7Smrg  # side effect of compilation, but ICC will put the dependencies in
552129be1b7Smrg  # the current directory while Tru64 will put them in the object
553129be1b7Smrg  # directory.
554129be1b7Smrg  mkdir sub
555129be1b7Smrg
556129be1b7Smrg  am_cv_$1_dependencies_compiler_type=none
557129be1b7Smrg  if test "$am_compiler_list" = ""; then
558129be1b7Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
559129be1b7Smrg  fi
560129be1b7Smrg  for depmode in $am_compiler_list; do
561129be1b7Smrg    # Setup a source with many dependencies, because some compilers
562129be1b7Smrg    # like to wrap large dependency lists on column 80 (with \), and
563129be1b7Smrg    # we should not choose a depcomp mode which is confused by this.
564129be1b7Smrg    #
565129be1b7Smrg    # We need to recreate these files for each test, as the compiler may
566129be1b7Smrg    # overwrite some of them when testing with obscure command lines.
567129be1b7Smrg    # This happens at least with the AIX C compiler.
568129be1b7Smrg    : > sub/conftest.c
569129be1b7Smrg    for i in 1 2 3 4 5 6; do
570129be1b7Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
571129be1b7Smrg      : > sub/conftst$i.h
572129be1b7Smrg    done
573129be1b7Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
574129be1b7Smrg
575129be1b7Smrg    case $depmode in
576129be1b7Smrg    nosideeffect)
577129be1b7Smrg      # after this tag, mechanisms are not by side-effect, so they'll
578129be1b7Smrg      # only be used when explicitly requested
579129be1b7Smrg      if test "x$enable_dependency_tracking" = xyes; then
580129be1b7Smrg	continue
581129be1b7Smrg      else
582129be1b7Smrg	break
583129be1b7Smrg      fi
584129be1b7Smrg      ;;
585129be1b7Smrg    none) break ;;
586129be1b7Smrg    esac
587129be1b7Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
588129be1b7Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
589129be1b7Smrg    # handle `-M -o', and we need to detect this.
590129be1b7Smrg    if depmode=$depmode \
591129be1b7Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592129be1b7Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593129be1b7Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594129be1b7Smrg         >/dev/null 2>conftest.err &&
595129be1b7Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596129be1b7Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597129be1b7Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598129be1b7Smrg      # icc doesn't choke on unknown options, it will just issue warnings
599129be1b7Smrg      # (even with -Werror).  So we grep stderr for any message
600129be1b7Smrg      # that says an option was ignored.
601129be1b7Smrg      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602129be1b7Smrg        am_cv_$1_dependencies_compiler_type=$depmode
603129be1b7Smrg        break
604129be1b7Smrg      fi
605129be1b7Smrg    fi
606129be1b7Smrg  done
607129be1b7Smrg
608129be1b7Smrg  cd ..
609129be1b7Smrg  rm -rf conftest.dir
610129be1b7Smrgelse
611129be1b7Smrg  am_cv_$1_dependencies_compiler_type=none
612129be1b7Smrgfi
613129be1b7Smrg])
614129be1b7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615129be1b7SmrgAM_CONDITIONAL([am__fastdep$1], [
616129be1b7Smrg  test "x$enable_dependency_tracking" != xno \
617129be1b7Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
618129be1b7Smrg])
619129be1b7Smrg
620129be1b7Smrg
621129be1b7Smrg# AM_SET_DEPDIR
622129be1b7Smrg# -------------
623129be1b7Smrg# Choose a directory name for dependency files.
624129be1b7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
625129be1b7SmrgAC_DEFUN([AM_SET_DEPDIR],
626129be1b7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627129be1b7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
628129be1b7Smrg])
629129be1b7Smrg
630129be1b7Smrg
631129be1b7Smrg# AM_DEP_TRACK
632129be1b7Smrg# ------------
633129be1b7SmrgAC_DEFUN([AM_DEP_TRACK],
634129be1b7Smrg[AC_ARG_ENABLE(dependency-tracking,
635129be1b7Smrg[  --disable-dependency-tracking Speeds up one-time builds
636129be1b7Smrg  --enable-dependency-tracking  Do not reject slow dependency extractors])
637129be1b7Smrgif test "x$enable_dependency_tracking" != xno; then
638129be1b7Smrg  am_depcomp="$ac_aux_dir/depcomp"
639129be1b7Smrg  AMDEPBACKSLASH='\'
640129be1b7Smrgfi
641129be1b7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642129be1b7SmrgAC_SUBST([AMDEPBACKSLASH])
643129be1b7Smrg])
644129be1b7Smrg
645129be1b7Smrg# Generate code to set up dependency tracking.   -*- Autoconf -*-
646129be1b7Smrg
647129be1b7Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
648129be1b7Smrg
649129be1b7Smrg# This program is free software; you can redistribute it and/or modify
650129be1b7Smrg# it under the terms of the GNU General Public License as published by
651129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
652129be1b7Smrg# any later version.
653129be1b7Smrg
654129be1b7Smrg# This program is distributed in the hope that it will be useful,
655129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
656129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
657129be1b7Smrg# GNU General Public License for more details.
658129be1b7Smrg
659129be1b7Smrg# You should have received a copy of the GNU General Public License
660129be1b7Smrg# along with this program; if not, write to the Free Software
661129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
662129be1b7Smrg# 02111-1307, USA.
663129be1b7Smrg
664129be1b7Smrg#serial 2
665129be1b7Smrg
666129be1b7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
667129be1b7Smrg# ------------------------------
668129be1b7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669129be1b7Smrg[for mf in $CONFIG_FILES; do
670129be1b7Smrg  # Strip MF so we end up with the name of the file.
671129be1b7Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
672129be1b7Smrg  # Check whether this is an Automake generated Makefile or not.
673129be1b7Smrg  # We used to match only the files named `Makefile.in', but
674129be1b7Smrg  # some people rename them; so instead we look at the file content.
675129be1b7Smrg  # Grep'ing the first line is not enough: some people post-process
676129be1b7Smrg  # each Makefile.in and add a new line on top of each file to say so.
677129be1b7Smrg  # So let's grep whole file.
678129be1b7Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679129be1b7Smrg    dirpart=`AS_DIRNAME("$mf")`
680129be1b7Smrg  else
681129be1b7Smrg    continue
682129be1b7Smrg  fi
683129be1b7Smrg  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684129be1b7Smrg  # Extract the definition of DEP_FILES from the Makefile without
685129be1b7Smrg  # running `make'.
686129be1b7Smrg  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687129be1b7Smrg  test -z "$DEPDIR" && continue
688129be1b7Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
689129be1b7Smrg  U=`sed -n -e '/^U = / s///p' < "$mf"`
690129be1b7Smrg  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691129be1b7Smrg  # We invoke sed twice because it is the simplest approach to
692129be1b7Smrg  # changing $(DEPDIR) to its actual value in the expansion.
693129be1b7Smrg  for file in `sed -n -e '
694129be1b7Smrg    /^DEP_FILES = .*\\\\$/ {
695129be1b7Smrg      s/^DEP_FILES = //
696129be1b7Smrg      :loop
697129be1b7Smrg	s/\\\\$//
698129be1b7Smrg	p
699129be1b7Smrg	n
700129be1b7Smrg	/\\\\$/ b loop
701129be1b7Smrg      p
702129be1b7Smrg    }
703129be1b7Smrg    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704129be1b7Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705129be1b7Smrg    # Make sure the directory exists.
706129be1b7Smrg    test -f "$dirpart/$file" && continue
707129be1b7Smrg    fdir=`AS_DIRNAME(["$file"])`
708129be1b7Smrg    AS_MKDIR_P([$dirpart/$fdir])
709129be1b7Smrg    # echo "creating $dirpart/$file"
710129be1b7Smrg    echo '# dummy' > "$dirpart/$file"
711129be1b7Smrg  done
712129be1b7Smrgdone
713129be1b7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
714129be1b7Smrg
715129be1b7Smrg
716129be1b7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
717129be1b7Smrg# -----------------------------
718129be1b7Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
719129be1b7Smrg#
720129be1b7Smrg# This code is only required when automatic dependency tracking
721129be1b7Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
722129be1b7Smrg# need in order to bootstrap the dependency handling code.
723129be1b7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724129be1b7Smrg[AC_CONFIG_COMMANDS([depfiles],
725129be1b7Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726129be1b7Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
727129be1b7Smrg])
728129be1b7Smrg
729129be1b7Smrg# Check to see how 'make' treats includes.	-*- Autoconf -*-
730129be1b7Smrg
731129be1b7Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
732129be1b7Smrg
733129be1b7Smrg# This program is free software; you can redistribute it and/or modify
734129be1b7Smrg# it under the terms of the GNU General Public License as published by
735129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
736129be1b7Smrg# any later version.
737129be1b7Smrg
738129be1b7Smrg# This program is distributed in the hope that it will be useful,
739129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
740129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741129be1b7Smrg# GNU General Public License for more details.
742129be1b7Smrg
743129be1b7Smrg# You should have received a copy of the GNU General Public License
744129be1b7Smrg# along with this program; if not, write to the Free Software
745129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746129be1b7Smrg# 02111-1307, USA.
747129be1b7Smrg
748129be1b7Smrg# serial 2
749129be1b7Smrg
750129be1b7Smrg# AM_MAKE_INCLUDE()
751129be1b7Smrg# -----------------
752129be1b7Smrg# Check to see how make treats includes.
753129be1b7SmrgAC_DEFUN([AM_MAKE_INCLUDE],
754129be1b7Smrg[am_make=${MAKE-make}
755129be1b7Smrgcat > confinc << 'END'
756129be1b7Smrgam__doit:
757129be1b7Smrg	@echo done
758129be1b7Smrg.PHONY: am__doit
759129be1b7SmrgEND
760129be1b7Smrg# If we don't find an include directive, just comment out the code.
761129be1b7SmrgAC_MSG_CHECKING([for style of include used by $am_make])
762129be1b7Smrgam__include="#"
763129be1b7Smrgam__quote=
764129be1b7Smrg_am_result=none
765129be1b7Smrg# First try GNU make style include.
766129be1b7Smrgecho "include confinc" > confmf
767129be1b7Smrg# We grep out `Entering directory' and `Leaving directory'
768129be1b7Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
769129be1b7Smrg# In particular we don't look at `^make:' because GNU make might
770129be1b7Smrg# be invoked under some other name (usually "gmake"), in which
771129be1b7Smrg# case it prints its new name instead of `make'.
772129be1b7Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
773129be1b7Smrg   am__include=include
774129be1b7Smrg   am__quote=
775129be1b7Smrg   _am_result=GNU
776129be1b7Smrgfi
777129be1b7Smrg# Now try BSD make style include.
778129be1b7Smrgif test "$am__include" = "#"; then
779129be1b7Smrg   echo '.include "confinc"' > confmf
780129be1b7Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
781129be1b7Smrg      am__include=.include
782129be1b7Smrg      am__quote="\""
783129be1b7Smrg      _am_result=BSD
784129be1b7Smrg   fi
785129be1b7Smrgfi
786129be1b7SmrgAC_SUBST([am__include])
787129be1b7SmrgAC_SUBST([am__quote])
788129be1b7SmrgAC_MSG_RESULT([$_am_result])
789129be1b7Smrgrm -f confinc confmf
790129be1b7Smrg])
791129be1b7Smrg
792129be1b7Smrg# AM_CONDITIONAL                                              -*- Autoconf -*-
793129be1b7Smrg
794129be1b7Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
795129be1b7Smrg
796129be1b7Smrg# This program is free software; you can redistribute it and/or modify
797129be1b7Smrg# it under the terms of the GNU General Public License as published by
798129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
799129be1b7Smrg# any later version.
800129be1b7Smrg
801129be1b7Smrg# This program is distributed in the hope that it will be useful,
802129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
803129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
804129be1b7Smrg# GNU General Public License for more details.
805129be1b7Smrg
806129be1b7Smrg# You should have received a copy of the GNU General Public License
807129be1b7Smrg# along with this program; if not, write to the Free Software
808129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
809129be1b7Smrg# 02111-1307, USA.
810129be1b7Smrg
811129be1b7Smrg# serial 5
812129be1b7Smrg
813129be1b7SmrgAC_PREREQ(2.52)
814129be1b7Smrg
815129be1b7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816129be1b7Smrg# -------------------------------------
817129be1b7Smrg# Define a conditional.
818129be1b7SmrgAC_DEFUN([AM_CONDITIONAL],
819129be1b7Smrg[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
820129be1b7Smrg        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821129be1b7SmrgAC_SUBST([$1_TRUE])
822129be1b7SmrgAC_SUBST([$1_FALSE])
823129be1b7Smrgif $2; then
824129be1b7Smrg  $1_TRUE=
825129be1b7Smrg  $1_FALSE='#'
826129be1b7Smrgelse
827129be1b7Smrg  $1_TRUE='#'
828129be1b7Smrg  $1_FALSE=
829129be1b7Smrgfi
830129be1b7SmrgAC_CONFIG_COMMANDS_PRE(
831129be1b7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832129be1b7Smrg  AC_MSG_ERROR([conditional "$1" was never defined.
833129be1b7SmrgUsually this means the macro was only invoked conditionally.])
834129be1b7Smrgfi])])
835129be1b7Smrg
836129be1b7Smrg# Add --enable-maintainer-mode option to configure.
837129be1b7Smrg# From Jim Meyering
838129be1b7Smrg
839129be1b7Smrg# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
840129be1b7Smrg
841129be1b7Smrg# This program is free software; you can redistribute it and/or modify
842129be1b7Smrg# it under the terms of the GNU General Public License as published by
843129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
844129be1b7Smrg# any later version.
845129be1b7Smrg
846129be1b7Smrg# This program is distributed in the hope that it will be useful,
847129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
848129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
849129be1b7Smrg# GNU General Public License for more details.
850129be1b7Smrg
851129be1b7Smrg# You should have received a copy of the GNU General Public License
852129be1b7Smrg# along with this program; if not, write to the Free Software
853129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
854129be1b7Smrg# 02111-1307, USA.
855129be1b7Smrg
856129be1b7Smrg# serial 2
857129be1b7Smrg
858129be1b7SmrgAC_DEFUN([AM_MAINTAINER_MODE],
859129be1b7Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
860129be1b7Smrg  dnl maintainer-mode is disabled by default
861129be1b7Smrg  AC_ARG_ENABLE(maintainer-mode,
862129be1b7Smrg[  --enable-maintainer-mode enable make rules and dependencies not useful
863129be1b7Smrg                          (and sometimes confusing) to the casual installer],
864129be1b7Smrg      USE_MAINTAINER_MODE=$enableval,
865129be1b7Smrg      USE_MAINTAINER_MODE=no)
866129be1b7Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
867129be1b7Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
868129be1b7Smrg  MAINT=$MAINTAINER_MODE_TRUE
869129be1b7Smrg  AC_SUBST(MAINT)dnl
870129be1b7Smrg]
871129be1b7Smrg)
872129be1b7Smrg
873129be1b7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
874129be1b7Smrg
875129be1b7Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
876129be1b7Smrg
877129be1b7Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
878129be1b7Smrg
879129be1b7Smrg# This program is free software; you can redistribute it and/or modify
880129be1b7Smrg# it under the terms of the GNU General Public License as published by
881129be1b7Smrg# the Free Software Foundation; either version 2, or (at your option)
882129be1b7Smrg# any later version.
883129be1b7Smrg
884129be1b7Smrg# This program is distributed in the hope that it will be useful,
885129be1b7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
886129be1b7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
887129be1b7Smrg# GNU General Public License for more details.
888129be1b7Smrg
889129be1b7Smrg# You should have received a copy of the GNU General Public License
890129be1b7Smrg# along with this program; if not, write to the Free Software
891129be1b7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
892129be1b7Smrg# 02111-1307, USA.
893129be1b7Smrg
894129be1b7SmrgAC_PREREQ([2.52])
895129be1b7Smrg
896129be1b7Smrg# serial 6
897129be1b7Smrg
898129be1b7Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
899129be1b7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
900129be1b7Smrg
901129be1b7Smrgdnl Copyright 2005 Red Hat, Inc
902129be1b7Smrgdnl
903129be1b7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
904129be1b7Smrgdnl documentation for any purpose is hereby granted without fee, provided that
905129be1b7Smrgdnl the above copyright notice appear in all copies and that both that
906129be1b7Smrgdnl copyright notice and this permission notice appear in supporting
907129be1b7Smrgdnl documentation.
908129be1b7Smrgdnl
909129be1b7Smrgdnl The above copyright notice and this permission notice shall be included
910129be1b7Smrgdnl in all copies or substantial portions of the Software.
911129be1b7Smrgdnl
912129be1b7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
913129be1b7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
914129be1b7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
915129be1b7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
916129be1b7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
917129be1b7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
918129be1b7Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
919129be1b7Smrgdnl
920129be1b7Smrgdnl Except as contained in this notice, the name of the copyright holders shall
921129be1b7Smrgdnl not be used in advertising or otherwise to promote the sale, use or
922129be1b7Smrgdnl other dealings in this Software without prior written authorization
923129be1b7Smrgdnl from the copyright holders.
924129be1b7Smrgdnl
925129be1b7Smrg
926129be1b7Smrg# XORG_RELEASE_VERSION
927129be1b7Smrg# --------------------
928129be1b7Smrg# Adds --with/without-release-string and changes the PACKAGE and
929129be1b7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
930129be1b7Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
931129be1b7Smrg 
932129be1b7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
933129be1b7Smrg	AC_ARG_WITH(release-version,
934129be1b7Smrg			AC_HELP_STRING([--with-release-version=STRING],
935129be1b7Smrg				[Use release version string in package name]),
936129be1b7Smrg			[RELEASE_VERSION="$withval"],
937129be1b7Smrg			[RELEASE_VERSION=""])
938129be1b7Smrg	if test "x$RELEASE_VERSION" != "x"; then
939129be1b7Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
940129be1b7Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
941129be1b7Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
942129be1b7Smrg	fi
943129be1b7Smrg])
944129be1b7Smrg
945