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