aclocal.m4 revision 73143b9a
1# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(AC_AUTOCONF_VERSION, [2.61],,
17[m4_warning([this file was generated for autoconf 2.61.
18You have another version of autoconf.  It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22dnl Copyright 2005 Red Hat, Inc
23dnl
24dnl Permission to use, copy, modify, distribute, and sell this software and its
25dnl documentation for any purpose is hereby granted without fee, provided that
26dnl the above copyright notice appear in all copies and that both that
27dnl copyright notice and this permission notice appear in supporting
28dnl documentation.
29dnl
30dnl The above copyright notice and this permission notice shall be included
31dnl in all copies or substantial portions of the Software.
32dnl
33dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
34dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
35dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
36dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
37dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
38dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39dnl OTHER DEALINGS IN THE SOFTWARE.
40dnl
41dnl Except as contained in this notice, the name of the copyright holders shall
42dnl not be used in advertising or otherwise to promote the sale, use or
43dnl other dealings in this Software without prior written authorization
44dnl from the copyright holders.
45dnl
46
47# XORG_RELEASE_VERSION
48# --------------------
49# Adds --with/without-release-string and changes the PACKAGE and
50# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
51# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
52# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
53 
54AC_DEFUN([XORG_RELEASE_VERSION],[
55	AC_ARG_WITH(release-version,
56			AC_HELP_STRING([--with-release-version=STRING],
57				[Use release version string in package name]),
58			[RELEASE_VERSION="$withval"],
59			[RELEASE_VERSION=""])
60	if test "x$RELEASE_VERSION" != "x"; then
61		PACKAGE="$PACKAGE-$RELEASE_VERSION"
62		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
63		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
64	fi
65	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
66		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
67		[Major version of this package])
68	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
69	if test "x$PVM" = "x"; then
70		PVM="0"
71	fi
72	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
73		[$PVM],
74		[Minor version of this package])
75	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
76	if test "x$PVP" = "x"; then
77		PVP="0"
78	fi
79	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
80		[$PVP],
81		[Patch version of this package])
82])
83
84# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
85#
86# This file is free software; the Free Software Foundation
87# gives unlimited permission to copy and/or distribute it,
88# with or without modifications, as long as this notice is preserved.
89
90# AM_AUTOMAKE_VERSION(VERSION)
91# ----------------------------
92# Automake X.Y traces this macro to ensure aclocal.m4 has been
93# generated from the m4 files accompanying Automake X.Y.
94# (This private macro should not be called outside this file.)
95AC_DEFUN([AM_AUTOMAKE_VERSION],
96[am__api_version='1.10'
97dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
98dnl require some minimum version.  Point them to the right macro.
99m4_if([$1], [1.10.1], [],
100      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
101])
102
103# _AM_AUTOCONF_VERSION(VERSION)
104# -----------------------------
105# aclocal traces this macro to find the Autoconf version.
106# This is a private macro too.  Using m4_define simplifies
107# the logic in aclocal, which can simply ignore this definition.
108m4_define([_AM_AUTOCONF_VERSION], [])
109
110# AM_SET_CURRENT_AUTOMAKE_VERSION
111# -------------------------------
112# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
113# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
114AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
115[AM_AUTOMAKE_VERSION([1.10.1])dnl
116m4_ifndef([AC_AUTOCONF_VERSION],
117  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
118_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
119
120# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
121
122# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
123#
124# This file is free software; the Free Software Foundation
125# gives unlimited permission to copy and/or distribute it,
126# with or without modifications, as long as this notice is preserved.
127
128# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
129# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
130# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
131#
132# Of course, Automake must honor this variable whenever it calls a
133# tool from the auxiliary directory.  The problem is that $srcdir (and
134# therefore $ac_aux_dir as well) can be either absolute or relative,
135# depending on how configure is run.  This is pretty annoying, since
136# it makes $ac_aux_dir quite unusable in subdirectories: in the top
137# source directory, any form will work fine, but in subdirectories a
138# relative path needs to be adjusted first.
139#
140# $ac_aux_dir/missing
141#    fails when called from a subdirectory if $ac_aux_dir is relative
142# $top_srcdir/$ac_aux_dir/missing
143#    fails if $ac_aux_dir is absolute,
144#    fails when called from a subdirectory in a VPATH build with
145#          a relative $ac_aux_dir
146#
147# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
148# are both prefixed by $srcdir.  In an in-source build this is usually
149# harmless because $srcdir is `.', but things will broke when you
150# start a VPATH build or use an absolute $srcdir.
151#
152# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
153# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
154#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
155# and then we would define $MISSING as
156#   MISSING="\${SHELL} $am_aux_dir/missing"
157# This will work as long as MISSING is not called from configure, because
158# unfortunately $(top_srcdir) has no meaning in configure.
159# However there are other variables, like CC, which are often used in
160# configure, and could therefore not use this "fixed" $ac_aux_dir.
161#
162# Another solution, used here, is to always expand $ac_aux_dir to an
163# absolute PATH.  The drawback is that using absolute paths prevent a
164# configured tree to be moved without reconfiguration.
165
166AC_DEFUN([AM_AUX_DIR_EXPAND],
167[dnl Rely on autoconf to set up CDPATH properly.
168AC_PREREQ([2.50])dnl
169# expand $ac_aux_dir to an absolute path
170am_aux_dir=`cd $ac_aux_dir && pwd`
171])
172
173# AM_CONDITIONAL                                            -*- Autoconf -*-
174
175# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
176# Free Software Foundation, Inc.
177#
178# This file is free software; the Free Software Foundation
179# gives unlimited permission to copy and/or distribute it,
180# with or without modifications, as long as this notice is preserved.
181
182# serial 8
183
184# AM_CONDITIONAL(NAME, SHELL-CONDITION)
185# -------------------------------------
186# Define a conditional.
187AC_DEFUN([AM_CONDITIONAL],
188[AC_PREREQ(2.52)dnl
189 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
190	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
191AC_SUBST([$1_TRUE])dnl
192AC_SUBST([$1_FALSE])dnl
193_AM_SUBST_NOTMAKE([$1_TRUE])dnl
194_AM_SUBST_NOTMAKE([$1_FALSE])dnl
195if $2; then
196  $1_TRUE=
197  $1_FALSE='#'
198else
199  $1_TRUE='#'
200  $1_FALSE=
201fi
202AC_CONFIG_COMMANDS_PRE(
203[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
204  AC_MSG_ERROR([[conditional "$1" was never defined.
205Usually this means the macro was only invoked conditionally.]])
206fi])])
207
208# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
209# Free Software Foundation, Inc.
210#
211# This file is free software; the Free Software Foundation
212# gives unlimited permission to copy and/or distribute it,
213# with or without modifications, as long as this notice is preserved.
214
215# serial 9
216
217# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
218# written in clear, in which case automake, when reading aclocal.m4,
219# will think it sees a *use*, and therefore will trigger all it's
220# C support machinery.  Also note that it means that autoscan, seeing
221# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
222
223
224# _AM_DEPENDENCIES(NAME)
225# ----------------------
226# See how the compiler implements dependency checking.
227# NAME is "CC", "CXX", "GCJ", or "OBJC".
228# We try a few techniques and use that to set a single cache variable.
229#
230# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
231# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
232# dependency, and given that the user is not expected to run this macro,
233# just rely on AC_PROG_CC.
234AC_DEFUN([_AM_DEPENDENCIES],
235[AC_REQUIRE([AM_SET_DEPDIR])dnl
236AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
237AC_REQUIRE([AM_MAKE_INCLUDE])dnl
238AC_REQUIRE([AM_DEP_TRACK])dnl
239
240ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
241       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
242       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
243       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
244       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
245                   [depcc="$$1"   am_compiler_list=])
246
247AC_CACHE_CHECK([dependency style of $depcc],
248               [am_cv_$1_dependencies_compiler_type],
249[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
250  # We make a subdir and do the tests there.  Otherwise we can end up
251  # making bogus files that we don't know about and never remove.  For
252  # instance it was reported that on HP-UX the gcc test will end up
253  # making a dummy file named `D' -- because `-MD' means `put the output
254  # in D'.
255  mkdir conftest.dir
256  # Copy depcomp to subdir because otherwise we won't find it if we're
257  # using a relative directory.
258  cp "$am_depcomp" conftest.dir
259  cd conftest.dir
260  # We will build objects and dependencies in a subdirectory because
261  # it helps to detect inapplicable dependency modes.  For instance
262  # both Tru64's cc and ICC support -MD to output dependencies as a
263  # side effect of compilation, but ICC will put the dependencies in
264  # the current directory while Tru64 will put them in the object
265  # directory.
266  mkdir sub
267
268  am_cv_$1_dependencies_compiler_type=none
269  if test "$am_compiler_list" = ""; then
270     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
271  fi
272  for depmode in $am_compiler_list; do
273    # Setup a source with many dependencies, because some compilers
274    # like to wrap large dependency lists on column 80 (with \), and
275    # we should not choose a depcomp mode which is confused by this.
276    #
277    # We need to recreate these files for each test, as the compiler may
278    # overwrite some of them when testing with obscure command lines.
279    # This happens at least with the AIX C compiler.
280    : > sub/conftest.c
281    for i in 1 2 3 4 5 6; do
282      echo '#include "conftst'$i'.h"' >> sub/conftest.c
283      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
284      # Solaris 8's {/usr,}/bin/sh.
285      touch sub/conftst$i.h
286    done
287    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
288
289    case $depmode in
290    nosideeffect)
291      # after this tag, mechanisms are not by side-effect, so they'll
292      # only be used when explicitly requested
293      if test "x$enable_dependency_tracking" = xyes; then
294	continue
295      else
296	break
297      fi
298      ;;
299    none) break ;;
300    esac
301    # We check with `-c' and `-o' for the sake of the "dashmstdout"
302    # mode.  It turns out that the SunPro C++ compiler does not properly
303    # handle `-M -o', and we need to detect this.
304    if depmode=$depmode \
305       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
306       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
307       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
308         >/dev/null 2>conftest.err &&
309       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
310       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
311       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
312       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
313      # icc doesn't choke on unknown options, it will just issue warnings
314      # or remarks (even with -Werror).  So we grep stderr for any message
315      # that says an option was ignored or not supported.
316      # When given -MP, icc 7.0 and 7.1 complain thusly:
317      #   icc: Command line warning: ignoring option '-M'; no argument required
318      # The diagnosis changed in icc 8.0:
319      #   icc: Command line remark: option '-MP' not supported
320      if (grep 'ignoring option' conftest.err ||
321          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
322        am_cv_$1_dependencies_compiler_type=$depmode
323        break
324      fi
325    fi
326  done
327
328  cd ..
329  rm -rf conftest.dir
330else
331  am_cv_$1_dependencies_compiler_type=none
332fi
333])
334AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
335AM_CONDITIONAL([am__fastdep$1], [
336  test "x$enable_dependency_tracking" != xno \
337  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
338])
339
340
341# AM_SET_DEPDIR
342# -------------
343# Choose a directory name for dependency files.
344# This macro is AC_REQUIREd in _AM_DEPENDENCIES
345AC_DEFUN([AM_SET_DEPDIR],
346[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
347AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
348])
349
350
351# AM_DEP_TRACK
352# ------------
353AC_DEFUN([AM_DEP_TRACK],
354[AC_ARG_ENABLE(dependency-tracking,
355[  --disable-dependency-tracking  speeds up one-time build
356  --enable-dependency-tracking   do not reject slow dependency extractors])
357if test "x$enable_dependency_tracking" != xno; then
358  am_depcomp="$ac_aux_dir/depcomp"
359  AMDEPBACKSLASH='\'
360fi
361AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
362AC_SUBST([AMDEPBACKSLASH])dnl
363_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
364])
365
366# Generate code to set up dependency tracking.              -*- Autoconf -*-
367
368# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
369# Free Software Foundation, Inc.
370#
371# This file is free software; the Free Software Foundation
372# gives unlimited permission to copy and/or distribute it,
373# with or without modifications, as long as this notice is preserved.
374
375#serial 3
376
377# _AM_OUTPUT_DEPENDENCY_COMMANDS
378# ------------------------------
379AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
380[for mf in $CONFIG_FILES; do
381  # Strip MF so we end up with the name of the file.
382  mf=`echo "$mf" | sed -e 's/:.*$//'`
383  # Check whether this is an Automake generated Makefile or not.
384  # We used to match only the files named `Makefile.in', but
385  # some people rename them; so instead we look at the file content.
386  # Grep'ing the first line is not enough: some people post-process
387  # each Makefile.in and add a new line on top of each file to say so.
388  # Grep'ing the whole file is not good either: AIX grep has a line
389  # limit of 2048, but all sed's we know have understand at least 4000.
390  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
391    dirpart=`AS_DIRNAME("$mf")`
392  else
393    continue
394  fi
395  # Extract the definition of DEPDIR, am__include, and am__quote
396  # from the Makefile without running `make'.
397  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
398  test -z "$DEPDIR" && continue
399  am__include=`sed -n 's/^am__include = //p' < "$mf"`
400  test -z "am__include" && continue
401  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
402  # When using ansi2knr, U may be empty or an underscore; expand it
403  U=`sed -n 's/^U = //p' < "$mf"`
404  # Find all dependency output files, they are included files with
405  # $(DEPDIR) in their names.  We invoke sed twice because it is the
406  # simplest approach to changing $(DEPDIR) to its actual value in the
407  # expansion.
408  for file in `sed -n "
409    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
410       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
411    # Make sure the directory exists.
412    test -f "$dirpart/$file" && continue
413    fdir=`AS_DIRNAME(["$file"])`
414    AS_MKDIR_P([$dirpart/$fdir])
415    # echo "creating $dirpart/$file"
416    echo '# dummy' > "$dirpart/$file"
417  done
418done
419])# _AM_OUTPUT_DEPENDENCY_COMMANDS
420
421
422# AM_OUTPUT_DEPENDENCY_COMMANDS
423# -----------------------------
424# This macro should only be invoked once -- use via AC_REQUIRE.
425#
426# This code is only required when automatic dependency tracking
427# is enabled.  FIXME.  This creates each `.P' file that we will
428# need in order to bootstrap the dependency handling code.
429AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
430[AC_CONFIG_COMMANDS([depfiles],
431     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
432     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
433])
434
435# Do all the work for Automake.                             -*- Autoconf -*-
436
437# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
438# 2005, 2006, 2008 Free Software Foundation, Inc.
439#
440# This file is free software; the Free Software Foundation
441# gives unlimited permission to copy and/or distribute it,
442# with or without modifications, as long as this notice is preserved.
443
444# serial 13
445
446# This macro actually does too much.  Some checks are only needed if
447# your package does certain things.  But this isn't really a big deal.
448
449# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
450# AM_INIT_AUTOMAKE([OPTIONS])
451# -----------------------------------------------
452# The call with PACKAGE and VERSION arguments is the old style
453# call (pre autoconf-2.50), which is being phased out.  PACKAGE
454# and VERSION should now be passed to AC_INIT and removed from
455# the call to AM_INIT_AUTOMAKE.
456# We support both call styles for the transition.  After
457# the next Automake release, Autoconf can make the AC_INIT
458# arguments mandatory, and then we can depend on a new Autoconf
459# release and drop the old call support.
460AC_DEFUN([AM_INIT_AUTOMAKE],
461[AC_PREREQ([2.60])dnl
462dnl Autoconf wants to disallow AM_ names.  We explicitly allow
463dnl the ones we care about.
464m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
465AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
466AC_REQUIRE([AC_PROG_INSTALL])dnl
467if test "`cd $srcdir && pwd`" != "`pwd`"; then
468  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
469  # is not polluted with repeated "-I."
470  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
471  # test to see if srcdir already configured
472  if test -f $srcdir/config.status; then
473    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
474  fi
475fi
476
477# test whether we have cygpath
478if test -z "$CYGPATH_W"; then
479  if (cygpath --version) >/dev/null 2>/dev/null; then
480    CYGPATH_W='cygpath -w'
481  else
482    CYGPATH_W=echo
483  fi
484fi
485AC_SUBST([CYGPATH_W])
486
487# Define the identity of the package.
488dnl Distinguish between old-style and new-style calls.
489m4_ifval([$2],
490[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
491 AC_SUBST([PACKAGE], [$1])dnl
492 AC_SUBST([VERSION], [$2])],
493[_AM_SET_OPTIONS([$1])dnl
494dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
495m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
496  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
497 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
498 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
499
500_AM_IF_OPTION([no-define],,
501[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
502 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
503
504# Some tools Automake needs.
505AC_REQUIRE([AM_SANITY_CHECK])dnl
506AC_REQUIRE([AC_ARG_PROGRAM])dnl
507AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
508AM_MISSING_PROG(AUTOCONF, autoconf)
509AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
510AM_MISSING_PROG(AUTOHEADER, autoheader)
511AM_MISSING_PROG(MAKEINFO, makeinfo)
512AM_PROG_INSTALL_SH
513AM_PROG_INSTALL_STRIP
514AC_REQUIRE([AM_PROG_MKDIR_P])dnl
515# We need awk for the "check" target.  The system "awk" is bad on
516# some platforms.
517AC_REQUIRE([AC_PROG_AWK])dnl
518AC_REQUIRE([AC_PROG_MAKE_SET])dnl
519AC_REQUIRE([AM_SET_LEADING_DOT])dnl
520_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
521              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
522	      		     [_AM_PROG_TAR([v7])])])
523_AM_IF_OPTION([no-dependencies],,
524[AC_PROVIDE_IFELSE([AC_PROG_CC],
525                  [_AM_DEPENDENCIES(CC)],
526                  [define([AC_PROG_CC],
527                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
528AC_PROVIDE_IFELSE([AC_PROG_CXX],
529                  [_AM_DEPENDENCIES(CXX)],
530                  [define([AC_PROG_CXX],
531                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
532AC_PROVIDE_IFELSE([AC_PROG_OBJC],
533                  [_AM_DEPENDENCIES(OBJC)],
534                  [define([AC_PROG_OBJC],
535                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
536])
537])
538
539
540# When config.status generates a header, we must update the stamp-h file.
541# This file resides in the same directory as the config header
542# that is generated.  The stamp files are numbered to have different names.
543
544# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
545# loop where config.status creates the headers, so we can generate
546# our stamp files there.
547AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
548[# Compute $1's index in $config_headers.
549_am_arg=$1
550_am_stamp_count=1
551for _am_header in $config_headers :; do
552  case $_am_header in
553    $_am_arg | $_am_arg:* )
554      break ;;
555    * )
556      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
557  esac
558done
559echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
560
561# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
562#
563# This file is free software; the Free Software Foundation
564# gives unlimited permission to copy and/or distribute it,
565# with or without modifications, as long as this notice is preserved.
566
567# AM_PROG_INSTALL_SH
568# ------------------
569# Define $install_sh.
570AC_DEFUN([AM_PROG_INSTALL_SH],
571[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
572install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
573AC_SUBST(install_sh)])
574
575# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
576#
577# This file is free software; the Free Software Foundation
578# gives unlimited permission to copy and/or distribute it,
579# with or without modifications, as long as this notice is preserved.
580
581# serial 2
582
583# Check whether the underlying file-system supports filenames
584# with a leading dot.  For instance MS-DOS doesn't.
585AC_DEFUN([AM_SET_LEADING_DOT],
586[rm -rf .tst 2>/dev/null
587mkdir .tst 2>/dev/null
588if test -d .tst; then
589  am__leading_dot=.
590else
591  am__leading_dot=_
592fi
593rmdir .tst 2>/dev/null
594AC_SUBST([am__leading_dot])])
595
596# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
597# From Jim Meyering
598
599# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
600# Free Software Foundation, Inc.
601#
602# This file is free software; the Free Software Foundation
603# gives unlimited permission to copy and/or distribute it,
604# with or without modifications, as long as this notice is preserved.
605
606# serial 4
607
608AC_DEFUN([AM_MAINTAINER_MODE],
609[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
610  dnl maintainer-mode is disabled by default
611  AC_ARG_ENABLE(maintainer-mode,
612[  --enable-maintainer-mode  enable make rules and dependencies not useful
613			  (and sometimes confusing) to the casual installer],
614      USE_MAINTAINER_MODE=$enableval,
615      USE_MAINTAINER_MODE=no)
616  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
617  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
618  MAINT=$MAINTAINER_MODE_TRUE
619  AC_SUBST(MAINT)dnl
620]
621)
622
623AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
624
625# Check to see how 'make' treats includes.	            -*- Autoconf -*-
626
627# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
628#
629# This file is free software; the Free Software Foundation
630# gives unlimited permission to copy and/or distribute it,
631# with or without modifications, as long as this notice is preserved.
632
633# serial 3
634
635# AM_MAKE_INCLUDE()
636# -----------------
637# Check to see how make treats includes.
638AC_DEFUN([AM_MAKE_INCLUDE],
639[am_make=${MAKE-make}
640cat > confinc << 'END'
641am__doit:
642	@echo done
643.PHONY: am__doit
644END
645# If we don't find an include directive, just comment out the code.
646AC_MSG_CHECKING([for style of include used by $am_make])
647am__include="#"
648am__quote=
649_am_result=none
650# First try GNU make style include.
651echo "include confinc" > confmf
652# We grep out `Entering directory' and `Leaving directory'
653# messages which can occur if `w' ends up in MAKEFLAGS.
654# In particular we don't look at `^make:' because GNU make might
655# be invoked under some other name (usually "gmake"), in which
656# case it prints its new name instead of `make'.
657if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
658   am__include=include
659   am__quote=
660   _am_result=GNU
661fi
662# Now try BSD make style include.
663if test "$am__include" = "#"; then
664   echo '.include "confinc"' > confmf
665   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
666      am__include=.include
667      am__quote="\""
668      _am_result=BSD
669   fi
670fi
671AC_SUBST([am__include])
672AC_SUBST([am__quote])
673AC_MSG_RESULT([$_am_result])
674rm -f confinc confmf
675])
676
677# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
678
679# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
680# Free Software Foundation, Inc.
681#
682# This file is free software; the Free Software Foundation
683# gives unlimited permission to copy and/or distribute it,
684# with or without modifications, as long as this notice is preserved.
685
686# serial 5
687
688# AM_MISSING_PROG(NAME, PROGRAM)
689# ------------------------------
690AC_DEFUN([AM_MISSING_PROG],
691[AC_REQUIRE([AM_MISSING_HAS_RUN])
692$1=${$1-"${am_missing_run}$2"}
693AC_SUBST($1)])
694
695
696# AM_MISSING_HAS_RUN
697# ------------------
698# Define MISSING if not defined so far and test if it supports --run.
699# If it does, set am_missing_run to use it, otherwise, to nothing.
700AC_DEFUN([AM_MISSING_HAS_RUN],
701[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
702AC_REQUIRE_AUX_FILE([missing])dnl
703test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
704# Use eval to expand $SHELL
705if eval "$MISSING --run true"; then
706  am_missing_run="$MISSING --run "
707else
708  am_missing_run=
709  AC_MSG_WARN([`missing' script is too old or missing])
710fi
711])
712
713# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
714#
715# This file is free software; the Free Software Foundation
716# gives unlimited permission to copy and/or distribute it,
717# with or without modifications, as long as this notice is preserved.
718
719# AM_PROG_MKDIR_P
720# ---------------
721# Check for `mkdir -p'.
722AC_DEFUN([AM_PROG_MKDIR_P],
723[AC_PREREQ([2.60])dnl
724AC_REQUIRE([AC_PROG_MKDIR_P])dnl
725dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
726dnl while keeping a definition of mkdir_p for backward compatibility.
727dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
728dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
729dnl Makefile.ins that do not define MKDIR_P, so we do our own
730dnl adjustment using top_builddir (which is defined more often than
731dnl MKDIR_P).
732AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
733case $mkdir_p in
734  [[\\/$]]* | ?:[[\\/]]*) ;;
735  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
736esac
737])
738
739# Helper functions for option handling.                     -*- Autoconf -*-
740
741# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
742#
743# This file is free software; the Free Software Foundation
744# gives unlimited permission to copy and/or distribute it,
745# with or without modifications, as long as this notice is preserved.
746
747# serial 3
748
749# _AM_MANGLE_OPTION(NAME)
750# -----------------------
751AC_DEFUN([_AM_MANGLE_OPTION],
752[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
753
754# _AM_SET_OPTION(NAME)
755# ------------------------------
756# Set option NAME.  Presently that only means defining a flag for this option.
757AC_DEFUN([_AM_SET_OPTION],
758[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
759
760# _AM_SET_OPTIONS(OPTIONS)
761# ----------------------------------
762# OPTIONS is a space-separated list of Automake options.
763AC_DEFUN([_AM_SET_OPTIONS],
764[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
765
766# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
767# -------------------------------------------
768# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
769AC_DEFUN([_AM_IF_OPTION],
770[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
771
772# Check to make sure that the build environment is sane.    -*- Autoconf -*-
773
774# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
775# Free Software Foundation, Inc.
776#
777# This file is free software; the Free Software Foundation
778# gives unlimited permission to copy and/or distribute it,
779# with or without modifications, as long as this notice is preserved.
780
781# serial 4
782
783# AM_SANITY_CHECK
784# ---------------
785AC_DEFUN([AM_SANITY_CHECK],
786[AC_MSG_CHECKING([whether build environment is sane])
787# Just in case
788sleep 1
789echo timestamp > conftest.file
790# Do `set' in a subshell so we don't clobber the current shell's
791# arguments.  Must try -L first in case configure is actually a
792# symlink; some systems play weird games with the mod time of symlinks
793# (eg FreeBSD returns the mod time of the symlink's containing
794# directory).
795if (
796   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
797   if test "$[*]" = "X"; then
798      # -L didn't work.
799      set X `ls -t $srcdir/configure conftest.file`
800   fi
801   rm -f conftest.file
802   if test "$[*]" != "X $srcdir/configure conftest.file" \
803      && test "$[*]" != "X conftest.file $srcdir/configure"; then
804
805      # If neither matched, then we have a broken ls.  This can happen
806      # if, for instance, CONFIG_SHELL is bash and it inherits a
807      # broken ls alias from the environment.  This has actually
808      # happened.  Such a system could not be considered "sane".
809      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
810alias in your environment])
811   fi
812
813   test "$[2]" = conftest.file
814   )
815then
816   # Ok.
817   :
818else
819   AC_MSG_ERROR([newly created file is older than distributed files!
820Check your system clock])
821fi
822AC_MSG_RESULT(yes)])
823
824# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
825#
826# This file is free software; the Free Software Foundation
827# gives unlimited permission to copy and/or distribute it,
828# with or without modifications, as long as this notice is preserved.
829
830# AM_PROG_INSTALL_STRIP
831# ---------------------
832# One issue with vendor `install' (even GNU) is that you can't
833# specify the program used to strip binaries.  This is especially
834# annoying in cross-compiling environments, where the build's strip
835# is unlikely to handle the host's binaries.
836# Fortunately install-sh will honor a STRIPPROG variable, so we
837# always use install-sh in `make install-strip', and initialize
838# STRIPPROG with the value of the STRIP variable (set by the user).
839AC_DEFUN([AM_PROG_INSTALL_STRIP],
840[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
841# Installed binaries are usually stripped using `strip' when the user
842# run `make install-strip'.  However `strip' might not be the right
843# tool to use in cross-compilation environments, therefore Automake
844# will honor the `STRIP' environment variable to overrule this program.
845dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
846if test "$cross_compiling" != no; then
847  AC_CHECK_TOOL([STRIP], [strip], :)
848fi
849INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
850AC_SUBST([INSTALL_STRIP_PROGRAM])])
851
852# Copyright (C) 2006  Free Software Foundation, Inc.
853#
854# This file is free software; the Free Software Foundation
855# gives unlimited permission to copy and/or distribute it,
856# with or without modifications, as long as this notice is preserved.
857
858# _AM_SUBST_NOTMAKE(VARIABLE)
859# ---------------------------
860# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
861# This macro is traced by Automake.
862AC_DEFUN([_AM_SUBST_NOTMAKE])
863
864# Check how to create a tarball.                            -*- Autoconf -*-
865
866# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
867#
868# This file is free software; the Free Software Foundation
869# gives unlimited permission to copy and/or distribute it,
870# with or without modifications, as long as this notice is preserved.
871
872# serial 2
873
874# _AM_PROG_TAR(FORMAT)
875# --------------------
876# Check how to create a tarball in format FORMAT.
877# FORMAT should be one of `v7', `ustar', or `pax'.
878#
879# Substitute a variable $(am__tar) that is a command
880# writing to stdout a FORMAT-tarball containing the directory
881# $tardir.
882#     tardir=directory && $(am__tar) > result.tar
883#
884# Substitute a variable $(am__untar) that extract such
885# a tarball read from stdin.
886#     $(am__untar) < result.tar
887AC_DEFUN([_AM_PROG_TAR],
888[# Always define AMTAR for backward compatibility.
889AM_MISSING_PROG([AMTAR], [tar])
890m4_if([$1], [v7],
891     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
892     [m4_case([$1], [ustar],, [pax],,
893              [m4_fatal([Unknown tar format])])
894AC_MSG_CHECKING([how to create a $1 tar archive])
895# Loop over all known methods to create a tar archive until one works.
896_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
897_am_tools=${am_cv_prog_tar_$1-$_am_tools}
898# Do not fold the above two line into one, because Tru64 sh and
899# Solaris sh will not grok spaces in the rhs of `-'.
900for _am_tool in $_am_tools
901do
902  case $_am_tool in
903  gnutar)
904    for _am_tar in tar gnutar gtar;
905    do
906      AM_RUN_LOG([$_am_tar --version]) && break
907    done
908    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
909    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
910    am__untar="$_am_tar -xf -"
911    ;;
912  plaintar)
913    # Must skip GNU tar: if it does not support --format= it doesn't create
914    # ustar tarball either.
915    (tar --version) >/dev/null 2>&1 && continue
916    am__tar='tar chf - "$$tardir"'
917    am__tar_='tar chf - "$tardir"'
918    am__untar='tar xf -'
919    ;;
920  pax)
921    am__tar='pax -L -x $1 -w "$$tardir"'
922    am__tar_='pax -L -x $1 -w "$tardir"'
923    am__untar='pax -r'
924    ;;
925  cpio)
926    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
927    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
928    am__untar='cpio -i -H $1 -d'
929    ;;
930  none)
931    am__tar=false
932    am__tar_=false
933    am__untar=false
934    ;;
935  esac
936
937  # If the value was cached, stop now.  We just wanted to have am__tar
938  # and am__untar set.
939  test -n "${am_cv_prog_tar_$1}" && break
940
941  # tar/untar a dummy directory, and stop if the command works
942  rm -rf conftest.dir
943  mkdir conftest.dir
944  echo GrepMe > conftest.dir/file
945  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
946  rm -rf conftest.dir
947  if test -s conftest.tar; then
948    AM_RUN_LOG([$am__untar <conftest.tar])
949    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
950  fi
951done
952rm -rf conftest.dir
953
954AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
955AC_MSG_RESULT([$am_cv_prog_tar_$1])])
956AC_SUBST([am__tar])
957AC_SUBST([am__untar])
958]) # _AM_PROG_TAR
959
960