source: rtems/c/src/configure.ac @ 3299388d

4.104.114.84.95
Last change on this file since 3299388d was 3a99e6f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/17/03 at 13:31:49

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

  • configure.ac: Remove stray comments.
  • automake/local.am, automake/host.am: Remove "debug".
  • Property mode set to 100644
File size: 6.7 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
15RTEMS_CANONICAL_HOST
16
[ccd81b60]17AM_INIT_AUTOMAKE([no-define foreign 1.7.2])
[d7aecdc]18AM_MAINTAINER_MODE
19
20RTEMS_ENABLE_MULTILIB
[02ccf4a]21RTEMS_ENABLE_MULTIPROCESSING
[d7aecdc]22RTEMS_ENV_RTEMSBSP
23RTEMS_CHECK_CPU
24RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
25
26RTEMS_CHECK_NETWORKING(RTEMS_BSP)
[4108ae8]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
[d7aecdc]36
[f0d7515]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])
[f21ccd2]60${MAKE-make} -f ${srcdir}/make/bsp.mak \
61RTEMS_BSP=${RTEMS_BSP} \
[67bfd9a6]62RTEMS_HOST=${RTEMS_HOST} \
[f21ccd2]63BARE_CPU_MODEL=${BARE_CPU_MODEL} \
[f0d7515]64RTEMS_ROOT=. make/${RTEMS_BSP}.cache
65
66# Read back the cache
[9346df0]67AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
[da499ad]68[. ./make/${RTEMS_BSP}.cache])
[9346df0]69RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
[028792e8]70AC_SUBST(RTEMS_CPU_MODEL)
[d4181d5]71test -n "${RTEMS_CPU_MODEL}" && \
72  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
[028792e8]73
[9346df0]74AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
[da499ad]75[. ./make/${RTEMS_BSP}.cache])
[9346df0]76RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
[028792e8]77AC_SUBST(RTEMS_BSP_FAMILY)
[d4181d5]78test -n "${RTEMS_BSP_FAMILY}" && \
79  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
[028792e8]80
[9346df0]81AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
[da499ad]82[. ./make/${RTEMS_BSP}.cache])
[9346df0]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}'"
[028792e8]87
[9346df0]88AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
[da499ad]89[. ./make/${RTEMS_BSP}.cache])
[9346df0]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}'"
[028792e8]94
[9346df0]95AC_CACHE_CHECK([for CFLAGS_DEBUG_V],[ac_cv_env_CFLAGS_DEBUG_V],
[da499ad]96[. ./make/${RTEMS_BSP}.cache])
[9346df0]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}'"
[028792e8]101
[9346df0]102RTEMS_PROG_CC_FOR_TARGET
103RTEMS_CANONICALIZE_TOOLS
[d4181d5]104
[382e1eb3]105
[f0d7515]106AC_SUBST(CUSTOM_CFG_FILES)
107AC_SUBST(cfg_dir)
108
[54508fd]109## Configure ${srcdir}/../../cpukit as exec/ if multilibs are disabled
[02ccf4a]110AS_IF([test x"$multilib" = x"no"],[
111  RTEMS_CHECK_MULTIPROCESSING
[94f4a9ba]112  RTEMS_CONFIG_SUBDIR([exec],[../../cpukit],
[54508fd]113  ['--with-project-root=../../' '--enable-rtemsbsp=$RTEMS_BSP'
[94f4a9ba]114  ])
[85a8933]115  BSP_SUBDIRS="exec"
[02ccf4a]116])
117
[94f4a9ba]118## Note: the order of the directories below is essential
119AC_CONFIG_SUBDIRS([make])
[85a8933]120BSP_SUBDIRS="$BSP_SUBDIRS make"
121BSP_SUBDIRS="$BSP_SUBDIRS optman"
[dd984c0]122
123RTEMS_CPU_SUBDIRS(lib/libcpu)
[539e266e]124if test -d "${srcdir}/lib/libcpu/${RTEMS_CPU}"; then
[dd984c0]125  libcpu_cpu_subdir="${RTEMS_CPU}"
126else
127  libcpu_cpu_subdir=
128fi
129AC_SUBST(libcpu_cpu_subdir)
130
131# Is there code where there should be for this BSP?
132# The bare bsp is a special case as it is not under the RTEMS_CPU path
133if test "$RTEMS_BSP_FAMILY" = "bare" ; then
134  AC_CONFIG_SUBDIRS([lib/libbsp/bare])
135  AC_SUBST(libbsp_cpu_subdir,bare)
136else
137  RTEMS_CPU_SUBDIRS([lib/libbsp])
138  AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
139fi
140
[539e266e]141BSP_SUBDIRS="$BSP_SUBDIRS lib"
[4108ae8]142BSP_SUBDIRS="$BSP_SUBDIRS libchip"
143BSP_SUBDIRS="$BSP_SUBDIRS libnetworking"
[6fcf4571]144BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
[dd984c0]145                                                         
[94f4a9ba]146AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
[4db904ec]147  AC_CONFIG_SUBDIRS([librtems++])
[85a8933]148  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
[94f4a9ba]149])
[d7aecdc]150
[db3e91f2]151BSP_SUBDIRS="$BSP_SUBDIRS support"
[85a8933]152BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
[a456af96]153
[54508fd]154AC_ARG_ENABLE([ada],
155[AC_HELP_STRING([--enable-ada],[enable ada support])],
156[case "${enable_ada}" in
157  yes) ;;
158  no) ;;
159  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
160esac],[enable_ada=no])
161
[a456af96]162AS_IF([test x"$enable_ada" = x"yes"],[
163  AS_IF([test -d ${srcdir}/ada-tests],[
164    AC_CONFIG_SUBDIRS([ada-tests])
165    BSP_SUBDIRS="$BSP_SUBDIRS ada-tests"
166  ])
167])
168
[4db904ec]169AC_CONFIG_SUBDIRS([tests])
[85a8933]170BSP_SUBDIRS="$BSP_SUBDIRS tests"
171
172AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
[d7aecdc]173
[babba25a]174AS_IF([test "$host_cpu" = "sparc"],[
175  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
176    [whether to enable ipalignment work-around])
177])
178
[67bfd9a6]179AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
180AM_CONDITIONAL([HAS_RDBG],[test "$HAS_RDBG" = "yes"])
[4108ae8]181AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes")
[dd984c0]182AM_CONDITIONAL([HAS_MP],[test "$HAS_MP" = "yes"])
[67bfd9a6]183
184# The posix bsp doesn't support libchip
185# FIXME: We should use a feature based check, here
186AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
[94f4a9ba]187
188# The bare bsp doesn't have libbsp.a
189# FIXME: We should use a feature based check, here
[6184265d]190AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
[94f4a9ba]191AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
192
[4108ae8]193AM_CONDITIONAL(RPCTOOLS, test "$rpctools" != "no")
194
[d7aecdc]195RTEMS_PROJECT_ROOT
196
197# Explicitly list all Makefiles here
[f0d7515]198AC_CONFIG_FILES([Makefile],
199[${MAKE} make/${RTEMS_BSP}.cache],
200[RTEMS_BSP=${RTEMS_BSP}
201 MAKE=${MAKE}])
202
[babba25a]203AC_CONFIG_FILES([
204support/Makefile
[4108ae8]205
206libnetworking/Makefile
207libnetworking/pppd/Makefile
208libnetworking/rtems_servers/Makefile
209libnetworking/rtems_telnetd/Makefile
210libnetworking/rtems_webserver/Makefile
211libnetworking/wrapup/Makefile
212
[6fcf4571]213librdbg/Makefile
214librdbg/include/Makefile
215librdbg/include/rdbg/Makefile
216librdbg/include/rdbg/i386/Makefile
217librdbg/include/rdbg/powerpc/Makefile
218librdbg/include/rdbg/m68k/Makefile
219librdbg/src/Makefile
220librdbg/src/i386/Makefile
221librdbg/src/i386/any/Makefile
222librdbg/src/powerpc/Makefile
223librdbg/src/powerpc/new_exception_processing/Makefile
224librdbg/src/m68k/Makefile
225librdbg/src/m68k/any/Makefile
226
[babba25a]227libchip/Makefile
228libchip/network/Makefile
229libchip/rtc/Makefile
230libchip/serial/Makefile
231libchip/ide/Makefile
[6fcf4571]232
[babba25a]233optman/Makefile
[6fcf4571]234
[539e266e]235lib/Makefile
236
[dd984c0]237lib/libcpu/Makefile
238
239lib/libbsp/Makefile
240lib/libbsp/shmdr/Makefile
241lib/libbsp/shared/Makefile
242
[babba25a]243wrapup/Makefile
244])
[94f4a9ba]245
[d7aecdc]246AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.