source: rtems/c/src/aclocal.m4 @ b62a92c

4.104.114.84.95
Last change on this file since b62a92c 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: 9.7 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
47dnl $Id$
48
49AC_DEFUN(RTEMS_ENABLE_CXX,
50[
51AC_ARG_ENABLE(cxx,
52[  --enable-cxx                         enable C++ support,]
53[                                       and build the rtems++ library],
54[case "${enableval}" in
55  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
56  no) RTEMS_HAS_CPLUSPLUS=no   ;;
57  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
58esac], [RTEMS_HAS_CPLUSPLUS=no])
59])
60
61dnl
62dnl $Id$
63dnl
64
65dnl canonicalize target cpu
66dnl NOTE: Most rtems targets do not fullfil autoconf's
67dnl target naming conventions "processor-vendor-os"
68dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
69dnl and we have to fix it for rtems ourselves
70
71AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
72[
73AC_CANONICAL_SYSTEM
74AC_MSG_CHECKING(rtems target cpu)
75changequote(,)dnl
76case "${target}" in
77  # hpux unix port should go here
78  i[3456]86-go32-rtems*)
79        RTEMS_CPU=i386
80        ;;
81  i[3456]86-pc-linux*)          # unix "simulator" port
82        RTEMS_CPU=unix
83        ;;
84  i[3456]86-*freebsd2*)         # unix "simulator" port
85        RTEMS_CPU=unix
86        ;;
87  no_cpu-*rtems*)
88        RTEMS_CPU=no_cpu
89        ;;
90  sparc-sun-solaris*)           # unix "simulator" port
91        RTEMS_CPU=unix
92        ;;
93  *)
94        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
95        ;;
96esac
97changequote([,])dnl
98AC_SUBST(RTEMS_CPU)
99AC_MSG_RESULT($RTEMS_CPU)
100])
101
102# Do all the work for Automake.  This macro actually does too much --
103# some checks are only needed if your package does certain things.
104# But this isn't really a big deal.
105
106# serial 1
107
108dnl Usage:
109dnl AM_INIT_AUTOMAKE(package,version, [no-define])
110
111AC_DEFUN(AM_INIT_AUTOMAKE,
112[AC_REQUIRE([AC_PROG_INSTALL])
113dnl We require 2.13 because we rely on SHELL being computed by configure.
114AC_PREREQ([2.13])
115PACKAGE=[$1]
116AC_SUBST(PACKAGE)
117VERSION=[$2]
118AC_SUBST(VERSION)
119dnl test to see if srcdir already configured
120if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
121  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
122fi
123ifelse([$3],,
124AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
125AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
126AC_REQUIRE([AM_SANITY_CHECK])
127AC_REQUIRE([AC_ARG_PROGRAM])
128dnl FIXME This is truly gross.
129missing_dir=`cd $ac_aux_dir && pwd`
130AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
131AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
132AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
133AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
134AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
135AC_REQUIRE([AC_PROG_MAKE_SET])])
136
137#
138# Check to make sure that the build environment is sane.
139#
140
141AC_DEFUN(AM_SANITY_CHECK,
142[AC_MSG_CHECKING([whether build environment is sane])
143# Just in case
144sleep 1
145echo timestamp > conftestfile
146# Do `set' in a subshell so we don't clobber the current shell's
147# arguments.  Must try -L first in case configure is actually a
148# symlink; some systems play weird games with the mod time of symlinks
149# (eg FreeBSD returns the mod time of the symlink's containing
150# directory).
151if (
152   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
153   if test "[$]*" = "X"; then
154      # -L didn't work.
155      set X `ls -t $srcdir/configure conftestfile`
156   fi
157   if test "[$]*" != "X $srcdir/configure conftestfile" \
158      && test "[$]*" != "X conftestfile $srcdir/configure"; then
159
160      # If neither matched, then we have a broken ls.  This can happen
161      # if, for instance, CONFIG_SHELL is bash and it inherits a
162      # broken ls alias from the environment.  This has actually
163      # happened.  Such a system could not be considered "sane".
164      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
165alias in your environment])
166   fi
167
168   test "[$]2" = conftestfile
169   )
170then
171   # Ok.
172   :
173else
174   AC_MSG_ERROR([newly created file is older than distributed files!
175Check your system clock])
176fi
177rm -f conftest*
178AC_MSG_RESULT(yes)])
179
180dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
181dnl The program must properly implement --version.
182AC_DEFUN(AM_MISSING_PROG,
183[AC_MSG_CHECKING(for working $2)
184# Run test in a subshell; some versions of sh will print an error if
185# an executable is not found, even if stderr is redirected.
186# Redirect stdin to placate older versions of autoconf.  Sigh.
187if ($2 --version) < /dev/null > /dev/null 2>&1; then
188   $1=$2
189   AC_MSG_RESULT(found)
190else
191   $1="$3/missing $2"
192   AC_MSG_RESULT(missing)
193fi
194AC_SUBST($1)])
195
196# Add --enable-maintainer-mode option to configure.
197# From Jim Meyering
198
199# serial 1
200
201AC_DEFUN(AM_MAINTAINER_MODE,
202[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
203  dnl maintainer-mode is disabled by default
204  AC_ARG_ENABLE(maintainer-mode,
205[  --enable-maintainer-mode enable make rules and dependencies not useful
206                          (and sometimes confusing) to the casual installer],
207      USE_MAINTAINER_MODE=$enableval,
208      USE_MAINTAINER_MODE=no)
209  AC_MSG_RESULT($USE_MAINTAINER_MODE)
210  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
211  MAINT=$MAINTAINER_MODE_TRUE
212  AC_SUBST(MAINT)dnl
213]
214)
215
216# Define a conditional.
217
218AC_DEFUN(AM_CONDITIONAL,
219[AC_SUBST($1_TRUE)
220AC_SUBST($1_FALSE)
221if $2; then
222  $1_TRUE=
223  $1_FALSE='#'
224else
225  $1_TRUE='#'
226  $1_FALSE=
227fi])
228
229dnl $Id$
230
231dnl Override the set of BSPs to be built.
232dnl used by the toplevel configure script
233dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
234AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
235[
236AC_ARG_ENABLE(rtemsbsp,
237[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
238[case "${enableval}" in
239  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
240  *) $1=$enableval;;
241esac],[$1=""])
242])
243
244dnl Pass a single BSP via an environment variable
245dnl used by per BSP configure scripts
246AC_DEFUN(RTEMS_ENV_RTEMSBSP,
247[dnl
248AC_MSG_CHECKING([for RTEMS_BSP])
249AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
250[dnl
251  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
252])dnl
253if test -z "$rtems_cv_RTEMS_BSP"; then
254  AC_MSG_ERROR([Missing RTEMS_BSP])
255fi
256RTEMS_BSP="$rtems_cv_RTEMS_BSP"
257AC_MSG_RESULT(${RTEMS_BSP})
258AC_SUBST(RTEMS_BSP)
259])
260
261dnl $Id$
262
263dnl check if RTEMS support a cpu
264AC_DEFUN(RTEMS_CHECK_CPU,
265[dnl
266AC_REQUIRE([RTEMS_TOP])
267AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
268# Is this a supported CPU?
269AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
270if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
271  AC_MSG_RESULT(yes)
272else
273  AC_MSG_ERROR(no)
274fi
275])dnl
276
277
278dnl $Id$
279
280AC_DEFUN(RTEMS_CANONICAL_HOST,
281[dnl
282AC_REQUIRE([AC_CANONICAL_HOST])
283RTEMS_HOST=$host_os
284changequote(,)dnl
285case "${target}" in
286  # hpux unix port should go here
287  i[3456]86-pc-linux*)         # unix "simulator" port
288        RTEMS_HOST=Linux
289        ;;
290  i[3456]86-*freebsd2*) # unix "simulator" port
291        RTEMS_HOST=FreeBSD
292        ;;
293  sparc-sun-solaris*)             # unix "simulator" port
294        RTEMS_HOST=Solaris
295        ;;
296  *)
297        ;;
298esac
299changequote([,])dnl
300AC_SUBST(RTEMS_HOST)
301])dnl
302
303dnl
304dnl $Id$
305dnl
306
307AC_DEFUN(RTEMS_PROJECT_ROOT,
308[dnl
309AC_REQUIRE([RTEMS_TOP])
310if test "$TARGET_SUBDIR" = "." ; then
311PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
312else
313PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
314fi
315AC_SUBST(PROJECT_ROOT)
316
317RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
318AC_SUBST(RTEMS_ROOT)
319
320INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
321AC_SUBST(INSTALL_CHANGE)
322
323PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
324AC_SUBST(PACKHEX)
325])
326
327
328dnl $Id$
329
330dnl Report all available bsps for a target,
331dnl check if a bsp-subdirectory is present for all bsps found
332dnl
333dnl RTEMS_CHECK_BSPS(bsp_list)
334AC_DEFUN(RTEMS_CHECK_BSPS,
335[
336AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target
337AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
338AC_MSG_CHECKING([for bsps])
339case "${target}" in
340changequote(,)dnl
341  i[3456]86-go32-rtems*)
342changequote([,])dnl
343    $1="go32 go32_p5"
344    ;;
345  *)
346    files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU`
347    for file in $files; do
348      case $file in
349        shared*);;
350        Makefile*);;
351        READ*);;
352        CVS*);;
353        pxfl*);;
354        go32*);;       # so the i386 port can pick up the other Makefiles
355        # Now account for BSPs with build variants
356        gen68360)      rtems_bsp="$rtems_bsp gen68360 gen68360_040";;
357        p4000)         rtems_bsp="$rtems_bsp p4600 p4650";;
358        mvme162)       rtems_bsp="$rtems_bsp mvme162 mvme162lx";;
359        *) $1="[$]$1 $file";;
360      esac;
361    done
362    ;;
363esac
364AC_MSG_RESULT([[$]$1 .. done])
365])dnl
366
367AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
368[dnl
369AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
370if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
371  AC_MSG_RESULT([yes])
372else
373  AC_MSG_ERROR([no])
374fi
375])dnl
376
Note: See TracBrowser for help on using the repository browser.