source: rtems/c/src/configure.ac @ f0d7515

4.104.114.84.95
Last change on this file since f0d7515 was f0d7515, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/09/02 at 05:01:03

2002-08-09 Ralf Corsepius <corsepiu@…>

  • Makefile.am: Create make/@RTEMS_BSP@.cache. Handle make/custom/*.cfgs. Create make/custom/default.cfg.
  • configure.ac: Add creation of make/custon/*.cfg. Create make/${RTEMS_BSP}.cache. Read make/${RTEMS_BSP}.cache
  • Property mode set to 100644
File size: 2.7 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ(2.52)
6AC_INIT([rtems-c-src],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com])
7AC_CONFIG_SRCDIR([optman])
8RTEMS_TOP(../..)
9AC_CONFIG_AUX_DIR(../..)
10
11RTEMS_ENABLE_CXX
12RTEMS_ENABLE_NETWORKING
13RTEMS_ENABLE_RDBG
14
15RTEMS_CANONICAL_TARGET_CPU
16RTEMS_CANONICAL_HOST
17
18AM_INIT_AUTOMAKE([no-define foreign 1.6])
19AM_MAINTAINER_MODE
20
21RTEMS_ENABLE_MULTILIB
22RTEMS_ENABLE_MULTIPROCESSING
23RTEMS_ENV_RTEMSBSP
24RTEMS_CHECK_CPU
25RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
26
27RTEMS_CHECK_NETWORKING(RTEMS_BSP)
28
29AC_MSG_NOTICE([setting up make/custom])
30
31AS_MKDIR_P([make/custom])
32
33# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
34# directory into the build tree's <bsp>/make/custom subdirectories
35cfg_dir="${RTEMS_TOPdir}/make"
36CUSTOM_CFG_FILES=""
37f="${RTEMS_BSP}.cfg"
38while test -n "$f"; do
39  if test -r "${srcdir}/${cfg_dir}/custom/$f"; then
40    cp ${srcdir}/${cfg_dir}/custom/$f make/custom/$f
41    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
42    f=`grep "^include.*make/custom" ${srcdir}/${cfg_dir}/custom/$f \
43    | sed \
44      -e 's%^.*custom\/%%' \
45      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
46      -e 's%default\.cfg%%'`;
47  else break; fi;
48done
49cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
50
51AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
52${MAKE-make} -f ${srcdir}/make/bsp.mak RTEMS_BSP=${RTEMS_BSP} \
53RTEMS_ROOT=. make/${RTEMS_BSP}.cache
54
55# Read back the cache
56RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
57
58AC_SUBST(CUSTOM_CFG_FILES)
59AC_SUBST(cfg_dir)
60
61## Note: the order of the directories below is essential
62AC_CONFIG_SUBDIRS([make])
63
64## Configure ${srcdir}/../../cpukit as exec/ if multilibs are enabled
65AS_IF([test x"$multilib" = x"no"],[
66  RTEMS_CHECK_MULTIPROCESSING
67  RTEMS_CONFIG_SUBDIR([exec],[../../cpukit],[--with-project-root="../../"])
68  AC_SUBST([exec],[exec])
69])
70
71AC_CONFIG_SUBDIRS(optman)
72AC_CONFIG_SUBDIRS(lib/libcpu)
73AC_CONFIG_SUBDIRS(lib/libbsp)
74AC_CONFIG_SUBDIRS(libmisc)
75
76AS_IF([test "$RTEMS_CPU" != "unix"],[
77## HACK: Suppress libchip for unix
78  AC_CONFIG_SUBDIRS(libchip)
79])
80
81if test "$HAS_NETWORKING" = "yes"; then
82  AC_CONFIG_SUBDIRS(libnetworking)
83  if test "$RTEMS_HAS_RDBG" = "yes"; then
84    RTEMS_CHECK_RDBG(RTEMS_BSP)
85  fi
86fi
87
88if test "$HAS_RDBG" = "yes"; then
89  AC_CONFIG_SUBDIRS(librdbg)
90fi
91AM_CONDITIONAL(HAS_NETWORKING, test "$HAS_NETWORKING" = "yes" )
92AM_CONDITIONAL(HAS_RDBG, test "$HAS_RDBG" = "yes" )
93
94if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
95  AC_CONFIG_SUBDIRS(librtems++)
96fi
97
98AC_CONFIG_SUBDIRS(wrapup tests)
99
100RTEMS_PROJECT_ROOT
101
102# Explicitly list all Makefiles here
103AC_CONFIG_FILES([Makefile],
104[${MAKE} make/${RTEMS_BSP}.cache],
105[RTEMS_BSP=${RTEMS_BSP}
106 MAKE=${MAKE}])
107
108AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.