OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [m68k/] [aclocal.m4] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
# aclocal.m4 generated automatically by aclocal 1.6.2 -*- Autoconf -*-
2
 
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
 
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
 
14
# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
15
AC_DEFUN([RTEMS_CHECK_BSPDIR],
16
[
17
  RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
18
  case "$bspdir" in
19
  dmv152 )
20
    AC_CONFIG_SUBDIRS([dmv152]);;
21
  efi332 )
22
    AC_CONFIG_SUBDIRS([efi332]);;
23
  efi68k )
24
    AC_CONFIG_SUBDIRS([efi68k]);;
25
  gen68302 )
26
    AC_CONFIG_SUBDIRS([gen68302]);;
27
  gen68340 )
28
    AC_CONFIG_SUBDIRS([gen68340]);;
29
  gen68360 )
30
    AC_CONFIG_SUBDIRS([gen68360]);;
31
  idp )
32
    AC_CONFIG_SUBDIRS([idp]);;
33
  mcf5206elite )
34
    AC_CONFIG_SUBDIRS([mcf5206elite]);;
35
  mrm332 )
36
    AC_CONFIG_SUBDIRS([mrm332]);;
37
  mvme136 )
38
    AC_CONFIG_SUBDIRS([mvme136]);;
39
  mvme147 )
40
    AC_CONFIG_SUBDIRS([mvme147]);;
41
  mvme147s )
42
    AC_CONFIG_SUBDIRS([mvme147s]);;
43
  mvme162 )
44
    AC_CONFIG_SUBDIRS([mvme162]);;
45
  mvme167 )
46
    AC_CONFIG_SUBDIRS([mvme167]);;
47
  ods68302 )
48
    AC_CONFIG_SUBDIRS([ods68302]);;
49
  sim68000 )
50
    AC_CONFIG_SUBDIRS([sim68000]);;
51
  *)
52
    AC_MSG_ERROR([Invalid BSP]);;
53
  esac
54
])
55
 
56
dnl
57
dnl  bsp-alias.m4,v 1.15 2001/11/21 18:36:51 joel Exp
58
dnl
59
 
60
dnl _RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY)
61
dnl Internal subroutine to RTEMS_BSP_ALIAS
62
AC_DEFUN(_RTEMS_BSP_ALIAS,
63
[# account for "aliased" bsps which share source code
64
  case $1 in
65
    simcpu32)     $2=sim68000         ;; # BSVC CPU32 variant
66
    c3xsim)       $2=c4xsim           ;; # TI C3x Simulator in gdb
67
    mcp750)       $2=motorola_powerpc ;; # Motorola PPC board variant
68
    mvme2307)     $2=motorola_powerpc ;; # Motorola PPC board variant
69
    mvme162lx)    $2=mvme162          ;; # m68k - mvme162 board variant
70
    gen68360_040) $2=gen68360         ;; # m68k - 68360 in companion mode
71
    p4600)        $2=p4000            ;; # mips64orion - p4000 board w/IDT 4600
72
    p4650)        $2=p4000            ;; # mips64orion - p4000 board w/IDT 4650
73
    mbx8*)        $2=mbx8xx           ;; # MBX821/MBX860 board
74
    pc386dx)      $2=pc386            ;; # i386 - PC w/o FPU
75
    pc486)        $2=pc386            ;; # i386 - PC with i486DX
76
    pc586)        $2=pc386            ;; # i386 - PC with Pentium
77
    pc686)        $2=pc386            ;; # i386 - PC with PentiumPro
78
    pck6)         $2=pc386            ;; # i386 - PC with K6
79
    bare*)        $2=bare             ;; # EXP: bare-aliases
80
    erc32nfp)     $2=erc32            ;; # erc32 without fpu
81
    leon1)        $2=leon             ;; # leon without fpu
82
    leon2)        $2=leon             ;; # leon with fpu
83
    simsh7032)    $2=shsim            ;; # SH7032 simulator
84
    simsh7045)    $2=shsim            ;; # SH7045 simulator
85
    *)            $2=$1;;
86
  esac]
87
)
88
 
89
dnl RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY)
90
dnl convert a bsp alias $1 into its bsp directory RTEMS_BSP_FAMILY
91
AC_DEFUN(RTEMS_BSP_ALIAS,
92
[_RTEMS_BSP_ALIAS(m4_if([$1],,[$RTEMS_BSP],[$1]),
93
  m4_if([$2],,[RTEMS_BSP_FAMILY],[$2]))]
94
)
95
 
96
dnl rtems-top.m4,v 1.14 2002/03/28 13:53:19 joel Exp
97
 
