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

4.104.114.84.95
Last change on this file since a846105 was 67bfd9a6, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 12, 2002 at 2:29:54 PM

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

Posix-BSP-Hacks:

  • configure.ac: Add AM_CONDITIONAL(LIBCHIP). Pass RTEMS_HOST to make/bsp.mak
  • Makefile.am: Pass RTEMS_HOST to make/bsp.mak.
  • wrapup/Makefile.am: Apply AM_CONDITIONAL(LIBCHIP).
  • Property mode set to 100644
File size: 3.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_PROG_CC_FOR_TARGET
22RTEMS_CANONICALIZE_TOOLS
23
24RTEMS_ENABLE_MULTILIB
25RTEMS_ENABLE_MULTIPROCESSING
26RTEMS_ENV_RTEMSBSP
27RTEMS_CHECK_CPU
28RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
29
30RTEMS_CHECK_NETWORKING(RTEMS_BSP)
31
32AC_MSG_NOTICE([setting up make/custom])
33
34AS_MKDIR_P([make/custom])
35
36# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
37# directory into the build tree's <bsp>/make/custom subdirectories
38cfg_dir="${RTEMS_TOPdir}/make"
39CUSTOM_CFG_FILES=""
40f="${RTEMS_BSP}.cfg"
41while test -n "$f"; do
42  if test -r "${srcdir}/${cfg_dir}/custom/$f"; then
43    cp ${srcdir}/${cfg_dir}/custom/$f make/custom/$f
44    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
45    f=`grep "^include.*make/custom" ${srcdir}/${cfg_dir}/custom/$f \
46    | sed \
47      -e 's%^.*custom\/%%' \
48      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
49      -e 's%default\.cfg%%'`;
50  else break; fi;
51done
52cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
53
54AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
55${MAKE-make} -f ${srcdir}/make/bsp.mak \
56RTEMS_BSP=${RTEMS_BSP} \
57RTEMS_HOST=${RTEMS_HOST} \
58BARE_CPU_MODEL=${BARE_CPU_MODEL} \
59RTEMS_ROOT=. make/${RTEMS_BSP}.cache
60
61# Read back the cache
62RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
63
64AC_SUBST(CUSTOM_CFG_FILES)
65AC_SUBST(cfg_dir)
66
67## Configure ${srcdir}/../../cpukit as exec/ if multilibs are enabled
68AS_IF([test x"$multilib" = x"no"],[
69  RTEMS_CHECK_MULTIPROCESSING
70  RTEMS_CONFIG_SUBDIR([exec],[../../cpukit],
71  [--with-project-root="../../" --enable-rtemsbsp=$RTEMS_BSP
72  ])
73  BSP_SUBDIRS="exec"
74])
75
76## Note: the order of the directories below is essential
77AC_CONFIG_SUBDIRS([make])
78BSP_SUBDIRS="$BSP_SUBDIRS make"
79AC_CONFIG_SUBDIRS([optman])
80BSP_SUBDIRS="$BSP_SUBDIRS optman"
81AC_CONFIG_SUBDIRS([lib/libcpu])
82BSP_SUBDIRS="$BSP_SUBDIRS lib/libcpu"
83AC_CONFIG_SUBDIRS([lib/libbsp])
84BSP_SUBDIRS="$BSP_SUBDIRS lib/libbsp"
85AC_CONFIG_SUBDIRS([libmisc])
86BSP_SUBDIRS="$BSP_SUBDIRS libmisc"
87
88AS_IF([test "$RTEMS_CPU" != "unix"],[
89## HACK: Suppress libchip for unix
90  AC_CONFIG_SUBDIRS([libchip])
91  BSP_SUBDIRS="$BSP_SUBDIRS libchip"
92])
93
94AS_IF([test "$HAS_NETWORKING" = "yes"],[
95  AC_CONFIG_SUBDIRS(libnetworking)
96  BSP_SUBDIRS="$BSP_SUBDIRS libnetworking"
97  AS_IF([test "$RTEMS_HAS_RDBG" = "yes"],[
98    RTEMS_CHECK_RDBG(RTEMS_BSP)
99  ])
100])
101
102AS_IF([test "$HAS_RDBG" = "yes"],[
103  AC_CONFIG_SUBDIRS([librdbg])
104  BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
105])
106
107AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
108  AC_CONFIG_SUBDIRS([librtems++])
109  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
110])
111
112BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
113AC_CONFIG_SUBDIRS([tests])
114BSP_SUBDIRS="$BSP_SUBDIRS tests"
115
116AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
117
118AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
119AM_CONDITIONAL([HAS_RDBG],[test "$HAS_RDBG" = "yes"])
120
121# The posix bsp doesn't support libchip
122# FIXME: We should use a feature based check, here
123AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
124
125# The bare bsp doesn't have libbsp.a
126# FIXME: We should use a feature based check, here
127AM_CONDITIONAL([HAS_LIBBSP],[! test "$RTEMS_BSP_FAMILY" = "bare"])
128AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
129
130RTEMS_PROJECT_ROOT
131
132# Explicitly list all Makefiles here
133AC_CONFIG_FILES([Makefile],
134[${MAKE} make/${RTEMS_BSP}.cache],
135[RTEMS_BSP=${RTEMS_BSP}
136 MAKE=${MAKE}])
137
138AC_CONFIG_FILES([wrapup/Makefile])
139
140AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.