source: rtems/c/configure.ac @ af981ca0

4.11
Last change on this file since af981ca0 was af981ca0, checked in by Ralf Corsépius <ralf.corsepius@…>, on May 4, 2012 at 6:57:50 AM

Remove CVS-Ids.

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