1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl Process this file with aclocal to get an aclocal.m4 file. Then
14 dnl process that with autoconf.
15 dnl ====================================================================
19 dnl ====================================================================
20 dnl####COPYRIGHTBEGIN####
22 dnl ----------------------------------------------------------------------------
23 dnl Copyright (C) 2002 Bart Veer
25 dnl This file is part of the eCos host tools.
27 dnl This program is free software; you can redistribute it and/or modify it
28 dnl under the terms of the GNU General Public License as published by the Free
29 dnl Software Foundation; either version 2 of the License, or (at your option)
30 dnl any later version.
32 dnl This program is distributed in the hope that it will be useful, but WITHOUT
33 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
34 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
37 dnl You should have received a copy of the GNU General Public License along with
38 dnl this program; if not, write to the Free Software Foundation, Inc.,
39 dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
41 dnl ----------------------------------------------------------------------------
43 dnl####COPYRIGHTEND####
44 dnl ====================================================================
45 dnl#####DESCRIPTIONBEGIN####
52 dnl####DESCRIPTIONEND####
53 dnl ====================================================================
55 dnl Access shared macros.
56 dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
57 dnl incorporate the macro into aclocal.m4
58 sinclude(../../../../../../acsupport/acinclude.m4)
60 # Define a conditional.
62 AC_DEFUN([AM_CONDITIONAL],
73 # Do all the work for Automake. This macro actually does too much --
74 # some checks are only needed if your package does certain things.
75 # But this isn't really a big deal.
80 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
82 AC_DEFUN([AM_INIT_AUTOMAKE],
83 [AC_REQUIRE([AC_PROG_INSTALL])
88 dnl test to see if srcdir already configured
89 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
90 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
93 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
94 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
95 AC_REQUIRE([AM_SANITY_CHECK])
96 AC_REQUIRE([AC_ARG_PROGRAM])
97 dnl FIXME This is truly gross.
98 missing_dir=`cd $ac_aux_dir && pwd`
99 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
100 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
101 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
102 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
103 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
104 AC_REQUIRE([AC_PROG_MAKE_SET])])
107 # Check to make sure that the build environment is sane.
110 AC_DEFUN([AM_SANITY_CHECK],
111 [AC_MSG_CHECKING([whether build environment is sane])
114 echo timestamp > conftestfile
115 # Do `set' in a subshell so we don't clobber the current shell's
116 # arguments. Must try -L first in case configure is actually a
117 # symlink; some systems play weird games with the mod time of symlinks
118 # (eg FreeBSD returns the mod time of the symlink's containing
121 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
122 if test "[$]*" = "X"; then
124 set X `ls -t $srcdir/configure conftestfile`
126 if test "[$]*" != "X $srcdir/configure conftestfile" \
127 && test "[$]*" != "X conftestfile $srcdir/configure"; then
129 # If neither matched, then we have a broken ls. This can happen
130 # if, for instance, CONFIG_SHELL is bash and it inherits a
131 # broken ls alias from the environment. This has actually
132 # happened. Such a system could not be considered "sane".
133 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
134 alias in your environment])
137 test "[$]2" = conftestfile
143 AC_MSG_ERROR([newly created file is older than distributed files!
144 Check your system clock])
149 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
150 dnl The program must properly implement --version.
151 AC_DEFUN([AM_MISSING_PROG],
152 [AC_MSG_CHECKING(for working $2)
153 # Run test in a subshell; some versions of sh will print an error if
154 # an executable is not found, even if stderr is redirected.
155 # Redirect stdin to placate older versions of autoconf. Sigh.
156 if ($2 --version) < /dev/null > /dev/null 2>&1; then
161 AC_MSG_RESULT(missing)
165 # Add --enable-maintainer-mode option to configure.
170 AC_DEFUN([AM_MAINTAINER_MODE],
171 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
172 dnl maintainer-mode is disabled by default
173 AC_ARG_ENABLE(maintainer-mode,
174 [ --enable-maintainer-mode enable make rules and dependencies not useful
175 (and sometimes confusing) to the casual installer],
176 USE_MAINTAINER_MODE=$enableval,
177 USE_MAINTAINER_MODE=no)
178 AC_MSG_RESULT($USE_MAINTAINER_MODE)
179 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
180 MAINT=$MAINTAINER_MODE_TRUE