98
dnl
99
dnl RTEMS_TOP($1)
100
dnl
101
dnl $1 .. relative path from this configure.in to the toplevel configure.in
102
dnl
103
AC_DEFUN(RTEMS_TOP,
104
[dnl
105
AC_REQUIRE([RTEMS_VERSIONING])
106
AC_CHECK_PROGS(MAKE, gmake make)
107
AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
108
AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
109
 
110
AC_PREFIX_DEFAULT([/opt/rtems])
111
 
112
ENDIF=endif
113
AC_SUBST(ENDIF)
114
 
115
RTEMS_TOPdir="$1";
116
AC_SUBST(RTEMS_TOPdir)
117
 
118
test -n "$with_target_subdir" || with_target_subdir="."
119
 
120
if test "$with_target_subdir" = "." ; then
121
# Native
122
PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
123
else
124
# Cross
125
dots=`echo $with_target_subdir|\
126
sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
127
PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
128
fi
129
AC_SUBST(PROJECT_TOPdir)
130
 
131
if test "$with_target_subdir" = "." ; then
132
# Native
133
PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
134
else
135
# Cross
136
PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
137
fi
138
AC_SUBST(PROJECT_ROOT)
139
 
140
AC_MSG_CHECKING([for RTEMS Version])
141
AS_IF([test -r "${srcdir}/${RTEMS_TOPdir}/aclocal/version.m4"],
142
[],
143
[AC_MSG_ERROR([Unable to find ${RTEMS_TOPdir}/aclocal/version.m4])])
144
AC_MSG_RESULT([_RTEMS_VERSION])
145
])dnl
146
 
147
AC_DEFUN([RTEMS_VERSIONING],
148
m4_define([_RTEMS_VERSION],[ss-20020807]))
149
 
150
# Do all the work for Automake.                            -*- Autoconf -*-
151
 
152
# This macro actually does too much some checks are only needed if
153
# your package does certain things.  But this isn't really a big deal.
154
 
155
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
156
# Free Software Foundation, Inc.
157
 
158
# This program is free software; you can redistribute it and/or modify
159
# it under the terms of the GNU General Public License as published by
160
# the Free Software Foundation; either version 2, or (at your option)
161
# any later version.
162
 
163
# This program is distributed in the hope that it will be useful,
164
# but WITHOUT ANY WARRANTY; without even the implied warranty of
165
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
166
# GNU General Public License for more details.
167
 
168
# You should have received a copy of the GNU General Public License
169
# along with this program; if not, write to the Free Software
170
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
171
# 02111-1307, USA.
172
 
173
# serial 8
174
 
175
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
176
# written in clear, in which case automake, when reading aclocal.m4,
177
# will think it sees a *use*, and therefore will trigger all it's
178
# C support machinery.  Also note that it means that autoscan, seeing
179
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
180
 
181
 
182
AC_PREREQ([2.52])
183
 
184
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
185
# the ones we care about.
186
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
187
 
188
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
189
# AM_INIT_AUTOMAKE([OPTIONS])
190
# -----------------------------------------------
191
# The call with PACKAGE and VERSION arguments is the old style
192
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
193
# and VERSION should now be passed to AC_INIT and removed from
194
# the call to AM_INIT_AUTOMAKE.
195
# We support both call styles for the transition.  After
196
# the next Automake release, Autoconf can make the AC_INIT
197
# arguments mandatory, and then we can depend on a new Autoconf
198
# release and drop the old call support.
199
AC_DEFUN([AM_INIT_AUTOMAKE],
200
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
201
 AC_REQUIRE([AC_PROG_INSTALL])dnl
202
# test to see if srcdir already configured
203
if test "`cd $srcdir && pwd`" != "`pwd`" &&
204
   test -f $srcdir/config.status; then
205
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
206
fi
207
 
208
# Define the identity of the package.
209
dnl Distinguish between old-style and new-style calls.
210
m4_ifval([$2],
211
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
212
 AC_SUBST([PACKAGE], [$1])dnl
213
 AC_SUBST([VERSION], [$2])],
214
[_AM_SET_OPTIONS([$1])dnl
215
 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
216
 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
217
 
218
_AM_IF_OPTION([no-define],,
219
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
220
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
221
 
222
# Some tools Automake needs.
223
AC_REQUIRE([AM_SANITY_CHECK])dnl
224
AC_REQUIRE([AC_ARG_PROGRAM])dnl
225
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
226
AM_MISSING_PROG(AUTOCONF, autoconf)
227
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
228
AM_MISSING_PROG(AUTOHEADER, autoheader)
229
AM_MISSING_PROG(MAKEINFO, makeinfo)
230
AM_MISSING_PROG(AMTAR, tar)
231
AM_PROG_INSTALL_SH
232
AM_PROG_INSTALL_STRIP
233
# We need awk for the "check" target.  The system "awk" is bad on
234
# some platforms.
235
AC_REQUIRE([AC_PROG_AWK])dnl
236
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
237
 
238
_AM_IF_OPTION([no-dependencies],,
239
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
240
                  [_AM_DEPENDENCIES(CC)],
241
                  [define([AC_PROG_][CC],
242
                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
243
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
244
                  [_AM_DEPENDENCIES(CXX)],
245
                  [define([AC_PROG_][CXX],
246
                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
247
])
248
])
249
 
250
# Copyright 2002  Free Software Foundation, Inc.
251
 
252
# This program is free software; you can redistribute it and/or modify
253
# it under the terms of the GNU General Public License as published by
254
# the Free Software Foundation; either version 2, or (at your option)
255
# any later version.
256
 
257
# This program is distributed in the hope that it will be useful,
258
# but WITHOUT ANY WARRANTY; without even the implied warranty of
259
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
260
# GNU General Public License for more details.
261
 
262
# You should have received a copy of the GNU General Public License
263
# along with this program; if not, write to the Free Software
264
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
265
 
266
# AM_AUTOMAKE_VERSION(VERSION)
267
# ----------------------------
268
# Automake X.Y traces this macro to ensure aclocal.m4 has been
269
# generated from the m4 files accompanying Automake X.Y.
270
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
271
 
272
# AM_SET_CURRENT_AUTOMAKE_VERSION
273
# -------------------------------
274
# Call AM_AUTOMAKE_VERSION so it can be traced.
275
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
276
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
277
         [AM_AUTOMAKE_VERSION([1.6.2])])
278
 
279
# Helper functions for option handling.                    -*- Autoconf -*-
280
 
281
# Copyright 2001, 2002  Free Software Foundation, Inc.
282
 
283
# This program is free software; you can redistribute it and/or modify
284
# it under the terms of the GNU General Public License as published by
285
# the Free Software Foundation; either version 2, or (at your option)
286
# any later version.
287
 
288
# This program is distributed in the hope that it will be useful,
289
# but WITHOUT ANY WARRANTY; without even the implied warranty of
290
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
291
# GNU General Public License for more details.
292
 
293
# You should have received a copy of the GNU General Public License
294
# along with this program; if not, write to the Free Software
295
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
296
# 02111-1307, USA.
297
 
298
# serial 2
299
 
300
# _AM_MANGLE_OPTION(NAME)
301
# -----------------------
302
AC_DEFUN([_AM_MANGLE_OPTION],
303
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
304
 
305
# _AM_SET_OPTION(NAME)
306
# ------------------------------
307
# Set option NAME.  Presently that only means defining a flag for this option.
308
AC_DEFUN([_AM_SET_OPTION],
309
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
310
 
311
# _AM_SET_OPTIONS(OPTIONS)
312
# ----------------------------------
313
# OPTIONS is a space-separated list of Automake options.
314
AC_DEFUN([_AM_SET_OPTIONS],
315
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
316
 
317
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
318
# -------------------------------------------
319
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
320
AC_DEFUN([_AM_IF_OPTION],
321
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
322
 
323
#
324
# Check to make sure that the build environment is sane.
325
#
326
 
327
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
328
 
329
# This program is free software; you can redistribute it and/or modify
330
# it under the terms of the GNU General Public License as published by
331
# the Free Software Foundation; either version 2, or (at your option)
332
# any later version.
333
 
334
# This program is distributed in the hope that it will be useful,
335
# but WITHOUT ANY WARRANTY; without even the implied warranty of
336
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
337
# GNU General Public License for more details.
338
 
339
# You should have received a copy of the GNU General Public License
340
# along with this program; if not, write to the Free Software
341
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
342
# 02111-1307, USA.
343
 
344
# serial 3
345
 
346
# AM_SANITY_CHECK
347
# ---------------
348
AC_DEFUN([AM_SANITY_CHECK],
349
[AC_MSG_CHECKING([whether build environment is sane])
350
# Just in case
351
sleep 1
352
echo timestamp > conftest.file
353
# Do `set' in a subshell so we don't clobber the current shell's
354
# arguments.  Must try -L first in case configure is actually a
355
# symlink; some systems play weird games with the mod time of symlinks
356
# (eg FreeBSD returns the mod time of the symlink's containing
357
# directory).
358
if (
359
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
360
   if test "$[*]" = "X"; then
361
      # -L didn't work.
362
      set X `ls -t $srcdir/configure conftest.file`
363
   fi
364
   rm -f conftest.file
365
   if test "$[*]" != "X $srcdir/configure conftest.file" \
366
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
367
 
368
      # If neither matched, then we have a broken ls.  This can happen
369
      # if, for instance, CONFIG_SHELL is bash and it inherits a
370
      # broken ls alias from the environment.  This has actually
371
      # happened.  Such a system could not be considered "sane".
372
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
373
alias in your environment])
374
   fi
375
 
376
   test "$[2]" = conftest.file
377
   )
