1# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4# 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
14
15dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
16dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
17dnl also defines GSTUFF_PKG_ERRORS on error
18AC_DEFUN(PKG_CHECK_MODULES, [
19  succeeded=no
20
21  if test -z "$PKG_CONFIG"; then
22    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
23  fi
24
25  if test "$PKG_CONFIG" = "no" ; then
26     echo "*** The pkg-config script could not be found. Make sure it is"
27     echo "*** in your path, or set the PKG_CONFIG environment variable"
28     echo "*** to the full path to pkg-config."
29     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
30  else
31     PKG_CONFIG_MIN_VERSION=0.9.0
32     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
33        AC_MSG_CHECKING(for $2)
34
35        if $PKG_CONFIG --exists "$2" ; then
36            AC_MSG_RESULT(yes)
37            succeeded=yes
38
39            AC_MSG_CHECKING($1_CFLAGS)
40            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
41            AC_MSG_RESULT($$1_CFLAGS)
42
43            AC_MSG_CHECKING($1_LIBS)
44            $1_LIBS=`$PKG_CONFIG --libs "$2"`
45            AC_MSG_RESULT($$1_LIBS)
46        else
47            $1_CFLAGS=""
48            $1_LIBS=""
49            ## If we have a custom action on failure, don't print errors, but
50            ## do set a variable so people can do so.
51            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
52            ifelse([$4], ,echo $$1_PKG_ERRORS,)
53        fi
54
55        AC_SUBST($1_CFLAGS)
56        AC_SUBST($1_LIBS)
57     else
58        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
59        echo "*** See http://www.freedesktop.org/software/pkgconfig"
60     fi
61  fi
62
63  if test $succeeded = yes; then
64     ifelse([$3], , :, [$3])
65  else
66     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
67  fi
68])
69
70
71
72#                                                        -*- Autoconf -*-
73# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
74# Generated from amversion.in; do not edit by hand.
75
76# This program is free software; you can redistribute it and/or modify
77# it under the terms of the GNU General Public License as published by
78# the Free Software Foundation; either version 2, or (at your option)
79# any later version.
80
81# This program is distributed in the hope that it will be useful,
82# but WITHOUT ANY WARRANTY; without even the implied warranty of
83# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
84# GNU General Public License for more details.
85
86# You should have received a copy of the GNU General Public License
87# along with this program; if not, write to the Free Software
88# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
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.
94AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
95
96# AM_SET_CURRENT_AUTOMAKE_VERSION
97# -------------------------------
98# Call AM_AUTOMAKE_VERSION so it can be traced.
99# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
100AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
101	 [AM_AUTOMAKE_VERSION([1.8.5])])
102
103# AM_AUX_DIR_EXPAND
104
105# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
106
107# This program is free software; you can redistribute it and/or modify
108# it under the terms of the GNU General Public License as published by
109# the Free Software Foundation; either version 2, or (at your option)
110# any later version.
111
112# This program is distributed in the hope that it will be useful,
113# but WITHOUT ANY WARRANTY; without even the implied warranty of
114# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
115# GNU General Public License for more details.
116
117# You should have received a copy of the GNU General Public License
118# along with this program; if not, write to the Free Software
119# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
120# 02111-1307, USA.
121
122# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
123# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
124# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
125#
126# Of course, Automake must honor this variable whenever it calls a
127# tool from the auxiliary directory.  The problem is that $srcdir (and
128# therefore $ac_aux_dir as well) can be either absolute or relative,
129# depending on how configure is run.  This is pretty annoying, since
130# it makes $ac_aux_dir quite unusable in subdirectories: in the top
131# source directory, any form will work fine, but in subdirectories a
132# relative path needs to be adjusted first.
133#
134# $ac_aux_dir/missing
135#    fails when called from a subdirectory if $ac_aux_dir is relative
136# $top_srcdir/$ac_aux_dir/missing
137#    fails if $ac_aux_dir is absolute,
138#    fails when called from a subdirectory in a VPATH build with
139#          a relative $ac_aux_dir
140#
141# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
142# are both prefixed by $srcdir.  In an in-source build this is usually
143# harmless because $srcdir is `.', but things will broke when you
144# start a VPATH build or use an absolute $srcdir.
145#
146# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
147# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
148#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
149# and then we would define $MISSING as
150#   MISSING="\${SHELL} $am_aux_dir/missing"
151# This will work as long as MISSING is not called from configure, because
152# unfortunately $(top_srcdir) has no meaning in configure.
153# However there are other variables, like CC, which are often used in
154# configure, and could therefore not use this "fixed" $ac_aux_dir.
155#
156# Another solution, used here, is to always expand $ac_aux_dir to an
157# absolute PATH.  The drawback is that using absolute paths prevent a
158# configured tree to be moved without reconfiguration.
159
160AC_DEFUN([AM_AUX_DIR_EXPAND],
161[dnl Rely on autoconf to set up CDPATH properly.
162AC_PREREQ([2.50])dnl
163# expand $ac_aux_dir to an absolute path
164am_aux_dir=`cd $ac_aux_dir && pwd`
165])
166
167
168# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003
169# Free Software Foundation, Inc.
170
171# This program is free software; you can redistribute it and/or modify
172# it under the terms of the GNU General Public License as published by
173# the Free Software Foundation; either version 2, or (at your option)
174# any later version.
175
176# This program is distributed in the hope that it will be useful,
177# but WITHOUT ANY WARRANTY; without even the implied warranty of
178# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
179# GNU General Public License for more details.
180
181# You should have received a copy of the GNU General Public License
182# along with this program; if not, write to the Free Software
183# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
184# 02111-1307, USA.
185
186# serial 3
187
188# This was merged into AC_PROG_CC in Autoconf.
189
190AU_DEFUN([AM_PROG_CC_STDC],
191[AC_PROG_CC
192AC_DIAGNOSE([obsolete], [$0:
193	your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
194	`ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
195	you adjust the code.  You can also remove the above call to
196	AC_PROG_CC if you already called it elsewhere.])
197am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
198])
199AU_DEFUN([fp_PROG_CC_STDC])
200
201# AM_CONDITIONAL                                              -*- Autoconf -*-
202
203# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
204
205# This program is free software; you can redistribute it and/or modify
206# it under the terms of the GNU General Public License as published by
207# the Free Software Foundation; either version 2, or (at your option)
208# any later version.
209
210# This program is distributed in the hope that it will be useful,
211# but WITHOUT ANY WARRANTY; without even the implied warranty of
212# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
213# GNU General Public License for more details.
214
215# You should have received a copy of the GNU General Public License
216# along with this program; if not, write to the Free Software
217# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
218# 02111-1307, USA.
219
220# serial 6
221
222# AM_CONDITIONAL(NAME, SHELL-CONDITION)
223# -------------------------------------
224# Define a conditional.
225AC_DEFUN([AM_CONDITIONAL],
226[AC_PREREQ(2.52)dnl
227 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
228	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
229AC_SUBST([$1_TRUE])
230AC_SUBST([$1_FALSE])
231if $2; then
232  $1_TRUE=
233  $1_FALSE='#'
234else
235  $1_TRUE='#'
236  $1_FALSE=
237fi
238AC_CONFIG_COMMANDS_PRE(
239[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
240  AC_MSG_ERROR([conditional "$1" was never defined.
241Usually this means the macro was only invoked conditionally.])
242fi])])
243
244# serial 7						-*- Autoconf -*-
245
246# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
247# Free Software Foundation, Inc.
248
249# This program is free software; you can redistribute it and/or modify
250# it under the terms of the GNU General Public License as published by
251# the Free Software Foundation; either version 2, or (at your option)
252# any later version.
253
254# This program is distributed in the hope that it will be useful,
255# but WITHOUT ANY WARRANTY; without even the implied warranty of
256# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
257# GNU General Public License for more details.
258
259# You should have received a copy of the GNU General Public License
260# along with this program; if not, write to the Free Software
261# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
262# 02111-1307, USA.
263
264
265# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
266# written in clear, in which case automake, when reading aclocal.m4,
267# will think it sees a *use*, and therefore will trigger all it's
268# C support machinery.  Also note that it means that autoscan, seeing
269# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
270
271
272
273# _AM_DEPENDENCIES(NAME)
274# ----------------------
275# See how the compiler implements dependency checking.
276# NAME is "CC", "CXX", "GCJ", or "OBJC".
277# We try a few techniques and use that to set a single cache variable.
278#
279# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
280# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
281# dependency, and given that the user is not expected to run this macro,
282# just rely on AC_PROG_CC.
283AC_DEFUN([_AM_DEPENDENCIES],
284[AC_REQUIRE([AM_SET_DEPDIR])dnl
285AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
286AC_REQUIRE([AM_MAKE_INCLUDE])dnl
287AC_REQUIRE([AM_DEP_TRACK])dnl
288
289ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
290       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
291       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
292       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
293                   [depcc="$$1"   am_compiler_list=])
294
295AC_CACHE_CHECK([dependency style of $depcc],
296               [am_cv_$1_dependencies_compiler_type],
297[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
298  # We make a subdir and do the tests there.  Otherwise we can end up
299  # making bogus files that we don't know about and never remove.  For
300  # instance it was reported that on HP-UX the gcc test will end up
301  # making a dummy file named `D' -- because `-MD' means `put the output
302  # in D'.
303  mkdir conftest.dir
304  # Copy depcomp to subdir because otherwise we won't find it if we're
305  # using a relative directory.
306  cp "$am_depcomp" conftest.dir
307  cd conftest.dir
308  # We will build objects and dependencies in a subdirectory because
309  # it helps to detect inapplicable dependency modes.  For instance
310  # both Tru64's cc and ICC support -MD to output dependencies as a
311  # side effect of compilation, but ICC will put the dependencies in
312  # the current directory while Tru64 will put them in the object
313  # directory.
314  mkdir sub
315
316  am_cv_$1_dependencies_compiler_type=none
317  if test "$am_compiler_list" = ""; then
318     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
319  fi
320  for depmode in $am_compiler_list; do
321    # Setup a source with many dependencies, because some compilers
322    # like to wrap large dependency lists on column 80 (with \), and
323    # we should not choose a depcomp mode which is confused by this.
324    #
325    # We need to recreate these files for each test, as the compiler may
326    # overwrite some of them when testing with obscure command lines.
327    # This happens at least with the AIX C compiler.
328    : > sub/conftest.c
329    for i in 1 2 3 4 5 6; do
330      echo '#include "conftst'$i'.h"' >> sub/conftest.c
331      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
332      # Solaris 8's {/usr,}/bin/sh.
333      touch sub/conftst$i.h
334    done
335    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
336
337    case $depmode in
338    nosideeffect)
339      # after this tag, mechanisms are not by side-effect, so they'll
340      # only be used when explicitly requested
341      if test "x$enable_dependency_tracking" = xyes; then
342	continue
343      else
344	break
345      fi
346      ;;
347    none) break ;;
348    esac
349    # We check with `-c' and `-o' for the sake of the "dashmstdout"
350    # mode.  It turns out that the SunPro C++ compiler does not properly
351    # handle `-M -o', and we need to detect this.
352    if depmode=$depmode \
353       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
354       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
355       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
356         >/dev/null 2>conftest.err &&
357       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
358       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
359       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
360      # icc doesn't choke on unknown options, it will just issue warnings
361      # or remarks (even with -Werror).  So we grep stderr for any message
362      # that says an option was ignored or not supported.
363      # When given -MP, icc 7.0 and 7.1 complain thusly:
364      #   icc: Command line warning: ignoring option '-M'; no argument required
365      # The diagnosis changed in icc 8.0:
366      #   icc: Command line remark: option '-MP' not supported
367      if (grep 'ignoring option' conftest.err ||
368          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
369        am_cv_$1_dependencies_compiler_type=$depmode
370        break
371      fi
372    fi
373  done
374
375  cd ..
376  rm -rf conftest.dir
377else
378  am_cv_$1_dependencies_compiler_type=none
379fi
380])
381AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
382AM_CONDITIONAL([am__fastdep$1], [
383  test "x$enable_dependency_tracking" != xno \
384  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
385])
386
387
388# AM_SET_DEPDIR
389# -------------
390# Choose a directory name for dependency files.
391# This macro is AC_REQUIREd in _AM_DEPENDENCIES
392AC_DEFUN([AM_SET_DEPDIR],
393[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
394AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
395])
396
397
398# AM_DEP_TRACK
399# ------------
400AC_DEFUN([AM_DEP_TRACK],
401[AC_ARG_ENABLE(dependency-tracking,
402[  --disable-dependency-tracking  speeds up one-time build
403  --enable-dependency-tracking   do not reject slow dependency extractors])
404if test "x$enable_dependency_tracking" != xno; then
405  am_depcomp="$ac_aux_dir/depcomp"
406  AMDEPBACKSLASH='\'
407fi
408AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
409AC_SUBST([AMDEPBACKSLASH])
410])
411
412# Generate code to set up dependency tracking.   -*- Autoconf -*-
413
414# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
415
416# This program is free software; you can redistribute it and/or modify
417# it under the terms of the GNU General Public License as published by
418# the Free Software Foundation; either version 2, or (at your option)
419# any later version.
420
421# This program is distributed in the hope that it will be useful,
422# but WITHOUT ANY WARRANTY; without even the implied warranty of
423# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
424# GNU General Public License for more details.
425
426# You should have received a copy of the GNU General Public License
427# along with this program; if not, write to the Free Software
428# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
429# 02111-1307, USA.
430
431#serial 2
432
433# _AM_OUTPUT_DEPENDENCY_COMMANDS
434# ------------------------------
435AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
436[for mf in $CONFIG_FILES; do
437  # Strip MF so we end up with the name of the file.
438  mf=`echo "$mf" | sed -e 's/:.*$//'`
439  # Check whether this is an Automake generated Makefile or not.
440  # We used to match only the files named `Makefile.in', but
441  # some people rename them; so instead we look at the file content.
442  # Grep'ing the first line is not enough: some people post-process
443  # each Makefile.in and add a new line on top of each file to say so.
444  # So let's grep whole file.
445  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
446    dirpart=`AS_DIRNAME("$mf")`
447  else
448    continue
449  fi
450  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
451  # Extract the definition of DEP_FILES from the Makefile without
452  # running `make'.
453  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
454  test -z "$DEPDIR" && continue
455  # When using ansi2knr, U may be empty or an underscore; expand it
456  U=`sed -n 's/^U = //p' < "$mf"`
457  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
458  # We invoke sed twice because it is the simplest approach to
459  # changing $(DEPDIR) to its actual value in the expansion.
460  for file in `sed -n '
461    /^DEP_FILES = .*\\\\$/ {
462      s/^DEP_FILES = //
463      :loop
464	s/\\\\$//
465	p
466	n
467	/\\\\$/ b loop
468      p
469    }
470    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
471       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
472    # Make sure the directory exists.
473    test -f "$dirpart/$file" && continue
474    fdir=`AS_DIRNAME(["$file"])`
475    AS_MKDIR_P([$dirpart/$fdir])
476    # echo "creating $dirpart/$file"
477    echo '# dummy' > "$dirpart/$file"
478  done
479done
480])# _AM_OUTPUT_DEPENDENCY_COMMANDS
481
482
483# AM_OUTPUT_DEPENDENCY_COMMANDS
484# -----------------------------
485# This macro should only be invoked once -- use via AC_REQUIRE.
486#
487# This code is only required when automatic dependency tracking
488# is enabled.  FIXME.  This creates each `.P' file that we will
489# need in order to bootstrap the dependency handling code.
490AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
491[AC_CONFIG_COMMANDS([depfiles],
492     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
493     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
494])
495
496# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
497
498# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
499
500# This program is free software; you can redistribute it and/or modify
501# it under the terms of the GNU General Public License as published by
502# the Free Software Foundation; either version 2, or (at your option)
503# any later version.
504
505# This program is distributed in the hope that it will be useful,
506# but WITHOUT ANY WARRANTY; without even the implied warranty of
507# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
508# GNU General Public License for more details.
509
510# You should have received a copy of the GNU General Public License
511# along with this program; if not, write to the Free Software
512# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
513# 02111-1307, USA.
514
515# serial 7
516
517# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
518AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
519
520# Do all the work for Automake.                            -*- Autoconf -*-
521
522# This macro actually does too much some checks are only needed if
523# your package does certain things.  But this isn't really a big deal.
524
525# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
526# Free Software Foundation, Inc.
527
528# This program is free software; you can redistribute it and/or modify
529# it under the terms of the GNU General Public License as published by
530# the Free Software Foundation; either version 2, or (at your option)
531# any later version.
532
533# This program is distributed in the hope that it will be useful,
534# but WITHOUT ANY WARRANTY; without even the implied warranty of
535# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
536# GNU General Public License for more details.
537
538# You should have received a copy of the GNU General Public License
539# along with this program; if not, write to the Free Software
540# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
541# 02111-1307, USA.
542
543# serial 11
544
545# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
546# AM_INIT_AUTOMAKE([OPTIONS])
547# -----------------------------------------------
548# The call with PACKAGE and VERSION arguments is the old style
549# call (pre autoconf-2.50), which is being phased out.  PACKAGE
550# and VERSION should now be passed to AC_INIT and removed from
551# the call to AM_INIT_AUTOMAKE.
552# We support both call styles for the transition.  After
553# the next Automake release, Autoconf can make the AC_INIT
554# arguments mandatory, and then we can depend on a new Autoconf
555# release and drop the old call support.
556AC_DEFUN([AM_INIT_AUTOMAKE],
557[AC_PREREQ([2.58])dnl
558dnl Autoconf wants to disallow AM_ names.  We explicitly allow
559dnl the ones we care about.
560m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
561AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
562AC_REQUIRE([AC_PROG_INSTALL])dnl
563# test to see if srcdir already configured
564if test "`cd $srcdir && pwd`" != "`pwd`" &&
565   test -f $srcdir/config.status; then
566  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
567fi
568
569# test whether we have cygpath
570if test -z "$CYGPATH_W"; then
571  if (cygpath --version) >/dev/null 2>/dev/null; then
572    CYGPATH_W='cygpath -w'
573  else
574    CYGPATH_W=echo
575  fi
576fi
577AC_SUBST([CYGPATH_W])
578
579# Define the identity of the package.
580dnl Distinguish between old-style and new-style calls.
581m4_ifval([$2],
582[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
583 AC_SUBST([PACKAGE], [$1])dnl
584 AC_SUBST([VERSION], [$2])],
585[_AM_SET_OPTIONS([$1])dnl
586 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
587 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
588
589_AM_IF_OPTION([no-define],,
590[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
591 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
592
593# Some tools Automake needs.
594AC_REQUIRE([AM_SANITY_CHECK])dnl
595AC_REQUIRE([AC_ARG_PROGRAM])dnl
596AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
597AM_MISSING_PROG(AUTOCONF, autoconf)
598AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
599AM_MISSING_PROG(AUTOHEADER, autoheader)
600AM_MISSING_PROG(MAKEINFO, makeinfo)
601AM_MISSING_PROG(AMTAR, tar)
602AM_PROG_INSTALL_SH
603AM_PROG_INSTALL_STRIP
604AC_REQUIRE([AM_PROG_MKDIR_P])dnl
605# We need awk for the "check" target.  The system "awk" is bad on
606# some platforms.
607AC_REQUIRE([AC_PROG_AWK])dnl
608AC_REQUIRE([AC_PROG_MAKE_SET])dnl
609AC_REQUIRE([AM_SET_LEADING_DOT])dnl
610
611_AM_IF_OPTION([no-dependencies],,
612[AC_PROVIDE_IFELSE([AC_PROG_CC],
613                  [_AM_DEPENDENCIES(CC)],
614                  [define([AC_PROG_CC],
615                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
616AC_PROVIDE_IFELSE([AC_PROG_CXX],
617                  [_AM_DEPENDENCIES(CXX)],
618                  [define([AC_PROG_CXX],
619                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
620])
621])
622
623
624# When config.status generates a header, we must update the stamp-h file.
625# This file resides in the same directory as the config header
626# that is generated.  The stamp files are numbered to have different names.
627
628# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
629# loop where config.status creates the headers, so we can generate
630# our stamp files there.
631AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
632[# Compute $1's index in $config_headers.
633_am_stamp_count=1
634for _am_header in $config_headers :; do
635  case $_am_header in
636    $1 | $1:* )
637      break ;;
638    * )
639      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
640  esac
641done
642echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
643
644# AM_PROG_INSTALL_SH
645# ------------------
646# Define $install_sh.
647
648# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
649
650# This program is free software; you can redistribute it and/or modify
651# it under the terms of the GNU General Public License as published by
652# the Free Software Foundation; either version 2, or (at your option)
653# any later version.
654
655# This program is distributed in the hope that it will be useful,
656# but WITHOUT ANY WARRANTY; without even the implied warranty of
657# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
658# GNU General Public License for more details.
659
660# You should have received a copy of the GNU General Public License
661# along with this program; if not, write to the Free Software
662# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
663# 02111-1307, USA.
664
665AC_DEFUN([AM_PROG_INSTALL_SH],
666[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
667install_sh=${install_sh-"$am_aux_dir/install-sh"}
668AC_SUBST(install_sh)])
669
670#                                                          -*- Autoconf -*-
671# Copyright (C) 2003  Free Software Foundation, Inc.
672
673# This program is free software; you can redistribute it and/or modify
674# it under the terms of the GNU General Public License as published by
675# the Free Software Foundation; either version 2, or (at your option)
676# any later version.
677
678# This program is distributed in the hope that it will be useful,
679# but WITHOUT ANY WARRANTY; without even the implied warranty of
680# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
681# GNU General Public License for more details.
682
683# You should have received a copy of the GNU General Public License
684# along with this program; if not, write to the Free Software
685# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
686# 02111-1307, USA.
687
688# serial 1
689
690# Check whether the underlying file-system supports filenames
691# with a leading dot.  For instance MS-DOS doesn't.
692AC_DEFUN([AM_SET_LEADING_DOT],
693[rm -rf .tst 2>/dev/null
694mkdir .tst 2>/dev/null
695if test -d .tst; then
696  am__leading_dot=.
697else
698  am__leading_dot=_
699fi
700rmdir .tst 2>/dev/null
701AC_SUBST([am__leading_dot])])
702
703# Add --enable-maintainer-mode option to configure.
704# From Jim Meyering
705
706# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
707# Free Software Foundation, Inc.
708
709# This program is free software; you can redistribute it and/or modify
710# it under the terms of the GNU General Public License as published by
711# the Free Software Foundation; either version 2, or (at your option)
712# any later version.
713
714# This program is distributed in the hope that it will be useful,
715# but WITHOUT ANY WARRANTY; without even the implied warranty of
716# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
717# GNU General Public License for more details.
718
719# You should have received a copy of the GNU General Public License
720# along with this program; if not, write to the Free Software
721# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
722# 02111-1307, USA.
723
724# serial 3
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 Free Software Foundation, Inc.
746
747# This program is free software; you can redistribute it and/or modify
748# it under the terms of the GNU General Public License as published by
749# the Free Software Foundation; either version 2, or (at your option)
750# any later version.
751
752# This program is distributed in the hope that it will be useful,
753# but WITHOUT ANY WARRANTY; without even the implied warranty of
754# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
755# GNU General Public License for more details.
756
757# You should have received a copy of the GNU General Public License
758# along with this program; if not, write to the Free Software
759# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
760# 02111-1307, USA.
761
762# serial 2
763
764# AM_MAKE_INCLUDE()
765# -----------------
766# Check to see how make treats includes.
767AC_DEFUN([AM_MAKE_INCLUDE],
768[am_make=${MAKE-make}
769cat > confinc << 'END'
770am__doit:
771	@echo done
772.PHONY: am__doit
773END
774# If we don't find an include directive, just comment out the code.
775AC_MSG_CHECKING([for style of include used by $am_make])
776am__include="#"
777am__quote=
778_am_result=none
779# First try GNU make style include.
780echo "include confinc" > confmf
781# We grep out `Entering directory' and `Leaving directory'
782# messages which can occur if `w' ends up in MAKEFLAGS.
783# In particular we don't look at `^make:' because GNU make might
784# be invoked under some other name (usually "gmake"), in which
785# case it prints its new name instead of `make'.
786if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
787   am__include=include
788   am__quote=
789   _am_result=GNU
790fi
791# Now try BSD make style include.
792if test "$am__include" = "#"; then
793   echo '.include "confinc"' > confmf
794   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
795      am__include=.include
796      am__quote="\""
797      _am_result=BSD
798   fi
799fi
800AC_SUBST([am__include])
801AC_SUBST([am__quote])
802AC_MSG_RESULT([$_am_result])
803rm -f confinc confmf
804])
805
806#  -*- Autoconf -*-
807
808
809# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
810
811# This program is free software; you can redistribute it and/or modify
812# it under the terms of the GNU General Public License as published by
813# the Free Software Foundation; either version 2, or (at your option)
814# any later version.
815
816# This program is distributed in the hope that it will be useful,
817# but WITHOUT ANY WARRANTY; without even the implied warranty of
818# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
819# GNU General Public License for more details.
820
821# You should have received a copy of the GNU General Public License
822# along with this program; if not, write to the Free Software
823# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
824# 02111-1307, USA.
825
826# serial 3
827
828# AM_MISSING_PROG(NAME, PROGRAM)
829# ------------------------------
830AC_DEFUN([AM_MISSING_PROG],
831[AC_REQUIRE([AM_MISSING_HAS_RUN])
832$1=${$1-"${am_missing_run}$2"}
833AC_SUBST($1)])
834
835
836# AM_MISSING_HAS_RUN
837# ------------------
838# Define MISSING if not defined so far and test if it supports --run.
839# If it does, set am_missing_run to use it, otherwise, to nothing.
840AC_DEFUN([AM_MISSING_HAS_RUN],
841[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
842test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
843# Use eval to expand $SHELL
844if eval "$MISSING --run true"; then
845  am_missing_run="$MISSING --run "
846else
847  am_missing_run=
848  AC_MSG_WARN([`missing' script is too old or missing])
849fi
850])
851
852# AM_PROG_MKDIR_P
853# ---------------
854# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
855
856# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
857
858# This program is free software; you can redistribute it and/or modify
859# it under the terms of the GNU General Public License as published by
860# the Free Software Foundation; either version 2, or (at your option)
861# any later version.
862
863# This program is distributed in the hope that it will be useful,
864# but WITHOUT ANY WARRANTY; without even the implied warranty of
865# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
866# GNU General Public License for more details.
867
868# You should have received a copy of the GNU General Public License
869# along with this program; if not, write to the Free Software
870# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
871# 02111-1307, USA.
872
873# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
874# created by `make install' are always world readable, even if the
875# installer happens to have an overly restrictive umask (e.g. 077).
876# This was a mistake.  There are at least two reasons why we must not
877# use `-m 0755':
878#   - it causes special bits like SGID to be ignored,
879#   - it may be too restrictive (some setups expect 775 directories).
880#
881# Do not use -m 0755 and let people choose whatever they expect by
882# setting umask.
883#
884# We cannot accept any implementation of `mkdir' that recognizes `-p'.
885# Some implementations (such as Solaris 8's) are not thread-safe: if a
886# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
887# concurrently, both version can detect that a/ is missing, but only
888# one can create it and the other will error out.  Consequently we
889# restrict ourselves to GNU make (using the --version option ensures
890# this.)
891AC_DEFUN([AM_PROG_MKDIR_P],
892[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
893  # Keeping the `.' argument allows $(mkdir_p) to be used without
894  # argument.  Indeed, we sometimes output rules like
895  #   $(mkdir_p) $(somedir)
896  # where $(somedir) is conditionally defined.
897  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
898  # expensive solution, as it forces Make to start a sub-shell.)
899  mkdir_p='mkdir -p -- .'
900else
901  # On NextStep and OpenStep, the `mkdir' command does not
902  # recognize any option.  It will interpret all options as
903  # directories to create, and then abort because `.' already
904  # exists.
905  for d in ./-p ./--version;
906  do
907    test -d $d && rmdir $d
908  done
909  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
910  if test -f "$ac_aux_dir/mkinstalldirs"; then
911    mkdir_p='$(mkinstalldirs)'
912  else
913    mkdir_p='$(install_sh) -d'
914  fi
915fi
916AC_SUBST([mkdir_p])])
917
918# Helper functions for option handling.                    -*- Autoconf -*-
919
920# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
921
922# This program is free software; you can redistribute it and/or modify
923# it under the terms of the GNU General Public License as published by
924# the Free Software Foundation; either version 2, or (at your option)
925# any later version.
926
927# This program is distributed in the hope that it will be useful,
928# but WITHOUT ANY WARRANTY; without even the implied warranty of
929# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
930# GNU General Public License for more details.
931
932# You should have received a copy of the GNU General Public License
933# along with this program; if not, write to the Free Software
934# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
935# 02111-1307, USA.
936
937# serial 2
938
939# _AM_MANGLE_OPTION(NAME)
940# -----------------------
941AC_DEFUN([_AM_MANGLE_OPTION],
942[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
943
944# _AM_SET_OPTION(NAME)
945# ------------------------------
946# Set option NAME.  Presently that only means defining a flag for this option.
947AC_DEFUN([_AM_SET_OPTION],
948[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
949
950# _AM_SET_OPTIONS(OPTIONS)
951# ----------------------------------
952# OPTIONS is a space-separated list of Automake options.
953AC_DEFUN([_AM_SET_OPTIONS],
954[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
955
956# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
957# -------------------------------------------
958# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
959AC_DEFUN([_AM_IF_OPTION],
960[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
961
962#
963# Check to make sure that the build environment is sane.
964#
965
966# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
967
968# This program is free software; you can redistribute it and/or modify
969# it under the terms of the GNU General Public License as published by
970# the Free Software Foundation; either version 2, or (at your option)
971# any later version.
972
973# This program is distributed in the hope that it will be useful,
974# but WITHOUT ANY WARRANTY; without even the implied warranty of
975# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
976# GNU General Public License for more details.
977
978# You should have received a copy of the GNU General Public License
979# along with this program; if not, write to the Free Software
980# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
981# 02111-1307, USA.
982
983# serial 3
984
985# AM_SANITY_CHECK
986# ---------------
987AC_DEFUN([AM_SANITY_CHECK],
988[AC_MSG_CHECKING([whether build environment is sane])
989# Just in case
990sleep 1
991echo timestamp > conftest.file
992# Do `set' in a subshell so we don't clobber the current shell's
993# arguments.  Must try -L first in case configure is actually a
994# symlink; some systems play weird games with the mod time of symlinks
995# (eg FreeBSD returns the mod time of the symlink's containing
996# directory).
997if (
998   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
999   if test "$[*]" = "X"; then
1000      # -L didn't work.
1001      set X `ls -t $srcdir/configure conftest.file`
1002   fi
1003   rm -f conftest.file
1004   if test "$[*]" != "X $srcdir/configure conftest.file" \
1005      && test "$[*]" != "X conftest.file $srcdir/configure"; then
1006
1007      # If neither matched, then we have a broken ls.  This can happen
1008      # if, for instance, CONFIG_SHELL is bash and it inherits a
1009      # broken ls alias from the environment.  This has actually
1010      # happened.  Such a system could not be considered "sane".
1011      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1012alias in your environment])
1013   fi
1014
1015   test "$[2]" = conftest.file
1016   )
1017then
1018   # Ok.
1019   :
1020else
1021   AC_MSG_ERROR([newly created file is older than distributed files!
1022Check your system clock])
1023fi
1024AC_MSG_RESULT(yes)])
1025
1026# AM_PROG_INSTALL_STRIP
1027
1028# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
1029
1030# This program is free software; you can redistribute it and/or modify
1031# it under the terms of the GNU General Public License as published by
1032# the Free Software Foundation; either version 2, or (at your option)
1033# any later version.
1034
1035# This program is distributed in the hope that it will be useful,
1036# but WITHOUT ANY WARRANTY; without even the implied warranty of
1037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1038# GNU General Public License for more details.
1039
1040# You should have received a copy of the GNU General Public License
1041# along with this program; if not, write to the Free Software
1042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1043# 02111-1307, USA.
1044
1045# One issue with vendor `install' (even GNU) is that you can't
1046# specify the program used to strip binaries.  This is especially
1047# annoying in cross-compiling environments, where the build's strip
1048# is unlikely to handle the host's binaries.
1049# Fortunately install-sh will honor a STRIPPROG variable, so we
1050# always use install-sh in `make install-strip', and initialize
1051# STRIPPROG with the value of the STRIP variable (set by the user).
1052AC_DEFUN([AM_PROG_INSTALL_STRIP],
1053[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1054# Installed binaries are usually stripped using `strip' when the user
1055# run `make install-strip'.  However `strip' might not be the right
1056# tool to use in cross-compilation environments, therefore Automake
1057# will honor the `STRIP' environment variable to overrule this program.
1058dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1059if test "$cross_compiling" != no; then
1060  AC_CHECK_TOOL([STRIP], [strip], :)
1061fi
1062INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1063AC_SUBST([INSTALL_STRIP_PROGRAM])])
1064
1065