source: rtems/c/configure.ac @ 1204f22

4.104.114.84.9
Last change on this file since 1204f22 was 1204f22, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 17, 2004 at 1:44:16 PM

2004-02-17 Ralf Corsepius <corsepiu@…>

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