source: rtems/c/configure.ac @ 1485a58

4.115
Last change on this file since 1485a58 was bb2b825, checked in by Ralf Corsépius <ralf.corsepius@…>, on 07/19/12 at 13:47:55

Require automake-1.12.2.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3
4AC_PREREQ([2.69])
5AC_INIT([rtems-c],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
6AC_CONFIG_SRCDIR([TOOL_TARGETS])
7RTEMS_TOP(..)
8
9RTEMS_CANONICAL_TARGET_CPU
10
11AM_INIT_AUTOMAKE([no-define foreign 1.12.2])
12AM_MAINTAINER_MODE
13
14## These options are used within this file.
15RTEMS_ENABLE_RTEMSBSP
16
17# Set up rtems_bsp
18AS_IF([test x"$enable_rtemsbsp" = x"no"],[
19# --disable-rtemsbsp
20  rtems_bsp=""
21],[
22  AS_IF([test -z "$enable_rtemsbsp"],
23    [# --enable-rtemsbsp=""
24    RTEMS_CHECK_BSPS(rtems_bsp)],
25    [# --enable-rtemsbsp="list"
26    rtems_bsp="$enable_rtemsbsp"])
27])
28
29# Check sanity of BSPs in $rtems_bsp
30for _rtems_bsp in : $rtems_bsp; do test "x$_rtems_bsp" = x: && continue
31  # make sure there is a make/custom file for the bsp
32  _RTEMS_CHECK_CUSTOM_BSP([$_rtems_bsp.cfg],[bsp_cfg])
33
34  AS_IF([test -n "$bsp_cfg"],
35  [
36    # retrieve bsp_family
37    RTEMS_BSP_ALIAS([$_rtems_bsp],[rtems_bsp_family])
38
39    # Is there a configure script for the BSP?
40    AS_IF([test -r "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/$rtems_bsp_family/configure"],
41      [RTEMS_BSP_LIST="$RTEMS_BSP_LIST $_rtems_bsp"])
42  ])
43done
44
45#
46# Compose the configuration arguments to be passed to c/src/configure
47#
48##
49## Partially borrowed from autoconf-2.13
50##
51
52## Adjust paths
53_RTEMS_ADJUST_SRCDIR([rtems_bsp_configure],[src])
54rtems_bsp_configure="$rtems_bsp_configure/configure"
55  RTEMS_CONFIGURE_ARGS_QUOTE([rtems_bsp_configure_args],
56    [-enable-rtemsbsp=* | --enable-rtemsbsp=* ) ;;])
57
58rtems_bsp_configure="$rtems_bsp_configure $rtems_bsp_configure_args"
59rtems_bsp_configure="$rtems_bsp_configure '--with-project-root=../../'"
60rtems_bsp_configure="$rtems_bsp_configure '--with-project-top=../../'"
61AC_SUBST(rtems_bsp_configure)
62
63AC_SUBST(RTEMS_BSP_LIST)
64
65# Explicitly list all Makefiles here
66AC_CONFIG_FILES([Makefile],[
67for bsp in : $RTEMS_BSP_LIST; do test "x$bsp" = x: && continue
68cat >> Makefile << BSPEOF
69
70$bsp: src/configure
71        @set fnord \$(MAKEFLAGS); amf=\[$]\[$]2; \\
72          echo "Configuring RTEMS_BSP=$bsp"; \\
73          \$(MKDIR_P) $bsp; \\
74          ( cd $bsp && \\
75            CONFIG_SHELL=\$(SHELL) RTEMS_BSP=$bsp \$(rtems_bsp_configure) ) \\
76          || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac;
77BSPEOF
78done
79],[RTEMS_BSP_LIST="$RTEMS_BSP_LIST"])
80AC_OUTPUT
81AS_IF([test -n "$RTEMS_BSP_LIST"],[
82echo
83echo target architecture: $target_cpu.
84echo available BSPs: $RTEMS_BSP_LIST.
85echo \'${MAKE} all\' will build the following BSPs: $RTEMS_BSP_LIST.
86echo other BSPs can be built with \'${MAKE} RTEMS_BSP=\"bsp1 bsp2 ...\"\'
87echo
88])
Note: See TracBrowser for help on using the repository browser.