root / ImageMagick / branches / ImageMagick-6.3.6 / aclocal.m4

Revision 7647, 40.4 kB (checked in by cristy, 14 months ago)
Line 
1# generated automatically by aclocal 1.10 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006  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_if(m4_PACKAGE_VERSION, [2.61],,
15[m4_fatal([this file was generated for autoconf 2.61.
16You have another version of autoconf.  If you want to use that,
17you should regenerate the build system entirely.], [63])])
18
19# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
20#
21# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
22#
23# This program is free software; you can redistribute it and/or modify
24# it under the terms of the GNU General Public License as published by
25# the Free Software Foundation; either version 2 of the License, or
26# (at your option) any later version.
27#
28# This program is distributed in the hope that it will be useful, but
29# WITHOUT ANY WARRANTY; without even the implied warranty of
30# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31# General Public License for more details.
32#
33# You should have received a copy of the GNU General Public License
34# along with this program; if not, write to the Free Software
35# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36#
37# As a special exception to the GNU General Public License, if you
38# distribute this file as part of a program that contains a
39# configuration script generated by Autoconf, you may include it under
40# the same distribution terms that you use for the rest of that program.
41
42# PKG_PROG_PKG_CONFIG([MIN-VERSION])
43# ----------------------------------
44AC_DEFUN([PKG_PROG_PKG_CONFIG],
45[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
46m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
47AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
48if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
49        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
50fi
51if test -n "$PKG_CONFIG"; then
52        _pkg_min_version=m4_default([$1], [0.9.0])
53        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
54        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
55                AC_MSG_RESULT([yes])
56        else
57                AC_MSG_RESULT([no])
58                PKG_CONFIG=""
59        fi
60               
61fi[]dnl
62])# PKG_PROG_PKG_CONFIG
63
64# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
65#
66# Check to see whether a particular set of modules exists.  Similar
67# to PKG_CHECK_MODULES(), but does not set variables or print errors.
68#
69#
70# Similar to PKG_CHECK_MODULES, make sure that the first instance of
71# this or PKG_CHECK_MODULES is called, or make sure to call
72# PKG_CHECK_EXISTS manually
73# --------------------------------------------------------------
74AC_DEFUN([PKG_CHECK_EXISTS],
75[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
76if test -n "$PKG_CONFIG" && \
77    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
78  m4_ifval([$2], [$2], [:])
79m4_ifvaln([$3], [else
80  $3])dnl
81fi])
82
83
84# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
85# ---------------------------------------------
86m4_define([_PKG_CONFIG],
87[if test -n "$PKG_CONFIG"; then
88    if test -n "$$1"; then
89        pkg_cv_[]$1="$$1"
90    else
91        PKG_CHECK_EXISTS([$3],
92                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
93                         [pkg_failed=yes])
94    fi
95else
96        pkg_failed=untried
97fi[]dnl
98])# _PKG_CONFIG
99
100# _PKG_SHORT_ERRORS_SUPPORTED
101# -----------------------------
102AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
103[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
104if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
105        _pkg_short_errors_supported=yes
106else
107        _pkg_short_errors_supported=no
108fi[]dnl
109])# _PKG_SHORT_ERRORS_SUPPORTED
110
111
112# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
113# [ACTION-IF-NOT-FOUND])
114#
115#
116# Note that if there is a possibility the first call to
117# PKG_CHECK_MODULES might not happen, you should be sure to include an
118# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
119#
120#
121# --------------------------------------------------------------
122AC_DEFUN([PKG_CHECK_MODULES],
123[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
124AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
125AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
126
127pkg_failed=no
128AC_MSG_CHECKING([for $1])
129
130_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
131_PKG_CONFIG([$1][_LIBS], [libs], [$2])
132
133m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
134and $1[]_LIBS to avoid the need to call pkg-config.
135See the pkg-config man page for more details.])
136
137if test $pkg_failed = yes; then
138        _PKG_SHORT_ERRORS_SUPPORTED
139        if test $_pkg_short_errors_supported = yes; then
140                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
141        else
142                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
143        fi
144        # Put the nasty error message in config.log where it belongs
145        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
146
147        ifelse([$4], , [AC_MSG_ERROR(dnl
148[Package requirements ($2) were not met:
149
150$$1_PKG_ERRORS
151
152Consider adjusting the PKG_CONFIG_PATH environment variable if you
153installed software in a non-standard prefix.
154
155_PKG_TEXT
156])],
157                [AC_MSG_RESULT([no])
158                $4])
159elif test $pkg_failed = untried; then
160        ifelse([$4], , [AC_MSG_FAILURE(dnl
161[The pkg-config script could not be found or is too old.  Make sure it
162is in your PATH or set the PKG_CONFIG environment variable to the full
163path to pkg-config.
164
165_PKG_TEXT
166
167To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
168                [$4])
169else
170        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
171        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
172        AC_MSG_RESULT([yes])
173        ifelse([$3], , :, [$3])
174fi[]dnl
175])# PKG_CHECK_MODULES
176
177# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
178#
179# This file is free software; the Free Software Foundation
180# gives unlimited permission to copy and/or distribute it,
181# with or without modifications, as long as this notice is preserved.
182
183# AM_AUTOMAKE_VERSION(VERSION)
184# ----------------------------
185# Automake X.Y traces this macro to ensure aclocal.m4 has been
186# generated from the m4 files accompanying Automake X.Y.
187# (This private macro should not be called outside this file.)
188AC_DEFUN([AM_AUTOMAKE_VERSION],
189[am__api_version='1.10'
190dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
191dnl require some minimum version.  Point them to the right macro.
192m4_if([$1], [1.10], [],
193      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
194])
195
196# _AM_AUTOCONF_VERSION(VERSION)
197# -----------------------------
198# aclocal traces this macro to find the Autoconf version.
199# This is a private macro too.  Using m4_define simplifies
200# the logic in aclocal, which can simply ignore this definition.
201m4_define([_AM_AUTOCONF_VERSION], [])
202
203# AM_SET_CURRENT_AUTOMAKE_VERSION
204# -------------------------------
205# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
206# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
207AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
208[AM_AUTOMAKE_VERSION([1.10])dnl
209_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
210
211# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
212
213# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
214#
215# This file is free software; the Free Software Foundation
216# gives unlimited permission to copy and/or distribute it,
217# with or without modifications, as long as this notice is preserved.
218
219# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
220# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
221# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
222#
223# Of course, Automake must honor this variable whenever it calls a
224# tool from the auxiliary directory.  The problem is that $srcdir (and
225# therefore $ac_aux_dir as well) can be either absolute or relative,
226# depending on how configure is run.  This is pretty annoying, since
227# it makes $ac_aux_dir quite unusable in subdirectories: in the top
228# source directory, any form will work fine, but in subdirectories a
229# relative path needs to be adjusted first.
230#
231# $ac_aux_dir/missing
232#    fails when called from a subdirectory if $ac_aux_dir is relative
233# $top_srcdir/$ac_aux_dir/missing
234#    fails if $ac_aux_dir is absolute,
235#    fails when called from a subdirectory in a VPATH build with
236#          a relative $ac_aux_dir
237#
238# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
239# are both prefixed by $srcdir.  In an in-source build this is usually
240# harmless because $srcdir is `.', but things will broke when you
241# start a VPATH build or use an absolute $srcdir.
242#
243# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
244# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
245#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
246# and then we would define $MISSING as
247#   MISSING="\${SHELL} $am_aux_dir/missing"
248# This will work as long as MISSING is not called from configure, because
249# unfortunately $(top_srcdir) has no meaning in configure.
250# However there are other variables, like CC, which are often used in
251# configure, and could therefore not use this "fixed" $ac_aux_dir.
252#
253# Another solution, used here, is to always expand $ac_aux_dir to an
254# absolute PATH.  The drawback is that using absolute paths prevent a
255# configured tree to be moved without reconfiguration.
256
257AC_DEFUN([AM_AUX_DIR_EXPAND],
258[dnl Rely on autoconf to set up CDPATH properly.
259AC_PREREQ([2.50])dnl
260# expand $ac_aux_dir to an absolute path
261am_aux_dir=`cd $ac_aux_dir && pwd`
262])
263
264# AM_CONDITIONAL                                            -*- Autoconf -*-
265
266# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
267# Free Software Foundation, Inc.
268#
269# This file is free software; the Free Software Foundation
270# gives unlimited permission to copy and/or distribute it,
271# with or without modifications, as long as this notice is preserved.
272
273# serial 8
274
275# AM_CONDITIONAL(NAME, SHELL-CONDITION)
276# -------------------------------------
277# Define a conditional.
278AC_DEFUN([AM_CONDITIONAL],
279[AC_PREREQ(2.52)dnl
280 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
281        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
282AC_SUBST([$1_TRUE])dnl
283AC_SUBST([$1_FALSE])dnl
284_AM_SUBST_NOTMAKE([$1_TRUE])dnl
285_AM_SUBST_NOTMAKE([$1_FALSE])dnl
286if $2; then
287  $1_TRUE=
288  $1_FALSE='#'
289else
290  $1_TRUE='#'
291  $1_FALSE=
292fi
293AC_CONFIG_COMMANDS_PRE(
294[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
295  AC_MSG_ERROR([[conditional "$1" was never defined.
296Usually this means the macro was only invoked conditionally.]])
297fi])])
298
299# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
300# Free Software Foundation, Inc.
301#
302# This file is free software; the Free Software Foundation
303# gives unlimited permission to copy and/or distribute it,
304# with or without modifications, as long as this notice is preserved.
305
306# serial 9
307
308# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
309# written in clear, in which case automake, when reading aclocal.m4,
310# will think it sees a *use*, and therefore will trigger all it's
311# C support machinery.  Also note that it means that autoscan, seeing
312# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
313
314
315# _AM_DEPENDENCIES(NAME)
316# ----------------------
317# See how the compiler implements dependency checking.
318# NAME is "CC", "CXX", "GCJ", or "OBJC".
319# We try a few techniques and use that to set a single cache variable.
320#
321# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
322# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
323# dependency, and given that the user is not expected to run this macro,
324# just rely on AC_PROG_CC.
325AC_DEFUN([_AM_DEPENDENCIES],
326[AC_REQUIRE([AM_SET_DEPDIR])dnl
327AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
328AC_REQUIRE([AM_MAKE_INCLUDE])dnl
329AC_REQUIRE([AM_DEP_TRACK])dnl
330
331ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
332       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
333       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
334       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
335       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
336                   [depcc="$$1"   am_compiler_list=])
337
338AC_CACHE_CHECK([dependency style of $depcc],
339               [am_cv_$1_dependencies_compiler_type],
340[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
341  # We make a subdir and do the tests there.  Otherwise we can end up
342  # making bogus files that we don't know about and never remove.  For
343  # instance it was reported that on HP-UX the gcc test will end up
344  # making a dummy file named `D' -- because `-MD' means `put the output
345  # in D'.
346  mkdir conftest.dir
347  # Copy depcomp to subdir because otherwise we won't find it if we're
348  # using a relative directory.
349  cp "$am_depcomp" conftest.dir
350  cd conftest.dir
351  # We will build objects and dependencies in a subdirectory because
352  # it helps to detect inapplicable dependency modes.  For instance
353  # both Tru64's cc and ICC support -MD to output dependencies as a
354  # side effect of compilation, but ICC will put the dependencies in
355  # the current directory while Tru64 will put them in the object
356  # directory.
357  mkdir sub
358
359  am_cv_$1_dependencies_compiler_type=none
360  if test "$am_compiler_list" = ""; then
361     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
362  fi
363  for depmode in $am_compiler_list; do
364    # Setup a source with many dependencies, because some compilers
365    # like to wrap large dependency lists on column 80 (with \), and
366    # we should not choose a depcomp mode which is confused by this.
367    #
368    # We need to recreate these files for each test, as the compiler may
369    # overwrite some of them when testing with obscure command lines.
370    # This happens at least with the AIX C compiler.
371    : > sub/conftest.c
372    for i in 1 2 3 4 5 6; do
373      echo '#include "conftst'$i'.h"' >> sub/conftest.c
374      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
375      # Solaris 8's {/usr,}/bin/sh.
376      touch sub/conftst$i.h
377    done
378    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
379
380    case $depmode in
381    nosideeffect)
382      # after this tag, mechanisms are not by side-effect, so they'll
383      # only be used when explicitly requested
384      if test "x$enable_dependency_tracking" = xyes; then
385        continue
386      else
387        break
388      fi
389      ;;
390    none) break ;;
391    esac
392    # We check with `-c' and `-o' for the sake of the "dashmstdout"
393    # mode.  It turns out that the SunPro C++ compiler does not properly
394    # handle `-M -o', and we need to detect this.
395    if depmode=$depmode \
396       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
397       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
398       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
399         >/dev/null 2>conftest.err &&
400       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
401       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
402       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
403       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
404      # icc doesn't choke on unknown options, it will just issue warnings
405      # or remarks (even with -Werror).  So we grep stderr for any message
406      # that says an option was ignored or not supported.
407      # When given -MP, icc 7.0 and 7.1 complain thusly:
408      #   icc: Command line warning: ignoring option '-M'; no argument required
409      # The diagnosis changed in icc 8.0:
410      #   icc: Command line remark: option '-MP' not supported
411      if (grep 'ignoring option' conftest.err ||
412          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
413        am_cv_$1_dependencies_compiler_type=$depmode
414        break
415      fi
416    fi
417  done
418
419  cd ..
420  rm -rf conftest.dir
421else
422  am_cv_$1_dependencies_compiler_type=none
423fi
424])
425AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
426AM_CONDITIONAL([am__fastdep$1], [
427  test "x$enable_dependency_tracking" != xno \
428  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
429])
430
431
432# AM_SET_DEPDIR
433# -------------
434# Choose a directory name for dependency files.
435# This macro is AC_REQUIREd in _AM_DEPENDENCIES
436AC_DEFUN([AM_SET_DEPDIR],
437[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
438AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
439])
440
441
442# AM_DEP_TRACK
443# ------------
444AC_DEFUN([AM_DEP_TRACK],
445[AC_ARG_ENABLE(dependency-tracking,
446[  --disable-dependency-tracking  speeds up one-time build
447  --enable-dependency-tracking   do not reject slow dependency extractors])
448if test "x$enable_dependency_tracking" != xno; then
449  am_depcomp="$ac_aux_dir/depcomp"
450  AMDEPBACKSLASH='\'
451fi
452AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
453AC_SUBST([AMDEPBACKSLASH])dnl
454_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
455])
456
457# Generate code to set up dependency tracking.              -*- Autoconf -*-
458
459# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
460# Free Software Foundation, Inc.
461#
462# This file is free software; the Free Software Foundation
463# gives unlimited permission to copy and/or distribute it,
464# with or without modifications, as long as this notice is preserved.
465
466#serial 3
467
468# _AM_OUTPUT_DEPENDENCY_COMMANDS
469# ------------------------------
470AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
471[for mf in $CONFIG_FILES; do
472  # Strip MF so we end up with the name of the file.
473  mf=`echo "$mf" | sed -e 's/:.*$//'`
474  # Check whether this is an Automake generated Makefile or not.
475  # We used to match only the files named `Makefile.in', but
476  # some people rename them; so instead we look at the file content.
477  # Grep'ing the first line is not enough: some people post-process
478  # each Makefile.in and add a new line on top of each file to say so.
479  # Grep'ing the whole file is not good either: AIX grep has a line
480  # limit of 2048, but all sed's we know have understand at least 4000.
481  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
482    dirpart=`AS_DIRNAME("$mf")`
483  else
484    continue
485  fi
486  # Extract the definition of DEPDIR, am__include, and am__quote
487  # from the Makefile without running `make'.
488  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
489  test -z "$DEPDIR" && continue
490  am__include=`sed -n 's/^am__include = //p' < "$mf"`
491  test -z "am__include" && continue
492  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
493  # When using ansi2knr, U may be empty or an underscore; expand it
494  U=`sed -n 's/^U = //p' < "$mf"`
495  # Find all dependency output files, they are included files with
496  # $(DEPDIR) in their names.  We invoke sed twice because it is the
497  # simplest approach to changing $(DEPDIR) to its actual value in the
498  # expansion.
499  for file in `sed -n "
500    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
501       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
502    # Make sure the directory exists.
503    test -f "$dirpart/$file" && continue
504    fdir=`AS_DIRNAME(["$file"])`
505    AS_MKDIR_P([$dirpart/$fdir])
506    # echo "creating $dirpart/$file"
507    echo '# dummy' > "$dirpart/$file"
508  done
509done
510])# _AM_OUTPUT_DEPENDENCY_COMMANDS
511
512
513# AM_OUTPUT_DEPENDENCY_COMMANDS
514# -----------------------------
515# This macro should only be invoked once -- use via AC_REQUIRE.
516#
517# This code is only required when automatic dependency tracking
518# is enabled.  FIXME.  This creates each `.P' file that we will
519# need in order to bootstrap the dependency handling code.
520AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
521[AC_CONFIG_COMMANDS([depfiles],
522     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
523     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
524])
525
526
527# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005
528# Free Software Foundation, Inc.
529#
530# This file is free software; the Free Software Foundation
531# gives unlimited permission to copy and/or distribute it,
532# with or without modifications, as long as this notice is preserved.
533
534# serial 3
535
536AC_DEFUN([AM_WITH_DMALLOC],
537[AC_MSG_CHECKING([if malloc debugging is wanted])
538AC_ARG_WITH(dmalloc,
539[  --with-dmalloc          use dmalloc, as in
540                          http://www.dmalloc.com/dmalloc.tar.gz],
541[if test "$withval" = yes; then
542  AC_MSG_RESULT(yes)
543  AC_DEFINE(WITH_DMALLOC,1,
544            [Define if using the dmalloc debugging malloc package])
545  LIBS="$LIBS -ldmalloc"
546  LDFLAGS="$LDFLAGS -g"
547else
548  AC_MSG_RESULT(no)
549fi], [AC_MSG_RESULT(no)])
550])
551
552AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
553
554# Do all the work for Automake.                             -*- Autoconf -*-
555
556# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
557# 2005, 2006 Free Software Foundation, Inc.
558#
559# This file is free software; the Free Software Foundation
560# gives unlimited permission to copy and/or distribute it,
561# with or without modifications, as long as this notice is preserved.
562
563# serial 12
564
565# This macro actually does too much.  Some checks are only needed if
566# your package does certain things.  But this isn't really a big deal.
567
568# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
569# AM_INIT_AUTOMAKE([OPTIONS])
570# -----------------------------------------------
571# The call with PACKAGE and VERSION arguments is the old style
572# call (pre autoconf-2.50), which is being phased out.  PACKAGE
573# and VERSION should now be passed to AC_INIT and removed from
574# the call to AM_INIT_AUTOMAKE.
575# We support both call styles for the transition.  After
576# the next Automake release, Autoconf can make the AC_INIT
577# arguments mandatory, and then we can depend on a new Autoconf
578# release and drop the old call support.
579AC_DEFUN([AM_INIT_AUTOMAKE],
580[AC_PREREQ([2.60])dnl
581dnl Autoconf wants to disallow AM_ names.  We explicitly allow
582dnl the ones we care about.
583m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
584AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
585AC_REQUIRE([AC_PROG_INSTALL])dnl
586if test "`cd $srcdir && pwd`" != "`pwd`"; then
587  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
588  # is not polluted with repeated "-I."
589  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
590  # test to see if srcdir already configured
591  if test -f $srcdir/config.status; then
592    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
593  fi
594fi
595
596# test whether we have cygpath
597if test -z "$CYGPATH_W"; then
598  if (cygpath --version) >/dev/null 2>/dev/null; then
599    CYGPATH_W='cygpath -w'
600  else
601    CYGPATH_W=echo
602  fi
603fi
604AC_SUBST([CYGPATH_W])
605
606# Define the identity of the package.
607dnl Distinguish between old-style and new-style calls.
608m4_ifval([$2],
609[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
610 AC_SUBST([PACKAGE], [$1])dnl
611 AC_SUBST([VERSION], [$2])],
612[_AM_SET_OPTIONS([$1])dnl
613dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
614m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
615  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
616 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
617 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
618
619_AM_IF_OPTION([no-define],,
620[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
621 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
622
623# Some tools Automake needs.
624AC_REQUIRE([AM_SANITY_CHECK])dnl
625AC_REQUIRE([AC_ARG_PROGRAM])dnl
626AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
627AM_MISSING_PROG(AUTOCONF, autoconf)
628AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
629AM_MISSING_PROG(AUTOHEADER, autoheader)
630AM_MISSING_PROG(MAKEINFO, makeinfo)
631AM_PROG_INSTALL_SH
632AM_PROG_INSTALL_STRIP
633AC_REQUIRE([AM_PROG_MKDIR_P])dnl
634# We need awk for the "check" target.  The system "awk" is bad on
635# some platforms.
636AC_REQUIRE([AC_PROG_AWK])dnl
637AC_REQUIRE([AC_PROG_MAKE_SET])dnl
638AC_REQUIRE([AM_SET_LEADING_DOT])dnl
639_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
640              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
641                             [_AM_PROG_TAR([v7])])])
642_AM_IF_OPTION([no-dependencies],,
643[AC_PROVIDE_IFELSE([AC_PROG_CC],
644                  [_AM_DEPENDENCIES(CC)],
645                  [define([AC_PROG_CC],
646                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
647AC_PROVIDE_IFELSE([AC_PROG_CXX],
648                  [_AM_DEPENDENCIES(CXX)],
649                  [define([AC_PROG_CXX],
650                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
651AC_PROVIDE_IFELSE([AC_PROG_OBJC],
652                  [_AM_DEPENDENCIES(OBJC)],
653                  [define([AC_PROG_OBJC],
654                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
655])
656])
657
658
659# When config.status generates a header, we must update the stamp-h file.
660# This file resides in the same directory as the config header
661# that is generated.  The stamp files are numbered to have different names.
662
663# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
664# loop where config.status creates the headers, so we can generate
665# our stamp files there.
666AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
667[# Compute $1's index in $config_headers.
668_am_stamp_count=1
669for _am_header in $config_headers :; do
670  case $_am_header in
671    $1 | $1:* )
672      break ;;
673    * )
674      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
675  esac
676done
677echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
678
679# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
680#
681# This file is free software; the Free Software Foundation
682# gives unlimited permission to copy and/or distribute it,
683# with or without modifications, as long as this notice is preserved.
684
685# AM_PROG_INSTALL_SH
686# ------------------
687# Define $install_sh.
688AC_DEFUN([AM_PROG_INSTALL_SH],
689[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
690install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
691AC_SUBST(install_sh)])
692
693# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
694#
695# This file is free software; the Free Software Foundation
696# gives unlimited permission to copy and/or distribute it,
697# with or without modifications, as long as this notice is preserved.
698
699# serial 2
700
701# Check whether the underlying file-system supports filenames
702# with a leading dot.  For instance MS-DOS doesn't.
703AC_DEFUN([AM_SET_LEADING_DOT],
704[rm -rf .tst 2>/dev/null
705mkdir .tst 2>/dev/null
706if test -d .tst; then
707  am__leading_dot=.
708else
709  am__leading_dot=_
710fi
711rmdir .tst 2>/dev/null
712AC_SUBST([am__leading_dot])])
713
714# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
715# From Jim Meyering
716
717# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
718# Free Software Foundation, Inc.
719#
720# This file is free software; the Free Software Foundation
721# gives unlimited permission to copy and/or distribute it,
722# with or without modifications, as long as this notice is preserved.
723
724# serial 4
725
726AC_DEFUN([AM_MAINTAINER_MODE],
727[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
728  dnl maintainer-mode is disabled by default
729  AC_ARG_ENABLE(maintainer-mode,
730[  --enable-maintainer-mode  enable make rules and dependencies not useful
731                          (and sometimes confusing) to the casual installer],
732      USE_MAINTAINER_MODE=$enableval,
733      USE_MAINTAINER_MODE=no)
734  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
735  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
736  MAINT=$MAINTAINER_MODE_TRUE
737  AC_SUBST(MAINT)dnl
738]
739)
740
741AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
742
743# Check to see how 'make' treats includes.                  -*- Autoconf -*-
744
745# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
746#
747# This file is free software; the Free Software Foundation
748# gives unlimited permission to copy and/or distribute it,
749# with or without modifications, as long as this notice is preserved.
750
751# serial 3
752
753# AM_MAKE_INCLUDE()
754# -----------------
755# Check to see how make treats includes.
756AC_DEFUN([AM_MAKE_INCLUDE],
757[am_make=${MAKE-make}
758cat > confinc << 'END'
759am__doit:
760        @echo done
761.PHONY: am__doit
762END
763# If we don't find an include directive, just comment out the code.
764AC_MSG_CHECKING([for style of include used by $am_make])
765am__include="#"
766am__quote=
767_am_result=none
768# First try GNU make style include.
769echo "include confinc" > confmf
770# We grep out `Entering directory' and `Leaving directory'
771# messages which can occur if `w' ends up in MAKEFLAGS.
772# In particular we don't look at `^make:' because GNU make might
773# be invoked under some other name (usually "gmake"), in which
774# case it prints its new name instead of `make'.
775if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
776   am__include=include
777   am__quote=
778   _am_result=GNU
779fi
780# Now try BSD make style include.
781if test "$am__include" = "#"; then
782   echo '.include "confinc"' > confmf
783   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
784      am__include=.include
785      am__quote="\""
786      _am_result=BSD
787   fi
788fi
789AC_SUBST([am__include])
790AC_SUBST([am__quote])
791AC_MSG_RESULT([$_am_result])
792rm -f confinc confmf
793])
794
795# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
796# Free Software Foundation, Inc.
797#
798# This file is free software; the Free Software Foundation
799# gives unlimited permission to copy and/or distribute it,
800# with or without modifications, as long as this notice is preserved.
801
802# serial 5
803
804# AM_PROG_CC_C_O
805# --------------
806# Like AC_PROG_CC_C_O, but changed for automake.
807AC_DEFUN([AM_PROG_CC_C_O],
808[AC_REQUIRE([AC_PROG_CC_C_O])dnl
809AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
810AC_REQUIRE_AUX_FILE([compile])dnl
811# FIXME: we rely on the cache variable name because
812# there is no other way.
813set dummy $CC
814ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
815if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
816   # Losing compiler, so override with the script.
817   # FIXME: It is wrong to rewrite CC.
818   # But if we don't then we get into trouble of one sort or another.
819   # A longer-term fix would be to have automake use am__CC in this case,
820   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
821   CC="$am_aux_dir/compile $CC"
822fi
823dnl Make sure AC_PROG_CC is never called again, or it will override our
824dnl setting of CC.
825m4_define([AC_PROG_CC],
826          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
827])
828
829# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
830
831# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
832# Free Software Foundation, Inc.
833#
834# This file is free software; the Free Software Foundation
835# gives unlimited permission to copy and/or distribute it,
836# with or without modifications, as long as this notice is preserved.
837
838# serial 5
839
840# AM_MISSING_PROG(NAME, PROGRAM)
841# ------------------------------
842AC_DEFUN([AM_MISSING_PROG],
843[AC_REQUIRE([AM_MISSING_HAS_RUN])
844$1=${$1-"${am_missing_run}$2"}
845AC_SUBST($1)])
846
847
848# AM_MISSING_HAS_RUN
849# ------------------
850# Define MISSING if not defined so far and test if it supports --run.
851# If it does, set am_missing_run to use it, otherwise, to nothing.
852AC_DEFUN([AM_MISSING_HAS_RUN],
853[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
854AC_REQUIRE_AUX_FILE([missing])dnl
855test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
856# Use eval to expand $SHELL
857if eval "$MISSING --run true"; then
858  am_missing_run="$MISSING --run "
859else
860  am_missing_run=
861  AC_MSG_WARN([`missing' script is too old or missing])
862fi
863])
864
865# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
866#
867# This file is free software; the Free Software Foundation
868# gives unlimited permission to copy and/or distribute it,
869# with or without modifications, as long as this notice is preserved.
870
871# AM_PROG_MKDIR_P
872# ---------------
873# Check for `mkdir -p'.
874AC_DEFUN([AM_PROG_MKDIR_P],
875[AC_PREREQ([2.60])dnl
876AC_REQUIRE([AC_PROG_MKDIR_P])dnl
877dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
878dnl while keeping a definition of mkdir_p for backward compatibility.
879dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
880dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
881dnl Makefile.ins that do not define MKDIR_P, so we do our own
882dnl adjustment using top_builddir (which is defined more often than
883dnl MKDIR_P).
884AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
885case $mkdir_p in
886  [[\\/$]]* | ?:[[\\/]]*) ;;
887  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
888esac
889])
890
891# Helper functions for option handling.                     -*- Autoconf -*-
892
893# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
894#
895# This file is free software; the Free Software Foundation
896# gives unlimited permission to copy and/or distribute it,
897# with or without modifications, as long as this notice is preserved.
898
899# serial 3
900
901# _AM_MANGLE_OPTION(NAME)
902</