378
then
379
   # Ok.
380
   :
381
else
382
   AC_MSG_ERROR([newly created file is older than distributed files!
383
Check your system clock])
384
fi
385
AC_MSG_RESULT(yes)])
386
 
387
#  -*- Autoconf -*-
388
 
389
 
390
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
391
 
392
# This program is free software; you can redistribute it and/or modify
393
# it under the terms of the GNU General Public License as published by
394
# the Free Software Foundation; either version 2, or (at your option)
395
# any later version.
396
 
397
# This program is distributed in the hope that it will be useful,
398
# but WITHOUT ANY WARRANTY; without even the implied warranty of
399
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
400
# GNU General Public License for more details.
401
 
402
# You should have received a copy of the GNU General Public License
403
# along with this program; if not, write to the Free Software
404
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
405
# 02111-1307, USA.
406
 
407
# serial 3
408
 
409
# AM_MISSING_PROG(NAME, PROGRAM)
410
# ------------------------------
411
AC_DEFUN([AM_MISSING_PROG],
412
[AC_REQUIRE([AM_MISSING_HAS_RUN])
413
$1=${$1-"${am_missing_run}$2"}
414
AC_SUBST($1)])
415
 
416
 
417
# AM_MISSING_HAS_RUN
418
# ------------------
419
# Define MISSING if not defined so far and test if it supports --run.
420
# If it does, set am_missing_run to use it, otherwise, to nothing.
421
AC_DEFUN([AM_MISSING_HAS_RUN],
422
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
423
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
424
# Use eval to expand $SHELL
425
if eval "$MISSING --run true"; then
426
  am_missing_run="$MISSING --run "
427
else
428
  am_missing_run=
429
  AC_MSG_WARN([`missing' script is too old or missing])
430
fi
431
])
432
 
433
# AM_AUX_DIR_EXPAND
434
 
435
# Copyright 2001 Free Software Foundation, Inc.
436
 
437
# This program is free software; you can redistribute it and/or modify
438
# it under the terms of the GNU General Public License as published by
439
# the Free Software Foundation; either version 2, or (at your option)
440
# any later version.
441
 
442
# This program is distributed in the hope that it will be useful,
443
# but WITHOUT ANY WARRANTY; without even the implied warranty of
444
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
445
# GNU General Public License for more details.
446
 
447
# You should have received a copy of the GNU General Public License
448
# along with this program; if not, write to the Free Software
449
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
450
# 02111-1307, USA.
451
 
452
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
453
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
454
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
455
#
456
# Of course, Automake must honor this variable whenever it calls a
457
# tool from the auxiliary directory.  The problem is that $srcdir (and
458
# therefore $ac_aux_dir as well) can be either absolute or relative,
459
# depending on how configure is run.  This is pretty annoying, since
460
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
461
# source directory, any form will work fine, but in subdirectories a
462
# relative path needs to be adjusted first.
463
#
464
# $ac_aux_dir/missing
465
#    fails when called from a subdirectory if $ac_aux_dir is relative
466
# $top_srcdir/$ac_aux_dir/missing
467
#    fails if $ac_aux_dir is absolute,
468
#    fails when called from a subdirectory in a VPATH build with
469
#          a relative $ac_aux_dir
470
#
471
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
472
# are both prefixed by $srcdir.  In an in-source build this is usually
473
# harmless because $srcdir is `.', but things will broke when you
474
# start a VPATH build or use an absolute $srcdir.
475
#
476
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
477
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
478
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
479
# and then we would define $MISSING as
480
#   MISSING="\${SHELL} $am_aux_dir/missing"
481
# This will work as long as MISSING is not called from configure, because
482
# unfortunately $(top_srcdir) has no meaning in configure.
483
# However there are other variables, like CC, which are often used in
484
# configure, and could therefore not use this "fixed" $ac_aux_dir.
485
#
486
# Another solution, used here, is to always expand $ac_aux_dir to an
487
# absolute PATH.  The drawback is that using absolute paths prevent a
488
# configured tree to be moved without reconfiguration.
489
 
490
# Rely on autoconf to set up CDPATH properly.
491
AC_PREREQ([2.50])
492
 
493
AC_DEFUN([AM_AUX_DIR_EXPAND], [
494
# expand $ac_aux_dir to an absolute path
495
am_aux_dir=`cd $ac_aux_dir && pwd`
496
])
497
 
498
# AM_PROG_INSTALL_SH
499
# ------------------
500
# Define $install_sh.
501
 
502
# Copyright 2001 Free Software Foundation, Inc.
503
 
504
# This program is free software; you can redistribute it and/or modify
505
# it under the terms of the GNU General Public License as published by
506
# the Free Software Foundation; either version 2, or (at your option)
507
# any later version.
508
 
509
# This program is distributed in the hope that it will be useful,
510
# but WITHOUT ANY WARRANTY; without even the implied warranty of
511
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
512
# GNU General Public License for more details.
513
 
514
# You should have received a copy of the GNU General Public License
515
# along with this program; if not, write to the Free Software
516
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
517
# 02111-1307, USA.
518
 
519
AC_DEFUN([AM_PROG_INSTALL_SH],
520
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
521
install_sh=${install_sh-"$am_aux_dir/install-sh"}
522
AC_SUBST(install_sh)])
523
 
524
# AM_PROG_INSTALL_STRIP
525
 
526
# Copyright 2001 Free Software Foundation, Inc.
527
 
528
# This program is free software; you can redistribute it and/or modify
529
# it under the terms of the GNU General Public License as published by
530
# the Free Software Foundation; either version 2, or (at your option)
531
# any later version.
532
 
533
# This program is distributed in the hope that it will be useful,
534
# but WITHOUT ANY WARRANTY; without even the implied warranty of
535
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
536
# GNU General Public License for more details.
537
 
538
# You should have received a copy of the GNU General Public License
539
# along with this program; if not, write to the Free Software
540
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
541
# 02111-1307, USA.
542
 
543
# One issue with vendor `install' (even GNU) is that you can't
544
# specify the program used to strip binaries.  This is especially
545
# annoying in cross-compiling environments, where the build's strip
546
# is unlikely to handle the host's binaries.
547
# Fortunately install-sh will honor a STRIPPROG variable, so we
548
# always use install-sh in `make install-strip', and initialize
549
# STRIPPROG with the value of the STRIP variable (set by the user).
550
AC_DEFUN([AM_PROG_INSTALL_STRIP],
551
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
552
# Installed binaries are usually stripped using `strip' when the user
553
# run `make install-strip'.  However `strip' might not be the right
554
# tool to use in cross-compilation environments, therefore Automake
555
# will honor the `STRIP' environment variable to overrule this program.
556
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
557
if test "$cross_compiling" != no; then
558
  AC_CHECK_TOOL([STRIP], [strip], :)
559
fi
560
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
561
AC_SUBST([INSTALL_STRIP_PROGRAM])])
562
 
563
# serial 4                                              -*- Autoconf -*-
564
 
565
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
566
 
567
# This program is free software; you can redistribute it and/or modify
568
# it under the terms of the GNU General Public License as published by
569
# the Free Software Foundation; either version 2, or (at your option)
570
# any later version.
571
 
572
# This program is distributed in the hope that it will be useful,
573
# but WITHOUT ANY WARRANTY; without even the implied warranty of
574
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
575
# GNU General Public License for more details.
576
 
577
# You should have received a copy of the GNU General Public License
578
# along with this program; if not, write to the Free Software
579
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
580
# 02111-1307, USA.
581
 
582
 
583
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
584
# written in clear, in which case automake, when reading aclocal.m4,
585
# will think it sees a *use*, and therefore will trigger all it's
586
# C support machinery.  Also note that it means that autoscan, seeing
587
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
588
 
589
 
590
 
591
# _AM_DEPENDENCIES(NAME)
592
# ----------------------
593
# See how the compiler implements dependency checking.
594
# NAME is "CC", "CXX", "GCJ", or "OBJC".
595
# We try a few techniques and use that to set a single cache variable.
596
#
597
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
598
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
599
# dependency, and given that the user is not expected to run this macro,
600
# just rely on AC_PROG_CC.
601
AC_DEFUN([_AM_DEPENDENCIES],
602
[AC_REQUIRE([AM_SET_DEPDIR])dnl
603
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
604
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
605
AC_REQUIRE([AM_DEP_TRACK])dnl
606
 
607
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
608
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
609
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
610
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
611
                   [depcc="$$1"   am_compiler_list=])
612
 
613
AC_CACHE_CHECK([dependency style of $depcc],
614
               [am_cv_$1_dependencies_compiler_type],
615
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
616
  # We make a subdir and do the tests there.  Otherwise we can end up
617
  # making bogus files that we don't know about and never remove.  For
618
  # instance it was reported that on HP-UX the gcc test will end up
619
  # making a dummy file named `D' -- because `-MD' means `put the output
620
  # in D'.
621
  mkdir conftest.dir
622
  # Copy depcomp to subdir because otherwise we won't find it if we're
623
  # using a relative directory.
624
  cp "$am_depcomp" conftest.dir
625
  cd conftest.dir
626
 
627
  am_cv_$1_dependencies_compiler_type=none
628
  if test "$am_compiler_list" = ""; then
629
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
630
  fi
631
  for depmode in $am_compiler_list; do
632
    # We need to recreate these files for each test, as the compiler may
633
    # overwrite some of them when testing with obscure command lines.
634
    # This happens at least with the AIX C compiler.
635
    echo '#include "conftest.h"' > conftest.c
636
    echo 'int i;' > conftest.h
637
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
638
 
639
    case $depmode in
640
    nosideeffect)
641
      # after this tag, mechanisms are not by side-effect, so they'll
642
      # only be used when explicitly requested
643
      if test "x$enable_dependency_tracking" = xyes; then
644
        continue
645
      else
646
        break
647
      fi
648
      ;;
649
    none) break ;;
650
    esac
651
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
652
    # mode.  It turns out that the SunPro C++ compiler does not properly
653
    # handle `-M -o', and we need to detect this.
654
    if depmode=$depmode \
655
       source=conftest.c object=conftest.o \
656
       depfile=conftest.Po tmpdepfile=conftest.TPo \
657
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
658
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
659
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
660
      am_cv_$1_dependencies_compiler_type=$depmode
661
      break
662
    fi
663
  done
664
 
665
  cd ..
666
  rm -rf conftest.dir
667
else
668
  am_cv_$1_dependencies_compiler_type=none
669
fi
670
])
671
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
672
])
673
 
