source: rtems/c/configure.ac @ 0f77281

4.115
Last change on this file since 0f77281 was 0f77281, checked in by Ralf Corsépius <ralf.corsepius@…>, on Jul 19, 2012 at 1:44:32 PM

Require autoconf-2.69.

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[66387986]1## Process this file with autoconf to produce a configure script.
[33a105fb]2##
[eb299af]3
[0f77281]4AC_PREREQ([2.69])
[fcb0cd46]5AC_INIT([rtems-c],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
[1204f22]6AC_CONFIG_SRCDIR([TOOL_TARGETS])
[eb299af]7RTEMS_TOP(..)
8
9RTEMS_CANONICAL_TARGET_CPU
10
[8ee3775]11AM_INIT_AUTOMAKE([no-define foreign 1.11.1])
[eb299af]12AM_MAINTAINER_MODE
13
[66387986]14## These options are used within this file.
[1204f22]15RTEMS_ENABLE_RTEMSBSP
[eb299af]16
[2d1daae]17# Set up rtems_bsp
[1204f22]18AS_IF([test x"$enable_rtemsbsp" = x"no"],[
[2d1daae]19# --disable-rtemsbsp
[1204f22]20  rtems_bsp=""
21],[
22  AS_IF([test -z "$enable_rtemsbsp"],
[2d1daae]23    [# --enable-rtemsbsp=""
24    RTEMS_CHECK_BSPS(rtems_bsp)],
25    [# --enable-rtemsbsp="list"
26    rtems_bsp="$enable_rtemsbsp"])
27])
[eb299af]28
[2d1daae]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])
[eb299af]33
[2d1daae]34  AS_IF([test -n "$bsp_cfg"],
35  [
36    # retrieve bsp_family
37    RTEMS_BSP_ALIAS([$_rtems_bsp],[rtems_bsp_family])
[eb299af]38
[309dbd0]39    # Is there a configure script for the BSP?
[8d9d5bd]40    AS_IF([test -r "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/$rtems_bsp_family/configure"],
[2d1daae]41      [RTEMS_BSP_LIST="$RTEMS_BSP_LIST $_rtems_bsp"])
42  ])
[eb299af]43done
44
45#
46# Compose the configuration arguments to be passed to c/src/configure
47#
[1204f22]48##
[eb299af]49## Partially borrowed from autoconf-2.13
50##
51
52## Adjust paths
[eab41f63]53_RTEMS_ADJUST_SRCDIR([rtems_bsp_configure],[src])
54rtems_bsp_configure="$rtems_bsp_configure/configure"
[2fe08ccb]55  RTEMS_CONFIGURE_ARGS_QUOTE([rtems_bsp_configure_args],
[45789f2]56    [-enable-rtemsbsp=* | --enable-rtemsbsp=* ) ;;])
[eb299af]57
58rtems_bsp_configure="$rtems_bsp_configure $rtems_bsp_configure_args"
[1b7c9183]59rtems_bsp_configure="$rtems_bsp_configure '--with-project-root=../../'"
60rtems_bsp_configure="$rtems_bsp_configure '--with-project-top=../../'"
[eb299af]61AC_SUBST(rtems_bsp_configure)
62
63AC_SUBST(RTEMS_BSP_LIST)
64
[70810dc]65# Explicitly list all Makefiles here
[73dc152]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"; \\
[92de6270]73          \$(MKDIR_P) $bsp; \\
[73dc152]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"])
[66387986]80AC_OUTPUT
[2d1daae]81AS_IF([test -n "$RTEMS_BSP_LIST"],[
[eb299af]82echo
83echo target architecture: $target_cpu.
[2d1daae]84echo available BSPs: $RTEMS_BSP_LIST.
[7b79761]85echo \'${MAKE} all\' will build the following BSPs: $RTEMS_BSP_LIST.
86echo other BSPs can be built with \'${MAKE} RTEMS_BSP=\"bsp1 bsp2 ...\"\'
[eb299af]87echo
[2d1daae]88])
Note: See TracBrowser for help on using the repository browser.