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