674
 
675
# AM_SET_DEPDIR
676
# -------------
677
# Choose a directory name for dependency files.
678
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
679
AC_DEFUN([AM_SET_DEPDIR],
680
[rm -f .deps 2>/dev/null
681
mkdir .deps 2>/dev/null
682
if test -d .deps; then
683
  DEPDIR=.deps
684
else
685
  # MS-DOS does not allow filenames that begin with a dot.
686
  DEPDIR=_deps
687
fi
688
rmdir .deps 2>/dev/null
689
AC_SUBST([DEPDIR])
690
])
691
 
692
 
693
# AM_DEP_TRACK
694
# ------------
695
AC_DEFUN([AM_DEP_TRACK],
696
[AC_ARG_ENABLE(dependency-tracking,
697
[  --disable-dependency-tracking Speeds up one-time builds
698
  --enable-dependency-tracking  Do not reject slow dependency extractors])
699
if test "x$enable_dependency_tracking" != xno; then
700
  am_depcomp="$ac_aux_dir/depcomp"
701
  AMDEPBACKSLASH='\'
702
fi
703
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
704
AC_SUBST([AMDEPBACKSLASH])
705
])
706
 
707
# Generate code to set up dependency tracking.   -*- Autoconf -*-
708
 
709
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
710
 
