source: rtems/tools/update/aclocal.m4 @ 473b4e5

4.104.114.84.95
Last change on this file since 473b4e5 was 473b4e5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/04/99 at 13:30:15

Regenerated.

  • Property mode set to 100644
File size: 6.6 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4a
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl $Id$
14
15dnl
16dnl RTEMS_TOP($1)
17dnl
18dnl $1 .. relative path from this configure.in to the toplevel configure.in
19dnl
20AC_DEFUN(RTEMS_TOP,
21[dnl
22AC_ARG_WITH(target-subdir,
23[  --with-target-subdir=DIR],
24TARGET_SUBDIR="$withval",
25TARGET_SUBDIR=".")
26
27RTEMS_TOPdir="$1";
28AC_SUBST(RTEMS_TOPdir)
29
30dnl Determine RTEMS Version string from the VERSION file
31dnl Hopefully, Joel never changes its format ;-
32AC_MSG_CHECKING([for RTEMS Version])
33if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
34changequote(,)dnl
35RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
36sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
37changequote([,])dnl
38else
39AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
40fi
41if test -z "$RTEMS_VERSION"; then
42AC_MSG_ERROR(Unable to determine version)
43fi
44AC_MSG_RESULT($RTEMS_VERSION)
45])dnl
46
47# Do all the work for Automake.  This macro actually does too much --
48# some checks are only needed if your package does certain things.
49# But this isn't really a big deal.
50
51# serial 1
52
53dnl Usage:
54dnl AM_INIT_AUTOMAKE(package,version, [no-define])
55
56AC_DEFUN(AM_INIT_AUTOMAKE,
57[AC_REQUIRE([AC_PROG_INSTALL])
58dnl We require 2.13 because we rely on SHELL being computed by configure.
59AC_PREREQ([2.13])
60PACKAGE=[$1]
61AC_SUBST(PACKAGE)
62VERSION=[$2]
63AC_SUBST(VERSION)
64dnl test to see if srcdir already configured
65if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
66  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
67fi
68ifelse([$3],,
69AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
70AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
71AC_REQUIRE([AM_SANITY_CHECK])
72AC_REQUIRE([AC_ARG_PROGRAM])
73dnl FIXME This is truly gross.
74missing_dir=`cd $ac_aux_dir && pwd`
75AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
76AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
77AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
78AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
79AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
80AC_REQUIRE([AC_PROG_MAKE_SET])])
81
82#
83# Check to make sure that the build environment is sane.
84#
85
86AC_DEFUN(AM_SANITY_CHECK,
87[AC_MSG_CHECKING([whether build environment is sane])
88# Just in case
89sleep 1
90echo timestamp > conftestfile
91# Do `set' in a subshell so we don't clobber the current shell's
92# arguments.  Must try -L first in case configure is actually a
93# symlink; some systems play weird games with the mod time of symlinks
94# (eg FreeBSD returns the mod time of the symlink's containing
95# directory).
96if (
97   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
98   if test "[$]*" = "X"; then
99      # -L didn't work.
100      set X `ls -t $srcdir/configure conftestfile`
101   fi
102   if test "[$]*" != "X $srcdir/configure conftestfile" \
103      && test "[$]*" != "X conftestfile $srcdir/configure"; then
104
105      # If neither matched, then we have a broken ls.  This can happen
106      # if, for instance, CONFIG_SHELL is bash and it inherits a
107      # broken ls alias from the environment.  This has actually
108      # happened.  Such a system could not be considered "sane".
109      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
110alias in your environment])
111   fi
112
113   test "[$]2" = conftestfile
114   )
115then
116   # Ok.
117   :
118else
119   AC_MSG_ERROR([newly created file is older than distributed files!
120Check your system clock])
121fi
122rm -f conftest*
123AC_MSG_RESULT(yes)])
124
125dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
126dnl The program must properly implement --version.
127AC_DEFUN(AM_MISSING_PROG,
128[AC_MSG_CHECKING(for working $2)
129# Run test in a subshell; some versions of sh will print an error if
130# an executable is not found, even if stderr is redirected.
131# Redirect stdin to placate older versions of autoconf.  Sigh.
132if ($2 --version) < /dev/null > /dev/null 2>&1; then
133   $1=$2
134   AC_MSG_RESULT(found)
135else
136   $1="$3/missing $2"
137   AC_MSG_RESULT(missing)
138fi
139AC_SUBST($1)])
140
141# Add --enable-maintainer-mode option to configure.
142# From Jim Meyering
143
144# serial 1
145
146AC_DEFUN(AM_MAINTAINER_MODE,
147[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
148  dnl maintainer-mode is disabled by default
149  AC_ARG_ENABLE(maintainer-mode,
150[  --enable-maintainer-mode enable make rules and dependencies not useful
151                          (and sometimes confusing) to the casual installer],
152      USE_MAINTAINER_MODE=$enableval,
153      USE_MAINTAINER_MODE=no)
154  AC_MSG_RESULT($USE_MAINTAINER_MODE)
155  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
156  MAINT=$MAINTAINER_MODE_TRUE
157  AC_SUBST(MAINT)dnl
158]
159)
160
161# Define a conditional.
162
163AC_DEFUN(AM_CONDITIONAL,
164[AC_SUBST($1_TRUE)
165AC_SUBST($1_FALSE)
166if $2; then
167  $1_TRUE=
168  $1_FALSE='#'
169else
170  $1_TRUE='#'
171  $1_FALSE=
172fi])
173
174dnl $Id$
175
176AC_DEFUN(RTEMS_PATH_KSH,
177[
178dnl NOTE: prefer bash over ksh over sh
179AC_PATH_PROGS(KSH,bash ksh sh)
180if test -z "$KSH"; then
181dnl NOTE: This cannot happen -- /bin/sh must always exist
182AC_MSG_ERROR(
183[***]
184[    Cannot determine a usable shell bash/ksh/sh]
185[    Please contact your system administrator] );
186fi
187])
188
189dnl $Id$
190
191AC_DEFUN(RTEMS_PATH_PERL,
192[
193AC_PATH_PROG(PERL,perl)
194if test -z "$PERL" ; then
195AC_MSG_WARN(
196[***]
197[   perl was not found]
198[   Note: Some tools will not be built.])
199fi
200])
201
202AC_DEFUN(RTEMS_TOOLPATHS,
203[
204# tooldir='$(exec_prefix)/'$target_alias
205# Temporary work-around until building in source tree is supported
206AC_REQUIRE([RTEMS_PROJECT_ROOT])
207
208tooldir='$(PROJECT_ROOT)'
209AC_SUBST(tooldir)
210
211project_includedir='$(tooldir)'/include
212AC_SUBST(project_includedir)
213
214project_libdir='$(tooldir)/lib$(MULTISUBDIR)'
215AC_SUBST(project_libdir)
216
217project_bindir='$(tooldir)/bin'
218AC_SUBST(project_bindir)
219
220rtems_bspdir='$(prefix)/${RTEMS_BSP}'
221AC_SUBST(rtems_bspdir)
222rtems_makedir='$(prefix)/make'
223AC_SUBST(rtems_makedir)
224])
225
226dnl
227dnl $Id$
228dnl
229
230AC_DEFUN(RTEMS_PROJECT_ROOT,
231[dnl
232AC_REQUIRE([RTEMS_TOP])
233if test "$TARGET_SUBDIR" = "." ; then
234PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
235else
236PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
237fi
238AC_SUBST(PROJECT_ROOT)
239
240RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
241AC_SUBST(RTEMS_ROOT)
242
243INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
244AC_SUBST(INSTALL_CHANGE)
245
246PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
247AC_SUBST(PACKHEX)
248])
249
250
Note: See TracBrowser for help on using the repository browser.