source: rtems/c/src/configure.ac @ 59a01a6e

4.104.114.84.95
Last change on this file since 59a01a6e was 9346df0, checked in by Ralf Corsepius <ralf.corsepius@…>, on Dec 12, 2002 at 3:11:39 AM

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

  • configure.ac: Remove libmisc.
  • Property mode set to 100644
File size: 5.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 \
53RTEMS_BSP=${RTEMS_BSP} \
54RTEMS_HOST=${RTEMS_HOST} \
55BARE_CPU_MODEL=${BARE_CPU_MODEL} \
56RTEMS_ROOT=. make/${RTEMS_BSP}.cache
57
58# Read back the cache
59AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
60[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
61RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
62AC_SUBST(RTEMS_CPU_MODEL)
63test -n "${RTEMS_CPU_MODEL}" && \
64  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
65
66AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
67[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
68RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
69AC_SUBST(RTEMS_BSP_FAMILY)
70test -n "${RTEMS_BSP_FAMILY}" && \
71  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
72
73AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
74[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
75CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
76AC_SUBST(CPU_CFLAGS)
77test -n "${CPU_CFLAGS}" && \
78  ac_configure_args="$ac_configure_args 'CPU_CFLAGS=${CPU_CFLAGS}'"
79
80AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
81[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
82CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
83AC_SUBST(CFLAGS_OPTIMIZE_V)
84test -n "${CFLAGS_OPTIMIZE_V}" && \
85  ac_configure_args="$ac_configure_args 'CFLAGS_OPTIMIZE_V=${CFLAGS_OPTIMIZE_V}'"
86
87AC_CACHE_CHECK([for CFLAGS_DEBUG_V],[ac_cv_env_CFLAGS_DEBUG_V],
88[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
89CFLAGS_DEBUG_V=$ac_cv_env_CFLAGS_DEBUG_V
90AC_SUBST(CFLAGS_DEBUG_V)
91test -n "${CFLAGS_DEBUG_V}" && \
92  ac_configure_args="$ac_configure_args 'CFLAGS_DEBUG_V=${CFLAGS_DEBUG_V}'"
93
94AC_CACHE_CHECK([for CFLAGS_PROFILE_V],[ac_cv_env_CFLAGS_PROFILE_V],
95[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
96CFLAGS_PROFILE_V=$ac_cv_env_CFLAGS_PROFILE_V
97AC_SUBST(CFLAGS_PROFILE_V)
98test -n "${CFLAGS_PROFILE_V}" && \
99  ac_configure_args="$ac_configure_args 'CFLAGS_PROFILE_V=${CFLAGS_PROFILE_V}'"
100
101RTEMS_PROG_CC_FOR_TARGET
102RTEMS_CANONICALIZE_TOOLS
103
104
105AC_SUBST(CUSTOM_CFG_FILES)
106AC_SUBST(cfg_dir)
107
108## Configure ${srcdir}/../../cpukit as exec/ if multilibs are disabled
109AS_IF([test x"$multilib" = x"no"],[
110  RTEMS_CHECK_MULTIPROCESSING
111  RTEMS_CONFIG_SUBDIR([exec],[../../cpukit],
112  ['--with-project-root=../../' '--enable-rtemsbsp=$RTEMS_BSP'
113  ])
114  BSP_SUBDIRS="exec"
115])
116
117## Note: the order of the directories below is essential
118AC_CONFIG_SUBDIRS([make])
119BSP_SUBDIRS="$BSP_SUBDIRS make"
120AC_CONFIG_SUBDIRS([optman])
121BSP_SUBDIRS="$BSP_SUBDIRS optman"
122AC_CONFIG_SUBDIRS([lib/libcpu])
123BSP_SUBDIRS="$BSP_SUBDIRS lib/libcpu"
124AC_CONFIG_SUBDIRS([lib/libbsp])
125BSP_SUBDIRS="$BSP_SUBDIRS lib/libbsp"
126
127AS_IF([test "$RTEMS_CPU" != "unix"],[
128## HACK: Suppress libchip for unix
129  AC_CONFIG_SUBDIRS([libchip])
130  BSP_SUBDIRS="$BSP_SUBDIRS libchip"
131])
132
133AS_IF([test "$HAS_NETWORKING" = "yes"],[
134  AC_CONFIG_SUBDIRS(libnetworking)
135  BSP_SUBDIRS="$BSP_SUBDIRS libnetworking"
136  AS_IF([test "$RTEMS_HAS_RDBG" = "yes"],[
137    RTEMS_CHECK_RDBG(RTEMS_BSP)
138  ])
139])
140
141AS_IF([test "$HAS_RDBG" = "yes"],[
142  AC_CONFIG_SUBDIRS([librdbg])
143  BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
144])
145
146AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
147  AC_CONFIG_SUBDIRS([librtems++])
148  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
149])
150
151BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
152
153AC_ARG_ENABLE([ada],
154[AC_HELP_STRING([--enable-ada],[enable ada support])],
155[case "${enable_ada}" in
156  yes) ;;
157  no) ;;
158  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
159esac],[enable_ada=no])
160
161AS_IF([test x"$enable_ada" = x"yes"],[
162  AS_IF([test -d ${srcdir}/ada-tests],[
163    AC_CONFIG_SUBDIRS([ada-tests])
164    BSP_SUBDIRS="$BSP_SUBDIRS ada-tests"
165  ])
166])
167
168AC_CONFIG_SUBDIRS([tests])
169BSP_SUBDIRS="$BSP_SUBDIRS tests"
170
171AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
172
173AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
174AM_CONDITIONAL([HAS_RDBG],[test "$HAS_RDBG" = "yes"])
175
176# The posix bsp doesn't support libchip
177# FIXME: We should use a feature based check, here
178AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
179
180# The bare bsp doesn't have libbsp.a
181# FIXME: We should use a feature based check, here
182AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
183AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
184
185RTEMS_PROJECT_ROOT
186
187# Explicitly list all Makefiles here
188AC_CONFIG_FILES([Makefile],
189[${MAKE} make/${RTEMS_BSP}.cache],
190[RTEMS_BSP=${RTEMS_BSP}
191 MAKE=${MAKE}])
192
193AC_CONFIG_FILES([wrapup/Makefile])
194
195AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.