711
# This program is free software; you can redistribute it and/or modify
712
# it under the terms of the GNU General Public License as published by
713
# the Free Software Foundation; either version 2, or (at your option)
714
# any later version.
715
 
716
# This program is distributed in the hope that it will be useful,
717
# but WITHOUT ANY WARRANTY; without even the implied warranty of
718
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
719
# GNU General Public License for more details.
720
 
721
# You should have received a copy of the GNU General Public License
722
# along with this program; if not, write to the Free Software
723
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
724
# 02111-1307, USA.
725
 
726
#serial 2
727
 
728
# _AM_OUTPUT_DEPENDENCY_COMMANDS
729
# ------------------------------
730
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
731
[for mf in $CONFIG_FILES; do
732
  # Strip MF so we end up with the name of the file.
733
  mf=`echo "$mf" | sed -e 's/:.*$//'`
734
  # Check whether this is an Automake generated Makefile or not.
735
  # We used to match only the files named `Makefile.in', but
736
  # some people rename them; so instead we look at the file content.
737
  # Grep'ing the first line is not enough: some people post-process
738
  # each Makefile.in and add a new line on top of each file to say so.
739
  # So let's grep whole file.
740
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
741
    dirpart=`AS_DIRNAME("$mf")`
742
  else
743
    continue
744
  fi
745
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
746
  # Extract the definition of DEP_FILES from the Makefile without
747
  # running `make'.
748
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
749
  test -z "$DEPDIR" && continue
750
  # When using ansi2knr, U may be empty or an underscore; expand it
751
  U=`sed -n -e '/^U = / s///p' < "$mf"`
752
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
753
  # We invoke sed twice because it is the simplest approach to
754
  # changing $(DEPDIR) to its actual value in the expansion.
755
  for file in `sed -n -e '
756
    /^DEP_FILES = .*\\\\$/ {
757
      s/^DEP_FILES = //
758
      :loop
759
        s/\\\\$//
760
        p
761
        n
762
        /\\\\$/ b loop
763
      p
764
    }
765
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
766
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
767
    # Make sure the directory exists.
768
    test -f "$dirpart/$file" && continue
769
    fdir=`AS_DIRNAME(["$file"])`
770
    AS_MKDIR_P([$dirpart/$fdir])
771
    # echo "creating $dirpart/$file"
772
    echo '# dummy' > "$dirpart/$file"
773
  done
774
done
775
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
776
 
777
 
778
# AM_OUTPUT_DEPENDENCY_COMMANDS
779
# -----------------------------
780
# This macro should only be invoked once -- use via AC_REQUIRE.
781
#
782
# This code is only required when automatic dependency tracking
783
# is enabled.  FIXME.  This creates each `.P' file that we will
784
# need in order to bootstrap the dependency handling code.
785
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
786
[AC_CONFIG_COMMANDS([depfiles],
787
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
788
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
789
])
790
 
791
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
792
 
793
# This program is free software; you can redistribute it and/or modify
794
# it under the terms of the GNU General Public License as published by
795
# the Free Software Foundation; either version 2, or (at your option)
796
# any later version.
797
 
798
# This program is distributed in the hope that it will be useful,
799
# but WITHOUT ANY WARRANTY; without even the implied warranty of
800
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
801
# GNU General Public License for more details.
802
 
803
# You should have received a copy of the GNU General Public License
804
# along with this program; if not, write to the Free Software
805
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
806
# 02111-1307, USA.
807
 
808
# serial 2
809
 
810
# AM_MAKE_INCLUDE()
811
# -----------------
812
# Check to see how make treats includes.
813
AC_DEFUN([AM_MAKE_INCLUDE],
814
[am_make=${MAKE-make}
815
cat > confinc << 'END'
816
doit:
817
        @echo done
818
END
819
# If we don't find an include directive, just comment out the code.
820
AC_MSG_CHECKING([for style of include used by $am_make])
821
am__include="#"
822
am__quote=
823
_am_result=none
824
# First try GNU make style include.
825
echo "include confinc" > confmf
826
# We grep out `Entering directory' and `Leaving directory'
827
# messages which can occur if `w' ends up in MAKEFLAGS.
828
# In particular we don't look at `^make:' because GNU make might
829
# be invoked under some other name (usually "gmake"), in which
830
# case it prints its new name instead of `make'.
831
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
832
   am__include=include
833
   am__quote=
834
   _am_result=GNU
835
fi
836
# Now try BSD make style include.
837
if test "$am__include" = "#"; then
838
   echo '.include "confinc"' > confmf
839
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
840
      am__include=.include
841
      am__quote="\""
842
      _am_result=BSD
843
   fi
844
fi
845
AC_SUBST(am__include)
846
AC_SUBST(am__quote)
847
AC_MSG_RESULT($_am_result)
848
rm -f confinc confmf
849
])
850
 
851
# AM_CONDITIONAL                                              -*- Autoconf -*-
852
 
853
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
854
 
855
# This program is free software; you can redistribute it and/or modify
856
# it under the terms of the GNU General Public License as published by
857
# the Free Software Foundation; either version 2, or (at your option)
858
# any later version.
859
 
860
# This program is distributed in the hope that it will be useful,
861
# but WITHOUT ANY WARRANTY; without even the implied warranty of
862
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
863
# GNU General Public License for more details.
864
 
865
# You should have received a copy of the GNU General Public License
866
# along with this program; if not, write to the Free Software
867
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
868
# 02111-1307, USA.
869
 
870
# serial 5
871
 
872
AC_PREREQ(2.52)
873
 
874
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
875
# -------------------------------------
876
# Define a conditional.
877
AC_DEFUN([AM_CONDITIONAL],
878
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
879
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
880
AC_SUBST([$1_TRUE])
881
AC_SUBST([$1_FALSE])
882
if $2; then
883
  $1_TRUE=
884
  $1_FALSE='#'
885
else
886
  $1_TRUE='#'
887
  $1_FALSE=
888
fi
889
AC_CONFIG_COMMANDS_PRE(
890
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
891
  AC_MSG_ERROR([conditional \"$1\" was never defined.
892
Usually this means the macro was only invoked conditionally.])
893
fi])])
894
 
