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

Last change on this file since cdd0fc8a was 74e2998, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 11, 2003 at 2:41:57 PM

2003-08-11 Ralf Corsepius <corsepiu@…>

  • configure.ac: Use rtems-bugs@… as bug report email address.
  • 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.57)
6AC_INIT([rtems-c-src],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
7AC_CONFIG_SRCDIR([optman])
8RTEMS_TOP(../..)
9
10RTEMS_ENABLE_CXX
11RTEMS_ENABLE_NETWORKING
12RTEMS_ENABLE_RDBG
13
14RTEMS_CANONICAL_TARGET_CPU
15RTEMS_CANONICAL_HOST
16
17AM_INIT_AUTOMAKE([no-define foreign 1.7.2])
18AM_MAINTAINER_MODE
19
20RTEMS_ENABLE_MULTILIB
21RTEMS_ENABLE_MULTIPROCESSING
22RTEMS_ENV_RTEMSBSP
23RTEMS_CHECK_CPU
24RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
25
26RTEMS_CHECK_NETWORKING(RTEMS_BSP)
27
28AC_MSG_NOTICE([setting up make/custom])
29
30AS_MKDIR_P([make/custom])
31
32# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
33# directory into the build tree's <bsp>/make/custom subdirectories
34cfg_dir="${RTEMS_TOPdir}/make"
35CUSTOM_CFG_FILES=""
36f="${RTEMS_BSP}.cfg"
37while test -n "$f"; do
38  if test -r "${srcdir}/${cfg_dir}/custom/$f"; then
39    cp ${srcdir}/${cfg_dir}/custom/$f make/custom/$f
40    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
41    f=`grep "^include.*make/custom" ${srcdir}/${cfg_dir}/custom/$f \
42    | sed \
43      -e 's%^.*custom\/%%' \
44      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
45      -e 's%default\.cfg%%'`;
46  else break; fi;
47done
48cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
49
50AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
51${MAKE-make} -f ${srcdir}/make/bsp.mak \
52RTEMS_BSP=${RTEMS_BSP} \
53RTEMS_HOST=${RTEMS_HOST} \
54BARE_CPU_MODEL=${BARE_CPU_MODEL} \
55RTEMS_ROOT=. make/${RTEMS_BSP}.cache
56
57# Read back the cache
58AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
59[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
60RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
61AC_SUBST(RTEMS_CPU_MODEL)
62test -n "${RTEMS_CPU_MODEL}" && \
63  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
64
65AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
66[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
67RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
68AC_SUBST(RTEMS_BSP_FAMILY)
69test -n "${RTEMS_BSP_FAMILY}" && \
70  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
71
72AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
73[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
74CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
75AC_SUBST(CPU_CFLAGS)
76test -n "${CPU_CFLAGS}" && \
77  ac_configure_args="$ac_configure_args 'CPU_CFLAGS=${CPU_CFLAGS}'"
78
79AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
80[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
81CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
82AC_SUBST(CFLAGS_OPTIMIZE_V)
83test -n "${CFLAGS_OPTIMIZE_V}" && \
84  ac_configure_args="$ac_configure_args 'CFLAGS_OPTIMIZE_V=${CFLAGS_OPTIMIZE_V}'"
85
86AC_CACHE_CHECK([for CFLAGS_DEBUG_V],[ac_cv_env_CFLAGS_DEBUG_V],
87[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
88CFLAGS_DEBUG_V=$ac_cv_env_CFLAGS_DEBUG_V
89AC_SUBST(CFLAGS_DEBUG_V)
90test -n "${CFLAGS_DEBUG_V}" && \
91  ac_configure_args="$ac_configure_args 'CFLAGS_DEBUG_V=${CFLAGS_DEBUG_V}'"
92
93AC_CACHE_CHECK([for CFLAGS_PROFILE_V],[ac_cv_env_CFLAGS_PROFILE_V],
94[. $RTEMS_TOPdir/c/${RTEMS_BSP}/make/${RTEMS_BSP}.cache])
95CFLAGS_PROFILE_V=$ac_cv_env_CFLAGS_PROFILE_V
96AC_SUBST(CFLAGS_PROFILE_V)
97test -n "${CFLAGS_PROFILE_V}" && \
98  ac_configure_args="$ac_configure_args 'CFLAGS_PROFILE_V=${CFLAGS_PROFILE_V}'"
99
100RTEMS_PROG_CC_FOR_TARGET
101RTEMS_CANONICALIZE_TOOLS
102
103
104AC_SUBST(CUSTOM_CFG_FILES)
105AC_SUBST(cfg_dir)
106
107## Configure ${srcdir}/../../cpukit as exec/ if multilibs are disabled
108AS_IF([test x"$multilib" = x"no"],[
109  RTEMS_CHECK_MULTIPROCESSING
110  RTEMS_CONFIG_SUBDIR([exec],[../../cpukit],
111  ['--with-project-root=../../' '--enable-rtemsbsp=$RTEMS_BSP'
112  ])
113  BSP_SUBDIRS="exec"
114])
115
116## Note: the order of the directories below is essential
117AC_CONFIG_SUBDIRS([make])
118BSP_SUBDIRS="$BSP_SUBDIRS make"
119AC_CONFIG_SUBDIRS([optman])
120BSP_SUBDIRS="$BSP_SUBDIRS optman"
121AC_CONFIG_SUBDIRS([lib/libcpu])
122BSP_SUBDIRS="$BSP_SUBDIRS lib/libcpu"
123AC_CONFIG_SUBDIRS([lib/libbsp])
124BSP_SUBDIRS="$BSP_SUBDIRS lib/libbsp"
125
126AS_IF([test "$RTEMS_CPU" != "unix"],[
127## HACK: Suppress libchip for unix
128  AC_CONFIG_SUBDIRS([libchip])
129  BSP_SUBDIRS="$BSP_SUBDIRS libchip"
130])
131
132AS_IF([test "$HAS_NETWORKING" = "yes"],[
133  AC_CONFIG_SUBDIRS(libnetworking)
134  BSP_SUBDIRS="$BSP_SUBDIRS libnetworking"
135  AS_IF([test "$RTEMS_HAS_RDBG" = "yes"],[
136    RTEMS_CHECK_RDBG(RTEMS_BSP)
137  ])
138])
139
140AS_IF([test "$HAS_RDBG" = "yes"],[
141  AC_CONFIG_SUBDIRS([librdbg])
142  BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
143])
144
145AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
146  AC_CONFIG_SUBDIRS([librtems++])
147  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
148])
149
150BSP_SUBDIRS="$BSP_SUBDIRS support"
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([support/Makefile wrapup/Makefile])
194
195AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.