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 Host side implementation of the eCos infrastructure.
21 dnl ====================================================================
22 dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
23 dnl ----------------------------------------------------------------------------
24 dnl Copyright (C) 2002 Bart Veer
25 dnl Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
27 dnl This file is part of the eCos host tools.
29 dnl This program is free software; you can redistribute it and/or modify it
30 dnl under the terms of the GNU General Public License as published by the Free
31 dnl Software Foundation; either version 2 of the License, or (at your option)
32 dnl any later version.
34 dnl This program is distributed in the hope that it will be useful, but WITHOUT
35 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
36 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
39 dnl You should have received a copy of the GNU General Public License along with
40 dnl this program; if not, write to the Free Software Foundation, Inc.,
41 dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
43 dnl ----------------------------------------------------------------------------
44 dnl ####ECOSHOSTGPLCOPYRIGHTEND####
45 dnl ====================================================================
46 dnl#####DESCRIPTIONBEGIN####
53 dnl####DESCRIPTIONEND####
54 dnl ====================================================================
56 dnl Access shared macros.
57 dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
58 dnl incorporate the macro into aclocal.m4
59 sinclude(../../acsupport/acinclude.m4)
61 # Define a conditional.
63 AC_DEFUN([AM_CONDITIONAL],
74 # Do all the work for Automake. This macro actually does too much --
75 # some checks are only needed if your package does certain things.
76 # But this isn't really a big deal.
81 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
83 AC_DEFUN([AM_INIT_AUTOMAKE],
84 [AC_REQUIRE([AC_PROG_INSTALL])
89 dnl test to see if srcdir already configured
90 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
91 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
94 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
95 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
96 AC_REQUIRE([AM_SANITY_CHECK])
97 AC_REQUIRE([AC_ARG_PROGRAM])
98 dnl FIXME This is truly gross.
99 missing_dir=`cd $ac_aux_dir && pwd`
100 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
101 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
102 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
103 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
104 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
105 AC_REQUIRE([AC_PROG_MAKE_SET])])
108 # Check to make sure that the build environment is sane.
111 AC_DEFUN([AM_SANITY_CHECK],
112 [AC_MSG_CHECKING([whether build environment is sane])
115 echo timestamp > conftestfile
116 # Do `set' in a subshell so we don't clobber the current shell's
117 # arguments. Must try -L first in case configure is actually a
118 # symlink; some systems play weird games with the mod time of symlinks
119 # (eg FreeBSD returns the mod time of the symlink's containing
122 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
123 if test "[$]*" = "X"; then
125 set X `ls -t $srcdir/configure conftestfile`
127 if test "[$]*" != "X $srcdir/configure conftestfile" \
128 && test "[$]*" != "X conftestfile $srcdir/configure"; then
130 # If neither matched, then we have a broken ls. This can happen
131 # if, for instance, CONFIG_SHELL is bash and it inherits a
132 # broken ls alias from the environment. This has actually
133 # happened. Such a system could not be considered "sane".
134 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
135 alias in your environment])
138 test "[$]2" = conftestfile
144 AC_MSG_ERROR([newly created file is older than distributed files!
145 Check your system clock])
150 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
151 dnl The program must properly implement --version.
152 AC_DEFUN([AM_MISSING_PROG],
153 [AC_MSG_CHECKING(for working $2)
154 # Run test in a subshell; some versions of sh will print an error if
155 # an executable is not found, even if stderr is redirected.
156 # Redirect stdin to placate older versions of autoconf. Sigh.
157 if ($2 --version) < /dev/null > /dev/null 2>&1; then
162 AC_MSG_RESULT(missing)
166 # Add --enable-maintainer-mode option to configure.
171 AC_DEFUN([AM_MAINTAINER_MODE],
172 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
173 dnl maintainer-mode is disabled by default
174 AC_ARG_ENABLE(maintainer-mode,
175 [ --enable-maintainer-mode enable make rules and dependencies not useful
176 (and sometimes confusing) to the casual installer],
177 USE_MAINTAINER_MODE=$enableval,
178 USE_MAINTAINER_MODE=no)
179 AC_MSG_RESULT($USE_MAINTAINER_MODE)
180 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
181 MAINT=$MAINTAINER_MODE_TRUE
186 # Like AC_CONFIG_HEADER, but automatically create stamp file.
188 AC_DEFUN([AM_CONFIG_HEADER],
190 AC_CONFIG_HEADER([$1])
191 dnl When config.status generates a header, we must update the stamp-h file.
192 dnl This file resides in the same directory as the config header
193 dnl that is generated. We must strip everything past the first ":",
194 dnl and everything past the last "/".
195 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
196 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
197 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
199 for am_file in <<$1>>; do
200 case " <<$>>CONFIG_HEADERS " in
201 *" <<$>>am_file "*<<)>>
202 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
205 am_indx=`expr "<<$>>am_indx" + 1`