895
dnl
896
dnl canonical-target-name.m4,v 1.12 2001/09/14 17:30:22 joel Exp
897
dnl
898
 
899
dnl canonicalize target cpu
900
dnl NOTE: Most rtems targets do not fullfil autoconf's
901
dnl target naming conventions "processor-vendor-os"
902
dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
903
dnl and we have to fix it for rtems ourselves
904
 
905
AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
906
[
907
AC_CANONICAL_TARGET
908
AC_MSG_CHECKING(rtems target cpu)
909
case "${target}" in
910
  # hpux unix port should go here
911
  i[[34567]]86-*linux*)         # unix "simulator" port
912
        RTEMS_CPU=unix
913
        ;;
914
  i[[34567]]86-*freebsd*)       # unix "simulator" port
915
        RTEMS_CPU=unix
916
        ;;
917
  i[[34567]]86-pc-cygwin*)      # Cygwin is just enough unix like :)
918
        RTEMS_CPU=unix
919
        ;;
920
  no_cpu-*rtems*)
921
        RTEMS_CPU=no_cpu
922
        ;;
923
  sparc-sun-solaris*)           # unix "simulator" port
924
        RTEMS_CPU=unix
925
        ;;
926
  *)
927
        RTEMS_CPU=`echo $target | sed 's%^\([[^-]]*\)-\(.*\)$%\1%'`
