[66387986] | 1 | ## Process this file with autoconf to produce a configure script. |
---|
| 2 | ## |
---|
| 3 | ## $Id$ |
---|
[eb299afc] | 4 | |
---|
[9b5c258] | 5 | AC_PREREQ(2.57) |
---|
[7dcc3fe] | 6 | AC_INIT([rtems-c],[_RTEMS_VERSION],[rtems-bugs@rtems.com]) |
---|
[66387986] | 7 | AC_CONFIG_SRCDIR([src]) |
---|
[eb299afc] | 8 | RTEMS_TOP(..) |
---|
| 9 | |
---|
| 10 | RTEMS_CANONICAL_TARGET_CPU |
---|
| 11 | |
---|
[ccd81b60] | 12 | AM_INIT_AUTOMAKE([no-define foreign 1.7.2]) |
---|
[eb299afc] | 13 | AM_MAINTAINER_MODE |
---|
| 14 | |
---|
[66387986] | 15 | ## These options are used within this file. |
---|
[eb299afc] | 16 | RTEMS_ENABLE_BARE |
---|
| 17 | RTEMS_ENABLE_RTEMSBSP(rtems_bsp) |
---|
| 18 | |
---|
| 19 | RTEMS_CHECK_CPU |
---|
| 20 | |
---|
[d049568] | 21 | AS_IF([test -z "$rtems_bsp"], |
---|
| 22 | [RTEMS_CHECK_BSPS(rtems_bsp)]) |
---|
[eb299afc] | 23 | |
---|
| 24 | for i in $rtems_bsp; do |
---|
| 25 | |
---|
| 26 | # make sure there is a make/custom file for the bsp |
---|
| 27 | RTEMS_CHECK_CUSTOM_BSP(i) |
---|
| 28 | |
---|
| 29 | RTEMS_BSP_ALIAS($i,bspdir) |
---|
| 30 | |
---|
| 31 | # Is there code where there should be for this BSP? |
---|
| 32 | # The bare bsp is a special case as it is not under the RTEMS_CPU path |
---|
[b62a92c] | 33 | case $bspdir in |
---|
[eb299afc] | 34 | bare) |
---|
| 35 | bspcpudir= |
---|
| 36 | ;; |
---|
| 37 | *) |
---|
| 38 | bspcpudir=$RTEMS_CPU/ |
---|
| 39 | ;; |
---|
| 40 | esac |
---|
| 41 | |
---|
| 42 | if test -d "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$bspcpudir$bspdir"; then |
---|
| 43 | RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i" |
---|
| 44 | else |
---|
| 45 | AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for $i]) |
---|
| 46 | fi |
---|
| 47 | done |
---|
| 48 | |
---|
| 49 | # |
---|
| 50 | # Compose the configuration arguments to be passed to c/src/configure |
---|
| 51 | # |
---|
| 52 | ## |
---|
| 53 | ## Partially borrowed from autoconf-2.13 |
---|
| 54 | ## |
---|
| 55 | |
---|
| 56 | ## Adjust paths |
---|
[eab41f63] | 57 | _RTEMS_ADJUST_SRCDIR([rtems_bsp_configure],[src]) |
---|
| 58 | rtems_bsp_configure="$rtems_bsp_configure/configure" |
---|
[2fe08ccb] | 59 | RTEMS_CONFIGURE_ARGS_QUOTE([rtems_bsp_configure_args], |
---|
[45789f2] | 60 | [-enable-rtemsbsp=* | --enable-rtemsbsp=* ) ;;]) |
---|
[eb299afc] | 61 | |
---|
| 62 | rtems_bsp_configure="$rtems_bsp_configure $rtems_bsp_configure_args" |
---|
| 63 | AC_SUBST(rtems_bsp_configure) |
---|
| 64 | |
---|
| 65 | AC_SUBST(RTEMS_BSP_LIST) |
---|
| 66 | |
---|
[70810dc] | 67 | # Explicitly list all Makefiles here |
---|
[d049568] | 68 | AC_CONFIG_FILES([Makefile]) |
---|
[66387986] | 69 | AC_OUTPUT |
---|
[eb299afc] | 70 | |
---|
| 71 | echo |
---|
| 72 | echo target architecture: $target_cpu. |
---|
| 73 | echo available BSPs: $rtems_bsp. |
---|
[7b79761] | 74 | echo \'${MAKE} all\' will build the following BSPs: $RTEMS_BSP_LIST. |
---|
| 75 | echo other BSPs can be built with \'${MAKE} RTEMS_BSP=\"bsp1 bsp2 ...\"\' |
---|
[eb299afc] | 76 | echo |
---|