1 | ## Process this file with autoconf to produce a configure script. |
---|
2 | ## |
---|
3 | ## $Id$ |
---|
4 | |
---|
5 | AC_PREREQ(2.57) |
---|
6 | AC_INIT([rtems-c],[_RTEMS_VERSION],[rtems-bugs@rtems.com]) |
---|
7 | AC_CONFIG_SRCDIR([src]) |
---|
8 | RTEMS_TOP(..) |
---|
9 | |
---|
10 | RTEMS_CANONICAL_TARGET_CPU |
---|
11 | |
---|
12 | AM_INIT_AUTOMAKE([no-define foreign 1.7.2]) |
---|
13 | AM_MAINTAINER_MODE |
---|
14 | |
---|
15 | ## These options are used within this file. |
---|
16 | RTEMS_ENABLE_BARE |
---|
17 | RTEMS_ENABLE_RTEMSBSP(rtems_bsp) |
---|
18 | |
---|
19 | RTEMS_CHECK_CPU |
---|
20 | RTEMS_CANONICAL_HOST |
---|
21 | |
---|
22 | AS_IF([test -z "$rtems_bsp"], |
---|
23 | [RTEMS_CHECK_BSPS(rtems_bsp)]) |
---|
24 | |
---|
25 | for 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 |
---|
48 | done |
---|
49 | |
---|
50 | # |
---|
51 | # Compose the configuration arguments to be passed to c/src/configure |
---|
52 | # |
---|
53 | ## |
---|
54 | ## Partially borrowed from autoconf-2.13 |
---|
55 | ## |
---|
56 | |
---|
57 | ## Adjust paths |
---|
58 | _RTEMS_ADJUST_SRCDIR([rtems_bsp_configure],[src]) |
---|
59 | rtems_bsp_configure="$rtems_bsp_configure/configure" |
---|
60 | RTEMS_CONFIGURE_ARGS_QUOTE([rtems_bsp_configure_args], |
---|
61 | [-enable-rtemsbsp=* | --enable-rtemsbsp=* ) ;;]) |
---|
62 | |
---|
63 | rtems_bsp_configure="$rtems_bsp_configure $rtems_bsp_configure_args" |
---|
64 | AC_SUBST(rtems_bsp_configure) |
---|
65 | |
---|
66 | AC_SUBST(RTEMS_BSP_LIST) |
---|
67 | |
---|
68 | # Explicitly list all Makefiles here |
---|
69 | AC_CONFIG_FILES([Makefile]) |
---|
70 | AC_OUTPUT |
---|
71 | |
---|
72 | echo |
---|
73 | echo target architecture: $target_cpu. |
---|
74 | echo available BSPs: $rtems_bsp. |
---|
75 | echo \'${MAKE} all\' will build the following BSPs: $RTEMS_BSP_LIST. |
---|
76 | echo other BSPs can be built with \'${MAKE} RTEMS_BSP=\"bsp1 bsp2 ...\"\' |
---|
77 | echo |
---|