928
        ;;
929
esac
930
AC_SUBST(RTEMS_CPU)
931
AC_MSG_RESULT($RTEMS_CPU)
932
])
933
 
934
# Add --enable-maintainer-mode option to configure.
935
# From Jim Meyering
936
 
937
# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
938
 
939
# This program is free software; you can redistribute it and/or modify
940
# it under the terms of the GNU General Public License as published by
941
# the Free Software Foundation; either version 2, or (at your option)
942
# any later version.
943
 
944
# This program is distributed in the hope that it will be useful,
945
# but WITHOUT ANY WARRANTY; without even the implied warranty of
946
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
947
# GNU General Public License for more details.
948
 
949
# You should have received a copy of the GNU General Public License
950
# along with this program; if not, write to the Free Software
951
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
952
# 02111-1307, USA.
953
 
954
# serial 1
955
 
956
AC_DEFUN([AM_MAINTAINER_MODE],
957
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
958
  dnl maintainer-mode is disabled by default
959
  AC_ARG_ENABLE(maintainer-mode,
960
[  --enable-maintainer-mode enable make rules and dependencies not useful
961
                          (and sometimes confusing) to the casual installer],
962
      USE_MAINTAINER_MODE=$enableval,
963
      USE_MAINTAINER_MODE=no)
964
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
965
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
966
  MAINT=$MAINTAINER_MODE_TRUE
967
  AC_SUBST(MAINT)dnl
968
]
969
)
970
 
971
dnl env-rtemsbsp.m4,v 1.7 2002/08/06 07:31:47 ralf Exp
972
 
973
dnl Pass a single BSP via an environment variable
974
dnl used by per BSP configure scripts
975
AC_DEFUN(RTEMS_ENV_RTEMSBSP,
976
[dnl
977
AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
978
AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
979
AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
980
 
981
AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])
982
AC_MSG_CHECKING([for RTEMS_BSP])
983
AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
984
[dnl
985
  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
986
])dnl
987
if test -z "$rtems_cv_RTEMS_BSP"; then
988
  AC_MSG_ERROR([Missing RTEMS_BSP])
989
fi
990
RTEMS_BSP="$rtems_cv_RTEMS_BSP"
991
AC_MSG_RESULT(${RTEMS_BSP})
992
AC_SUBST(RTEMS_BSP)
993
 
994
RTEMS_BSP_SPECS="-specs bsp_specs -qrtems"
995
AC_SUBST(RTEMS_BSP_SPECS)
996
 
997
GCC_SPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/"
998
AC_SUBST(GCC_SPECS)
999
 
1000
PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
1001
AC_SUBST(PROJECT_INCLUDE)
1002
 
1003
PROJECT_RELEASE="\$(PROJECT_ROOT)/$RTEMS_BSP"
1004
AC_SUBST(PROJECT_RELEASE)
1005
 
1006
RTEMS_ROOT=$PROJECT_ROOT/c/$RTEMS_BSP
1007
AC_SUBST(RTEMS_ROOT)
1008
 
1009
RTEMS_ENABLE_BARE
1010
AC_SUBST(BARE_CPU_MODEL)
1011
AC_SUBST(BARE_CPU_CFLAGS)
1012
 
1013
AM_CONDITIONAL([MULTILIB],[false])
1014
 
1015
includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"
1016
libdir="\${exec_prefix}/${RTEMS_BSP}/lib"
1017
 
1018
bsplibdir="\${exec_prefix}/${RTEMS_BSP}/lib"
1019
AC_SUBST(bsplibdir)
1020
])
1021
 
1022
dnl enable-rtemsbsp.m4,v 1.10 2001/09/13 13:14:30 joel Exp
1023
 
1024
dnl Override the set of BSPs to be built.
1025
dnl used by the toplevel configure script
1026
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
1027
AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
1028
[
1029
AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
1030
AC_ARG_ENABLE(rtemsbsp,
1031
AC_HELP_STRING([--enable-rtemsbsp="bsp1 bsp2 .."],
1032
[BSPs to include in build]),
1033
[case "${enableval}" in
1034
  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
1035
  *) $1=$enableval;;
1036
esac],[$1=""])
1037
])
1038
 
1039
dnl
1040
dnl project-root.m4,v 1.6 2001/12/20 17:33:23 joel Exp
1041
dnl
1042
 
