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

4.104.114.84.95
Last change on this file since a77cd066 was 1ca7bc9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/02/03 at 07:50:43

2003-12-02 Ralf Corsepius <corsepiu@…>

  • configure.ac: Remove libchip/ide/Makefile, libchip/network/Makefile, libchip/serial/Makefile, libchip/rtc/Makefile.
  • Property mode set to 100644
File size: 6.9 KB
RevLine 
[d7aecdc]1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
[9b5c258]5AC_PREREQ(2.57)
[7dcc3fe]6AC_INIT([rtems-c-src],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
[02ccf4a]7AC_CONFIG_SRCDIR([optman])
[d7aecdc]8RTEMS_TOP(../..)
9
10RTEMS_ENABLE_CXX
11RTEMS_ENABLE_NETWORKING
12RTEMS_ENABLE_RDBG
13
14RTEMS_CANONICAL_TARGET_CPU
15
[ccd81b60]16AM_INIT_AUTOMAKE([no-define foreign 1.7.2])
[d7aecdc]17AM_MAINTAINER_MODE
18
19RTEMS_ENABLE_MULTILIB
[02ccf4a]20RTEMS_ENABLE_MULTIPROCESSING
[d7aecdc]21RTEMS_ENV_RTEMSBSP
[51d35b2]22
23# Is this a supported CPU?
24AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
25# FIXME: Temporary hack
26if test -d "$srcdir/lib/libbsp/$RTEMS_CPU"; then
27  AC_MSG_RESULT(yes)
28else
29  AC_MSG_ERROR(no)
30fi
31
[d7aecdc]32RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
33
34RTEMS_CHECK_NETWORKING(RTEMS_BSP)
[4108ae8]35RTEMS_CHECK_POSIX_API(RTEMS_BSP)
36AS_IF([test "$HAS_NETWORKING" = "yes"],[
37  AS_IF([test "$RTEMS_HAS_RDBG" = "yes"],[
38    RTEMS_CHECK_RDBG(RTEMS_BSP)
39  ])
40])
41
42AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen,no)
43AC_PROG_AWK
[d7aecdc]44
[f0d7515]45AC_MSG_NOTICE([setting up make/custom])
46
47AS_MKDIR_P([make/custom])
48
49# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
50# directory into the build tree's <bsp>/make/custom subdirectories
51cfg_dir="${RTEMS_TOPdir}/make"
52CUSTOM_CFG_FILES=""
53f="${RTEMS_BSP}.cfg"
54while test -n "$f"; do
55  if test -r "${srcdir}/${cfg_dir}/custom/$f"; then
56    cp ${srcdir}/${cfg_dir}/custom/$f make/custom/$f
57    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
58    f=`grep "^include.*make/custom" ${srcdir}/${cfg_dir}/custom/$f \
59    | sed \
60      -e 's%^.*custom\/%%' \
61      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
62      -e 's%default\.cfg%%'`;
63  else break; fi;
64done
65cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
66
67AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
[f21ccd2]68${MAKE-make} -f ${srcdir}/make/bsp.mak \
69RTEMS_BSP=${RTEMS_BSP} \
[67bfd9a6]70RTEMS_HOST=${RTEMS_HOST} \
[f21ccd2]71BARE_CPU_MODEL=${BARE_CPU_MODEL} \
[f0d7515]72RTEMS_ROOT=. make/${RTEMS_BSP}.cache
73
74# Read back the cache
[9346df0]75AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
[da499ad]76[. ./make/${RTEMS_BSP}.cache])
[9346df0]77RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
[028792e8]78AC_SUBST(RTEMS_CPU_MODEL)
[d4181d5]79test -n "${RTEMS_CPU_MODEL}" && \
80  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
[028792e8]81
[9346df0]82AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
[da499ad]83[. ./make/${RTEMS_BSP}.cache])
[9346df0]84RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
[028792e8]85AC_SUBST(RTEMS_BSP_FAMILY)
[d4181d5]86test -n "${RTEMS_BSP_FAMILY}" && \
87  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
[028792e8]88
[9346df0]89AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
[da499ad]90[. ./make/${RTEMS_BSP}.cache])
[9346df0]91CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
92AC_SUBST(CPU_CFLAGS)
93test -n "${CPU_CFLAGS}" && \
94  ac_configure_args="$ac_configure_args 'CPU_CFLAGS=${CPU_CFLAGS}'"
[028792e8]95
[9346df0]96AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
[da499ad]97[. ./make/${RTEMS_BSP}.cache])
[9346df0]98CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
99AC_SUBST(CFLAGS_OPTIMIZE_V)
100test -n "${CFLAGS_OPTIMIZE_V}" && \
101  ac_configure_args="$ac_configure_args 'CFLAGS_OPTIMIZE_V=${CFLAGS_OPTIMIZE_V}'"
[028792e8]102
[9346df0]103AC_CACHE_CHECK([for CFLAGS_DEBUG_V],[ac_cv_env_CFLAGS_DEBUG_V],
[da499ad]104[. ./make/${RTEMS_BSP}.cache])
[9346df0]105CFLAGS_DEBUG_V=$ac_cv_env_CFLAGS_DEBUG_V
106AC_SUBST(CFLAGS_DEBUG_V)
107test -n "${CFLAGS_DEBUG_V}" && \
108  ac_configure_args="$ac_configure_args 'CFLAGS_DEBUG_V=${CFLAGS_DEBUG_V}'"
[028792e8]109
[9346df0]110RTEMS_PROG_CC_FOR_TARGET
111RTEMS_CANONICALIZE_TOOLS
[d4181d5]112
[382e1eb3]113
[f0d7515]114AC_SUBST(CUSTOM_CFG_FILES)
115AC_SUBST(cfg_dir)
116
[54508fd]117## Configure ${srcdir}/../../cpukit as exec/ if multilibs are disabled
[02ccf4a]118AS_IF([test x"$multilib" = x"no"],[
119  RTEMS_CHECK_MULTIPROCESSING
[94f4a9ba]120  RTEMS_CONFIG_SUBDIR([exec],[../../cpukit],
[54508fd]121  ['--with-project-root=../../' '--enable-rtemsbsp=$RTEMS_BSP'
[94f4a9ba]122  ])
[85a8933]123  BSP_SUBDIRS="exec"
[02ccf4a]124])
125
[94f4a9ba]126## Note: the order of the directories below is essential
127AC_CONFIG_SUBDIRS([make])
[85a8933]128BSP_SUBDIRS="$BSP_SUBDIRS make"
129BSP_SUBDIRS="$BSP_SUBDIRS optman"
[dd984c0]130
131RTEMS_CPU_SUBDIRS(lib/libcpu)
[539e266e]132if test -d "${srcdir}/lib/libcpu/${RTEMS_CPU}"; then
[dd984c0]133  libcpu_cpu_subdir="${RTEMS_CPU}"
134else
135  libcpu_cpu_subdir=
136fi
137AC_SUBST(libcpu_cpu_subdir)
138
139# Is there code where there should be for this BSP?
140# The bare bsp is a special case as it is not under the RTEMS_CPU path
141if test "$RTEMS_BSP_FAMILY" = "bare" ; then
142  AC_CONFIG_SUBDIRS([lib/libbsp/bare])
143  AC_SUBST(libbsp_cpu_subdir,bare)
144else
145  RTEMS_CPU_SUBDIRS([lib/libbsp])
146  AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
147fi
148
[539e266e]149BSP_SUBDIRS="$BSP_SUBDIRS lib"
[4108ae8]150BSP_SUBDIRS="$BSP_SUBDIRS libchip"
151BSP_SUBDIRS="$BSP_SUBDIRS libnetworking"
[6fcf4571]152BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
[dd984c0]153                                                         
[94f4a9ba]154AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
[4db904ec]155  AC_CONFIG_SUBDIRS([librtems++])
[85a8933]156  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
[94f4a9ba]157])
[d7aecdc]158
[db3e91f2]159BSP_SUBDIRS="$BSP_SUBDIRS support"
[85a8933]160BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
[a456af96]161
[54508fd]162AC_ARG_ENABLE([ada],
163[AC_HELP_STRING([--enable-ada],[enable ada support])],
164[case "${enable_ada}" in
165  yes) ;;
166  no) ;;
167  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
168esac],[enable_ada=no])
169
[a456af96]170AS_IF([test x"$enable_ada" = x"yes"],[
171  AS_IF([test -d ${srcdir}/ada-tests],[
172    AC_CONFIG_SUBDIRS([ada-tests])
173    BSP_SUBDIRS="$BSP_SUBDIRS ada-tests"
174  ])
175])
176
[e42cb8b]177AS_IF([test -d ${srcdir}/../../testsuites],[
178  RTEMS_CONFIG_SUBDIR([testsuites],[../../testsuites],
179  ['--with-project-root=../../' '--enable-rtemsbsp=$RTEMS_BSP'
180  ])
181  BSP_SUBDIRS="$BSP_SUBDIRS testsuites"
[0038885]182])
[85a8933]183
184AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
[d7aecdc]185
[babba25a]186AS_IF([test "$host_cpu" = "sparc"],[
187  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
188    [whether to enable ipalignment work-around])
189])
190
[67bfd9a6]191AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
192AM_CONDITIONAL([HAS_RDBG],[test "$HAS_RDBG" = "yes"])
[4108ae8]193AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes")
[dd984c0]194AM_CONDITIONAL([HAS_MP],[test "$HAS_MP" = "yes"])
[67bfd9a6]195
196# The posix bsp doesn't support libchip
197# FIXME: We should use a feature based check, here
198AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
[94f4a9ba]199
200# The bare bsp doesn't have libbsp.a
201# FIXME: We should use a feature based check, here
[6184265d]202AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
[94f4a9ba]203AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
204
[4108ae8]205AM_CONDITIONAL(RPCTOOLS, test "$rpctools" != "no")
206
[d7aecdc]207RTEMS_PROJECT_ROOT
208
209# Explicitly list all Makefiles here
[f0d7515]210AC_CONFIG_FILES([Makefile],
211[${MAKE} make/${RTEMS_BSP}.cache],
212[RTEMS_BSP=${RTEMS_BSP}
213 MAKE=${MAKE}])
214
[babba25a]215AC_CONFIG_FILES([
216support/Makefile
[4108ae8]217
218libnetworking/Makefile
219libnetworking/pppd/Makefile
220libnetworking/rtems_servers/Makefile
221libnetworking/rtems_telnetd/Makefile
222libnetworking/rtems_webserver/Makefile
223libnetworking/wrapup/Makefile
224
[6fcf4571]225librdbg/Makefile
226librdbg/include/Makefile
227librdbg/include/rdbg/Makefile
228librdbg/include/rdbg/i386/Makefile
229librdbg/include/rdbg/powerpc/Makefile
230librdbg/include/rdbg/m68k/Makefile
231librdbg/src/Makefile
232librdbg/src/i386/Makefile
233librdbg/src/i386/any/Makefile
234librdbg/src/powerpc/Makefile
235librdbg/src/powerpc/new_exception_processing/Makefile
236librdbg/src/m68k/Makefile
237librdbg/src/m68k/any/Makefile
238
[babba25a]239libchip/Makefile
[6fcf4571]240
[babba25a]241optman/Makefile
[6fcf4571]242
[539e266e]243lib/Makefile
244
[dd984c0]245lib/libcpu/Makefile
246
247lib/libbsp/Makefile
248lib/libbsp/shmdr/Makefile
249lib/libbsp/shared/Makefile
250
[babba25a]251wrapup/Makefile
252])
[94f4a9ba]253
[d7aecdc]254AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.