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

4.104.114.84.9
Last change on this file since da499ad was da499ad, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jul 25, 2003 at 3:50:07 PM

2003-07-25 Ralf Corsepius <corsepiu@…>

  • configure.ac: Use relative dir to make/${RTEMS_BSP}.cache.
  • Property mode set to 100644
File size: 6.1 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@OARcorp.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)
27RTEMS_CHECK_POSIX_API(RTEMS_BSP)
28AS_IF([test "$HAS_NETWORKING" = "yes"],[
29  AS_IF([test "$RTEMS_HAS_RDBG" = "yes"],[
30    RTEMS_CHECK_RDBG(RTEMS_BSP)
31  ])
32])
33
34AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen,no)
35AC_PROG_AWK
36
37AC_MSG_NOTICE([setting up make/custom])
38
39AS_MKDIR_P([make/custom])
40
41# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
42# directory into the build tree's <bsp>/make/custom subdirectories
43cfg_dir="${RTEMS_TOPdir}/make"
44CUSTOM_CFG_FILES=""
45f="${RTEMS_BSP}.cfg"
46while test -n "$f"; do
47  if test -r "${srcdir}/${cfg_dir}/custom/$f"; then
48    cp ${srcdir}/${cfg_dir}/custom/$f make/custom/$f
49    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
50    f=`grep "^include.*make/custom" ${srcdir}/${cfg_dir}/custom/$f \
51    | sed \
52      -e 's%^.*custom\/%%' \
53      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
54      -e 's%default\.cfg%%'`;
55  else break; fi;
56done
57cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
58
59AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
60${MAKE-make} -f ${srcdir}/make/bsp.mak \
61RTEMS_BSP=${RTEMS_BSP} \
62RTEMS_HOST=${RTEMS_HOST} \
63BARE_CPU_MODEL=${BARE_CPU_MODEL} \
64RTEMS_ROOT=. make/${RTEMS_BSP}.cache
65
66# Read back the cache
67AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
68[. ./make/${RTEMS_BSP}.cache])
69RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
70AC_SUBST(RTEMS_CPU_MODEL)
71test -n "${RTEMS_CPU_MODEL}" && \
72  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
73
74AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
75[. ./make/${RTEMS_BSP}.cache])
76RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
77AC_SUBST(RTEMS_BSP_FAMILY)
78test -n "${RTEMS_BSP_FAMILY}" && \
79  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
80
81AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
82[. ./make/${RTEMS_BSP}.cache])
83CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
84AC_SUBST(CPU_CFLAGS)
85test -n "${CPU_CFLAGS}" && \
86  ac_configure_args="$ac_configure_args 'CPU_CFLAGS=${CPU_CFLAGS}'"
87
88AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
89[. ./make/${RTEMS_BSP}.cache])
90CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
91AC_SUBST(CFLAGS_OPTIMIZE_V)
92test -n "${CFLAGS_OPTIMIZE_V}" && \
93  ac_configure_args="$ac_configure_args 'CFLAGS_OPTIMIZE_V=${CFLAGS_OPTIMIZE_V}'"
94
95AC_CACHE_CHECK([for CFLAGS_DEBUG_V],[ac_cv_env_CFLAGS_DEBUG_V],
96[. ./make/${RTEMS_BSP}.cache])
97CFLAGS_DEBUG_V=$ac_cv_env_CFLAGS_DEBUG_V
98AC_SUBST(CFLAGS_DEBUG_V)
99test -n "${CFLAGS_DEBUG_V}" && \
100  ac_configure_args="$ac_configure_args 'CFLAGS_DEBUG_V=${CFLAGS_DEBUG_V}'"
101
102RTEMS_PROG_CC_FOR_TARGET
103RTEMS_CANONICALIZE_TOOLS
104
105
106AC_SUBST(CUSTOM_CFG_FILES)
107AC_SUBST(cfg_dir)
108
109## Configure ${srcdir}/../../cpukit as exec/ if multilibs are disabled
110AS_IF([test x"$multilib" = x"no"],[
111  RTEMS_CHECK_MULTIPROCESSING
112  RTEMS_CONFIG_SUBDIR([exec],[../../cpukit],
113  ['--with-project-root=../../' '--enable-rtemsbsp=$RTEMS_BSP'
114  ])
115  BSP_SUBDIRS="exec"
116])
117
118## Note: the order of the directories below is essential
119AC_CONFIG_SUBDIRS([make])
120BSP_SUBDIRS="$BSP_SUBDIRS make"
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"
126BSP_SUBDIRS="$BSP_SUBDIRS libchip"
127BSP_SUBDIRS="$BSP_SUBDIRS libnetworking"
128BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
129
130AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
131  AC_CONFIG_SUBDIRS([librtems++])
132  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
133])
134
135BSP_SUBDIRS="$BSP_SUBDIRS support"
136BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
137
138AC_ARG_ENABLE([ada],
139[AC_HELP_STRING([--enable-ada],[enable ada support])],
140[case "${enable_ada}" in
141  yes) ;;
142  no) ;;
143  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
144esac],[enable_ada=no])
145
146AS_IF([test x"$enable_ada" = x"yes"],[
147  AS_IF([test -d ${srcdir}/ada-tests],[
148    AC_CONFIG_SUBDIRS([ada-tests])
149    BSP_SUBDIRS="$BSP_SUBDIRS ada-tests"
150  ])
151])
152
153AC_CONFIG_SUBDIRS([tests])
154BSP_SUBDIRS="$BSP_SUBDIRS tests"
155
156AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
157
158AS_IF([test "$host_cpu" = "sparc"],[
159  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
160    [whether to enable ipalignment work-around])
161])
162
163AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
164AM_CONDITIONAL([HAS_RDBG],[test "$HAS_RDBG" = "yes"])
165AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes")
166
167# The posix bsp doesn't support libchip
168# FIXME: We should use a feature based check, here
169AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
170
171# The bare bsp doesn't have libbsp.a
172# FIXME: We should use a feature based check, here
173AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
174AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
175
176AM_CONDITIONAL(RPCTOOLS, test "$rpctools" != "no")
177
178RTEMS_PROJECT_ROOT
179
180# Explicitly list all Makefiles here
181AC_CONFIG_FILES([Makefile],
182[${MAKE} make/${RTEMS_BSP}.cache],
183[RTEMS_BSP=${RTEMS_BSP}
184 MAKE=${MAKE}])
185
186AC_CONFIG_FILES([
187support/Makefile
188
189libnetworking/Makefile
190libnetworking/pppd/Makefile
191libnetworking/rtems_servers/Makefile
192libnetworking/rtems_telnetd/Makefile
193libnetworking/rtems_webserver/Makefile
194libnetworking/wrapup/Makefile
195
196librdbg/Makefile
197librdbg/include/Makefile
198librdbg/include/rdbg/Makefile
199librdbg/include/rdbg/i386/Makefile
200librdbg/include/rdbg/powerpc/Makefile
201librdbg/include/rdbg/m68k/Makefile
202librdbg/src/Makefile
203librdbg/src/i386/Makefile
204librdbg/src/i386/any/Makefile
205librdbg/src/powerpc/Makefile
206librdbg/src/powerpc/new_exception_processing/Makefile
207librdbg/src/m68k/Makefile
208librdbg/src/m68k/any/Makefile
209
210libchip/Makefile
211libchip/network/Makefile
212libchip/rtc/Makefile
213libchip/serial/Makefile
214libchip/ide/Makefile
215
216optman/Makefile
217
218wrapup/Makefile
219])
220
221AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.