source: rtems/c/configure.ac @ 2c8d5f2

4.104.114.84.9
Last change on this file since 2c8d5f2 was 2c8d5f2, checked in by Ralf Corsepius <ralf.corsepius@…>, on Oct 18, 2004 at 9:28:00 AM

2004-10-18 Ralf Corsepius <ralf_corsepius@…>

  • acinclude.m4: Remove RTEMS_CHECK_CPU.
  • configure.ac: Remove RTEMS_CHECK_CPU, RTEMS_ENABLE_BARE.
  • Property mode set to 100644
File size: 2.5 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ(2.59)
6AC_INIT([rtems-c],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
7AC_CONFIG_SRCDIR([TOOL_TARGETS])
8RTEMS_TOP(..)
9
10RTEMS_CANONICAL_TARGET_CPU
11
12AM_INIT_AUTOMAKE([no-define foreign 1.9])
13AM_MAINTAINER_MODE
14
15## These options are used within this file.
16RTEMS_ENABLE_RTEMSBSP
17
18AS_IF([test x"$enable_rtemsbsp" = x"no"],[
19  rtems_bsp=""
20],[
21  AS_IF([test -z "$enable_rtemsbsp"],
22    [RTEMS_CHECK_BSPS(rtems_bsp)],
23    [rtems_bsp="$enable_rtemsbsp"])
24
25for i in $rtems_bsp; do
26
27    # make sure there is a make/custom file for the bsp
28    RTEMS_CHECK_CUSTOM_BSP(i)
29 
30    RTEMS_BSP_ALIAS($i,bspdir)
31
32    # Is there code where there should be for this BSP?
33    # The bare bsp is a special case as it is not under the RTEMS_CPU path
34    case $bspdir in
35      bare)
36        bspcpudir=
37        ;;
38      *)
39        bspcpudir=$RTEMS_CPU/
40        ;;
41    esac
42     
43    if test -d "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$bspcpudir$bspdir"; then
44      RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i"
45    else
46      AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for  $i])
47    fi
48done
49])
50
51#
52# Compose the configuration arguments to be passed to c/src/configure
53#
54##
55## Partially borrowed from autoconf-2.13
56##
57
58## Adjust paths
59_RTEMS_ADJUST_SRCDIR([rtems_bsp_configure],[src])
60rtems_bsp_configure="$rtems_bsp_configure/configure"
61  RTEMS_CONFIGURE_ARGS_QUOTE([rtems_bsp_configure_args],
62    [-enable-rtemsbsp=* | --enable-rtemsbsp=* ) ;;])
63
64rtems_bsp_configure="$rtems_bsp_configure $rtems_bsp_configure_args"
65rtems_bsp_configure="$rtems_bsp_configure '--with-project-root=../../'"
66rtems_bsp_configure="$rtems_bsp_configure '--with-project-top=../../'"
67AC_SUBST(rtems_bsp_configure)
68
69AC_SUBST(RTEMS_BSP_LIST)
70
71# Explicitly list all Makefiles here
72AC_CONFIG_FILES([Makefile],[
73for bsp in : $RTEMS_BSP_LIST; do test "x$bsp" = x: && continue
74cat >> Makefile << BSPEOF
75
76$bsp: src/configure
77        @set fnord \$(MAKEFLAGS); amf=\[$]\[$]2; \\
78          echo "Configuring RTEMS_BSP=$bsp"; \\
79          \$(mkdir_p) $bsp; \\
80          ( cd $bsp && \\
81            CONFIG_SHELL=\$(SHELL) RTEMS_BSP=$bsp \$(rtems_bsp_configure) ) \\
82          || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac;
83BSPEOF
84done
85],[RTEMS_BSP_LIST="$RTEMS_BSP_LIST"])
86AC_OUTPUT
87
88echo
89echo target architecture: $target_cpu.
90echo available BSPs: $rtems_bsp.
91echo \'${MAKE} all\' will build the following BSPs: $RTEMS_BSP_LIST.
92echo other BSPs can be built with \'${MAKE} RTEMS_BSP=\"bsp1 bsp2 ...\"\'
93echo
Note: See TracBrowser for help on using the repository browser.