]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - tools/src/tools/configtool/standalone/common/aclocal.m4
Initial revision
[karo-tx-redboot.git] / tools / src / tools / configtool / standalone / common / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
2
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.
7
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.
12
13 dnl Process this file with aclocal to get an aclocal.m4 file. Then
14 dnl process that with autoconf.
15 dnl ====================================================================
16 dnl
17 dnl     acinclude.m4
18 dnl
19 dnl ====================================================================
20 dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
21 dnl -------------------------------------------                              
22 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
23 dnl
24 dnl This file is part of the eCos host tools.
25 dnl
26 dnl This program is free software; you can redistribute it and/or modify it 
27 dnl under the terms of the GNU General Public License as published by the Free 
28 dnl Software Foundation; either version 2 of the License, or (at your option) 
29 dnl any later version.
30 dnl 
31 dnl This program is distributed in the hope that it will be useful, but WITHOUT 
32 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
33 dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
34 dnl more details.
35 dnl 
36 dnl You should have received a copy of the GNU General Public License along with
37 dnl this program; if not, write to the Free Software Foundation, Inc., 
38 dnl 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
39 dnl -------------------------------------------                              
40 dnl ####ECOSHOSTGPLCOPYRIGHTEND####
41 dnl ====================================================================
42 dnl#####DESCRIPTIONBEGIN####
43 dnl
44 dnl Author(s):  bartv
45 dnl Contact(s): bartv
46 dnl Date:       1999/08/11
47 dnl Version:    0.01
48 dnl
49 dnl####DESCRIPTIONEND####
50 dnl ====================================================================
51
52 dnl Access shared macros.
53 dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
54 dnl incorporate the macro into aclocal.m4
55 sinclude(../../../../../acsupport/acinclude.m4)
56
57 # Define a conditional.
58
59 AC_DEFUN([AM_CONDITIONAL],
60 [AC_SUBST($1_TRUE)
61 AC_SUBST($1_FALSE)
62 if $2; then
63   $1_TRUE=
64   $1_FALSE='#'
65 else
66   $1_TRUE='#'
67   $1_FALSE=
68 fi])
69
70 # Do all the work for Automake.  This macro actually does too much --
71 # some checks are only needed if your package does certain things.
72 # But this isn't really a big deal.
73
74 # serial 1
75
76 dnl Usage:
77 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
78
79 AC_DEFUN([AM_INIT_AUTOMAKE],
80 [AC_REQUIRE([AC_PROG_INSTALL])
81 PACKAGE=[$1]
82 AC_SUBST(PACKAGE)
83 VERSION=[$2]
84 AC_SUBST(VERSION)
85 dnl test to see if srcdir already configured
86 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
87   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
88 fi
89 ifelse([$3],,
90 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
91 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
92 AC_REQUIRE([AM_SANITY_CHECK])
93 AC_REQUIRE([AC_ARG_PROGRAM])
94 dnl FIXME This is truly gross.
95 missing_dir=`cd $ac_aux_dir && pwd`
96 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
97 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
98 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
99 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
100 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
101 AC_REQUIRE([AC_PROG_MAKE_SET])])
102
103 #
104 # Check to make sure that the build environment is sane.
105 #
106
107 AC_DEFUN([AM_SANITY_CHECK],
108 [AC_MSG_CHECKING([whether build environment is sane])
109 # Just in case
110 sleep 1
111 echo timestamp > conftestfile
112 # Do `set' in a subshell so we don't clobber the current shell's
113 # arguments.  Must try -L first in case configure is actually a
114 # symlink; some systems play weird games with the mod time of symlinks
115 # (eg FreeBSD returns the mod time of the symlink's containing
116 # directory).
117 if (
118    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
119    if test "[$]*" = "X"; then
120       # -L didn't work.
121       set X `ls -t $srcdir/configure conftestfile`
122    fi
123    if test "[$]*" != "X $srcdir/configure conftestfile" \
124       && test "[$]*" != "X conftestfile $srcdir/configure"; then
125
126       # If neither matched, then we have a broken ls.  This can happen
127       # if, for instance, CONFIG_SHELL is bash and it inherits a
128       # broken ls alias from the environment.  This has actually
129       # happened.  Such a system could not be considered "sane".
130       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
131 alias in your environment])
132    fi
133
134    test "[$]2" = conftestfile
135    )
136 then
137    # Ok.
138    :
139 else
140    AC_MSG_ERROR([newly created file is older than distributed files!
141 Check your system clock])
142 fi
143 rm -f conftest*
144 AC_MSG_RESULT(yes)])
145
146 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
147 dnl The program must properly implement --version.
148 AC_DEFUN([AM_MISSING_PROG],
149 [AC_MSG_CHECKING(for working $2)
150 # Run test in a subshell; some versions of sh will print an error if
151 # an executable is not found, even if stderr is redirected.
152 # Redirect stdin to placate older versions of autoconf.  Sigh.
153 if ($2 --version) < /dev/null > /dev/null 2>&1; then
154    $1=$2
155    AC_MSG_RESULT(found)
156 else
157    $1="$3/missing $2"
158    AC_MSG_RESULT(missing)
159 fi
160 AC_SUBST($1)])
161
162 # Add --enable-maintainer-mode option to configure.
163 # From Jim Meyering
164
165 # serial 1
166
167 AC_DEFUN([AM_MAINTAINER_MODE],
168 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
169   dnl maintainer-mode is disabled by default
170   AC_ARG_ENABLE(maintainer-mode,
171 [  --enable-maintainer-mode enable make rules and dependencies not useful
172                           (and sometimes confusing) to the casual installer],
173       USE_MAINTAINER_MODE=$enableval,
174       USE_MAINTAINER_MODE=no)
175   AC_MSG_RESULT($USE_MAINTAINER_MODE)
176   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
177   MAINT=$MAINTAINER_MODE_TRUE
178   AC_SUBST(MAINT)dnl
179 ]
180 )
181