PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/testbed/aclocal/enable-rtemsbsp.m4

http://rtems-atapi.googlecode.com/
m4 | 68 lines | 54 code | 14 blank | 0 comment | 0 complexity | 9d7633d9e7505af5bd597763f013d10f MD5 | raw file
 1dnl $Id: enable-rtemsbsp.m4,v 1.14 2004/02/17 13:50:24 ralf Exp $
 2
 3dnl Override the set of BSPs to be built.
 4dnl used by the toplevel configure script
 5dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
 6AC_DEFUN([RTEMS_ENABLE_RTEMSBSP],
 7[
 8AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])
 9AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])dnl sets RTEMS_CPU, target
10AC_REQUIRE([RTEMS_RTEMSPATH])dnl sets RTEMSPATH
11
12AC_ARG_ENABLE(rtemsbsp,
13[AC_HELP_STRING([--enable-rtemsbsp="bsp1"],
14[BSPs to include in build])],
15[case "${enable_rtemsbsp}" in
16  yes ) enable_rtemsbsp="no" ;;
17  no ) enable_rtemsbsp="no" ;;
18  *) enable_rtemsbsp="$enable_rtemsbsp" ;;
19esac],[enable_rtemsbsp="no"])
20
21AS_IF([test x"$enable_rtemsbsp" = x"no"],[
22  AC_MSG_ERROR([no valid BSP provided, use --enable-rtemsbsp="bsp"])
23])
24
25RTEMS_COMPILER=${RTEMSPATH}/make/compilers/gcc-target-default.cfg
26RTEMS_BSP=$enable_rtemsbsp
27RTEMS_BSP_PATH=${RTEMSPATH_CPUAPI}/${enable_rtemsbsp}
28RTEMS_BSP_BSPCFG=${RTEMS_BSP_PATH}/make/bsp.cfg
29RTEMS_BSP_MAKECFG=${RTEMSPATH}/make/custom/${enable_rtemsbsp}.cfg
30RTEMS_BSP_INC=${RTEMS_BSP_PATH}/lib/include
31
32AC_MSG_CHECKING([for BSP ${RTEMS_BSP}])
33
34AS_IF([test ! -f ${RTEMS_BSP_BSPCFG}],[
35  AC_MSG_RESULT([not found])
36  AC_MSG_ERROR([no valid BSP configuration file found: ${RTEMS_BSP_BSPCFG}])
37])
38
39AS_IF([test ! -f ${RTEMS_BSP_MAKECFG}],[
40  AC_MSG_RESULT([not found])
41  AC_MSG_ERROR([no valid BSP custom make configuration file found: ${RTEMS_BSP_MAKECFG}])
42])
43
44AS_IF([test ! -f ${RTEMS_BSP_INC}/bsp.h],[
45  AC_MSG_RESULT([not found])
46  AC_MSG_ERROR([no valid BSP header found: ${RTEMS_BSP_INC}/bsp.h])
47])
48
49AS_IF([test ! -f ${RTEMS_BSP_INC}/rtems.h],[
50  AC_MSG_RESULT([not found])
51  AC_MSG_ERROR([no valid RTEMS header found: ${RTEMS_BSP_INC}/rtems.h])
52])
53
54AS_IF([test ! -f ${RTEMS_BSP_INC}/rtems/rtems/status.h],[
55  AC_MSG_RESULT([not found])
56  AC_MSG_ERROR([no valid RTEMS header found: ${RTEMS_BSP_INC}/rtems/rtems/status.h])
57])
58
59AC_MSG_RESULT([found])
60
61AC_SUBST(RTEMS_COMPILER)
62AC_SUBST(RTEMS_BSP)
63AC_SUBST(RTEMS_BSP_BSPCFG)
64AC_SUBST(RTEMS_BSP_MAKECFG)
65AC_SUBST(RTEMS_BSP_INC)
66
67])
68