1043
dnl
1044
dnl PROJECT_TOPdir     .. relative path to the top of the build-tree
1045
dnl PROJECT_ROOT       .. relative path to the top of the temporary
1046
dnl                       installation directory inside the build-tree
1047
dnl RTEMS_TOPdir       .. relative path of a subpackage's configure.in to the
1048
dnl                       toplevel configure.in of the source-tree
1049
dnl RTEMS_ROOT         .. path to the top of a bsp's build directory
1050
dnl                       [Applied by custom/*.cfg, depredicated otherwise]
1051
dnl
1052
 
1053
AC_DEFUN(RTEMS_PROJECT_ROOT,
1054
[dnl
1055
AC_REQUIRE([RTEMS_TOP])
1056
 
1057
PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex"
1058
AC_SUBST(PACKHEX)
1059
])
1060
 
1061
 
1062
dnl check-bsps.m4,v 1.18 2001/11/21 18:36:51 joel Exp
1063
 
1064
dnl Report all available bsps for a target,
1065
dnl check if a bsp-subdirectory is present for all bsps found
1066
dnl
1067
dnl RTEMS_CHECK_BSPS(bsp_list)
1068
AC_DEFUN(RTEMS_CHECK_BSPS,
1069
[
1070
AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target
1071
AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
1072
AC_MSG_CHECKING([for bsps])
1073
    files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU`
1074
    for file in $files; do
1075
      if test -r $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/$file/bsp_specs; then
1076
        case $file in
1077
        # Now account for BSPs with build variants
1078
          c4xsim)            $1="[$]$1 c4xsim c3xsim";;
1079
          gen68360)          $1="[$]$1 gen68360 gen68360_040";;
1080
          p4000)             $1="[$]$1 p4600 p4650";;
1081
          mvme162)           $1="[$]$1 mvme162 mvme162lx";;
1082
          mbx8xx)            $1="[$]$1 mbx821_001 mbx860_002 mbx860_005b";;
1083
          motorola_powerpc)  $1="[$]$1 mvme2307 mcp750";;
1084
          pc386)             $1="[$]$1 pc386 pc386dx pc486 pc586 pc686 pck6";;
1085
          erc32)             $1="[$]$1 erc32 erc32nfp";;
1086
          leon)              $1="[$]$1 leon1 leon2";;
1087
          sim68000)          $1="[$]$1 sim68000 simcpu32";;
1088
          shsim)             $1="[$]$1 simsh7032 simsh7045";;
1089
          *)                 $1="[$]$1 $file";;
1090
        esac;
1091
      fi
1092
    done
1093
AC_MSG_RESULT([[$]$1 .. done])
1094
])dnl
1095
 
1096
AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
1097
[dnl
1098
AC_REQUIRE([RTEMS_TOP])
1099
 
1100
AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
1101
if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
1102
  AC_MSG_RESULT([yes])
1103
else
1104
  AC_MSG_ERROR([no])
1105
fi
1106
])dnl
1107
 
1108
dnl check-cpu.m4,v 1.6 2002/07/22 10:13:20 ralf Exp
1109
 
1110
dnl check if RTEMS support a cpu
1111
AC_DEFUN(RTEMS_CHECK_CPU,
1112
[dnl
1113
AC_REQUIRE([RTEMS_TOP])
1114
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
1115
 
1116
# Is this a supported CPU?
1117
AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
1118
# FIXME: Temporary hack
1119
if test -d "$srcdir/$RTEMS_TOPdir/cpukit/score/cpu/$RTEMS_CPU"; then
1120
  AC_MSG_RESULT(yes)
1121
else
1122
  AC_MSG_ERROR(no)
1123
fi
1124
])dnl
1125
 
1126
 
1127
AC_DEFUN(RTEMS_ENABLE_BARE,
1128
[
1129
AC_ARG_ENABLE(bare-cpu-cflags,
1130
AC_HELP_STRING([--enable-bare-cpu-cflags],[specify a particular cpu cflag (bare bsp specific)]),
1131
[case "${enableval}" in
1132
  no) BARE_CPU_CFLAGS="" ;;
1133
  *)    BARE_CPU_CFLAGS="${enableval}" ;;
1134
esac],
1135
[BARE_CPU_CFLAGS=""])
1136
 
1137
AC_ARG_ENABLE(bare-cpu-model,
1138
AC_HELP_STRING([--enable-bare-cpu-model],[specify a particular cpu model (bare bsp specific)]),
1139
[case "${enableval}" in
1140
  no)   BARE_CPU_MODEL="" ;;
1141
  *)    BARE_CPU_MODEL="${enableval}" ;;
1142
esac],
1143
[BARE_CPU_MODEL=""])
1144
])
1145
 
1146
 
1147
dnl check-bsp-cache.m4,v 1.3 2000/11/09 17:04:53 joel Exp
1148
 
1149
dnl RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
1150
AC_DEFUN(RTEMS_CHECK_BSP_CACHE,
1151
[
1152
AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target
1153
AC_REQUIRE([RTEMS_ENV_RTEMSBSP])dnl set RTEMS_BSP
1154
AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
1155
AC_CACHE_CHECK([for RTEMS_CPU_MODEL], rtems_cv_RTEMS_CPU_MODEL,
1156
. $RTEMS_TOPdir/c/[$]$1/make/[$]$1.cache)
1157
RTEMS_CPU_MODEL=$rtems_cv_RTEMS_CPU_MODEL
1158
AC_SUBST(RTEMS_CPU_MODEL)
1159
AC_CACHE_CHECK([for RTEMS_BSP_FAMILY], rtems_cv_RTEMS_BSP_FAMILY,
1160
. $RTEMS_TOPdir/c/[$]$1/make/[$]$1.cache)
1161
RTEMS_BSP_FAMILY=$rtems_cv_RTEMS_BSP_FAMILY
1162
AC_SUBST(RTEMS_BSP_FAMILY)
1163
])dnl
1164
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.