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

4.104.114.84.95
Last change on this file since a7479f2 was fcb0cd46, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/02/06 at 06:06:55

2006-12-02 Ralf Corsépius <ralf.corsepius@…>

  • configure.ac: New BUG-REPORT address.
  • Property mode set to 100644
File size: 7.6 KB
RevLine 
[d7aecdc]1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
[ba2c04f]5AC_PREREQ(2.60)
[fcb0cd46]6AC_INIT([rtems-c-src],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
[02ccf4a]7AC_CONFIG_SRCDIR([optman])
[d7aecdc]8RTEMS_TOP(../..)
9
10RTEMS_ENABLE_CXX
11RTEMS_ENABLE_NETWORKING
12RTEMS_ENABLE_RDBG
13
14RTEMS_CANONICAL_TARGET_CPU
15
[ba2c04f]16AM_INIT_AUTOMAKE([no-define subdir-objects no-exeext foreign 1.10])
[d7aecdc]17AM_MAINTAINER_MODE
18
19RTEMS_ENABLE_MULTILIB
[02ccf4a]20RTEMS_ENABLE_MULTIPROCESSING
[d7aecdc]21RTEMS_ENV_RTEMSBSP
[51d35b2]22
[62fdded]23AC_ARG_ENABLE(rpcgen,
24[AS_HELP_STRING([--enable-rpcgen],[rebuild rpcgen-generated sources])],
25[case "${enable_rpcgen}" in
26  yes) enable_rpcgen=yes ;;
27  no) enable_rpcgen=no ;;
28  *)  enable_rpcgen=no ;;
[005fbe56]29esac],[enable_rpcgen=no])
[62fdded]30
[d7aecdc]31RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
32
33RTEMS_CHECK_NETWORKING(RTEMS_BSP)
[4108ae8]34RTEMS_CHECK_POSIX_API(RTEMS_BSP)
35
[62fdded]36AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen)
[4108ae8]37AC_PROG_AWK
[d7aecdc]38
[f0d7515]39AC_MSG_NOTICE([setting up make/custom])
40
41AS_MKDIR_P([make/custom])
[9bb5b9d]42AM_SET_DEPDIR
43test -d ${DEPDIR} || mkdir ${DEPDIR}
44
45rm -f ${DEPDIR}/cfg.P
46echo "# Do not edit - automatically generated by" > ${DEPDIR}/cfg.P
47echo "# $0" >> ${DEPDIR}/cfg.P
[f0d7515]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
[9bb5b9d]51CUSTOM_CFG_FILES=
[f0d7515]52f="${RTEMS_BSP}.cfg"
53while test -n "$f"; do
[9bb5b9d]54  cfg_file=
55  _RTEMS_CHECK_CUSTOM_BSP([$f],cfg_file)
56  if test -n "${cfg_file}"; then
57    cp ${cfg_file} make/custom/$f
58    echo "make/custom/$f: ${cfg_file}" >> ${DEPDIR}/cfg.P
59    echo "      cp ${cfg_file} make/custom/$f" >> ${DEPDIR}/cfg.P
[f0d7515]60    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
[9bb5b9d]61    f=`grep "^include.*make/custom" ${cfg_file} \
[f0d7515]62    | sed \
63      -e 's%^.*custom\/%%' \
64      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
65      -e 's%default\.cfg%%'`;
66  else break; fi;
67done
68cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
69
70AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
[f21ccd2]71${MAKE-make} -f ${srcdir}/make/bsp.mak \
72RTEMS_BSP=${RTEMS_BSP} \
[67bfd9a6]73RTEMS_HOST=${RTEMS_HOST} \
[f0d7515]74RTEMS_ROOT=. make/${RTEMS_BSP}.cache
75
76# Read back the cache
[9346df0]77AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
[da499ad]78[. ./make/${RTEMS_BSP}.cache])
[9346df0]79RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
[028792e8]80AC_SUBST(RTEMS_CPU_MODEL)
[d4181d5]81test -n "${RTEMS_CPU_MODEL}" && \
82  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
[028792e8]83
[9346df0]84AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
[da499ad]85[. ./make/${RTEMS_BSP}.cache])
[9346df0]86RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
[028792e8]87AC_SUBST(RTEMS_BSP_FAMILY)
[d4181d5]88test -n "${RTEMS_BSP_FAMILY}" && \
89  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
[028792e8]90
[9346df0]91AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
[da499ad]92[. ./make/${RTEMS_BSP}.cache])
[9346df0]93CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
[028792e8]94
[9346df0]95AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
[da499ad]96[. ./make/${RTEMS_BSP}.cache])
[9346df0]97CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
[f8235c07]98
99CFLAGS="${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}"
100AS_IF([test x"${CFLAGS}" != x" "],[
101  ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"])
[028792e8]102
[9346df0]103RTEMS_PROG_CC_FOR_TARGET
[d844a182]104AM_PROG_CC_C_O
[033f0686]105RTEMS_PROG_CCAS
[9346df0]106RTEMS_CANONICALIZE_TOOLS
[382e1eb3]107
[d7610229]108AS_IF([test "$HAS_NETWORKING" = "yes"],[
109  AS_IF([test "$RTEMS_HAS_RDBG" = "yes"],[
110    RTEMS_CHECK_RDBG(RTEMS_BSP)
111  ])
112])
113
[d71ab7fd]114RTEMS_CHECK_GCC_WEAK
115
[f0d7515]116AC_SUBST(CUSTOM_CFG_FILES)
117AC_SUBST(cfg_dir)
118
[e7495ae]119RTEMS_CHECK_MULTIPROCESSING
120
[789694a1]121BSP_SUBDIRS=
[a03c1ab]122## Configure ${srcdir}/../../cpukit as cpukit/ if multilibs are disabled
[789694a1]123RTEMS_BSP_CONFIG_SUBDIR(
124  [cpukit],[../../cpukit],
[850c88d]125  ['--with-project-root=${with_project_root}../$RTEMS_BSP/' \
[cdf41b07]126   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
[ea3f559]127   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
[6c2b5324]128  ],
[259c516]129  [test x"$multilib" = xno])
[02ccf4a]130
[94f4a9ba]131## Note: the order of the directories below is essential
132AC_CONFIG_SUBDIRS([make])
[85a8933]133BSP_SUBDIRS="$BSP_SUBDIRS make"
[dd984c0]134
135RTEMS_CPU_SUBDIRS(lib/libcpu)
[539e266e]136if test -d "${srcdir}/lib/libcpu/${RTEMS_CPU}"; then
[dd984c0]137  libcpu_cpu_subdir="${RTEMS_CPU}"
138else
139  libcpu_cpu_subdir=
140fi
141AC_SUBST(libcpu_cpu_subdir)
142
143# Is there code where there should be for this BSP?
144# The bare bsp is a special case as it is not under the RTEMS_CPU path
[259c516]145if test "$RTEMS_BSP_FAMILY" = bare ; then
[dd984c0]146  AC_CONFIG_SUBDIRS([lib/libbsp/bare])
147  AC_SUBST(libbsp_cpu_subdir,bare)
148else
149  RTEMS_CPU_SUBDIRS([lib/libbsp])
150  AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
151fi
152
[539e266e]153BSP_SUBDIRS="$BSP_SUBDIRS lib"
[4108ae8]154BSP_SUBDIRS="$BSP_SUBDIRS libchip"
[6fcf4571]155BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
[832bed1]156
[94f4a9ba]157AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
[4db904ec]158  AC_CONFIG_SUBDIRS([librtems++])
[85a8933]159  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
[94f4a9ba]160])
[d7aecdc]161
[db3e91f2]162BSP_SUBDIRS="$BSP_SUBDIRS support"
[aea8e66]163BSP_SUBDIRS="$BSP_SUBDIRS ada"
[85a8933]164BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
[a456af96]165
[ee950a33]166BSP_SUBDIRS="$BSP_SUBDIRS optman"
167
[54508fd]168AC_ARG_ENABLE([ada],
[a03c1ab]169[AS_HELP_STRING(--enable-ada,enable ada support)],
[54508fd]170[case "${enable_ada}" in
171  yes) ;;
172  no) ;;
173  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
174esac],[enable_ada=no])
175
[259c516]176RTEMS_BSP_CONFIG_SUBDIR(
177  [ada-tests],[ada-tests],
178  ['--enable-rtems-root=../' \
[a4a40dac]179   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
[259c516]180   '--with-project-top=${with_project_top}../' \
181   '--enable-rtemsbsp=$RTEMS_BSP' \
182  ],
183  [test x"$enable_tests" = xyes && test x"$enable_ada" = xyes])
[a456af96]184
[3f74676]185# HACK ALERT!
186
187# FIXME: Assume multilib implies in-source-tree multilibs
188# Build testsuites multilibbed
[789694a1]189RTEMS_BSP_CONFIG_SUBDIR(
190  [testsuites],[../../testsuites],
[850c88d]191  ['--enable-rtems-root=../' \
[3f74676]192   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
193   '--with-project-top=${with_project_top}../' \
194   '--enable-rtemsbsp=$RTEMS_BSP' \
[3136ff03]195   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
196   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
[3f74676]197  ],
198  [test x"$enable_tests" != x"no" && test x"$multilib" = xno])
199
200# Build testsuites non-multilibbed
201RTEMS_BSP_CONFIG_SUBDIR(
202  [testsuites],[../../testsuites],
203  ['--enable-rtems-root=../' \
204   '--enable-cpukit-root=${with_project_root}..' \
205   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
[850c88d]206   '--with-project-top=${with_project_top}../' \
[789694a1]207   '--enable-rtemsbsp=$RTEMS_BSP' \
[3136ff03]208   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
209   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
[6c2b5324]210  ],
[3f74676]211  [test x"$enable_tests" != x"no" && test x"$multilib" = xyes])
[41fc78d]212
[85a8933]213AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
[d7aecdc]214
[259c516]215AS_IF([test "$host_cpu" = sparc],[
[babba25a]216  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
217    [whether to enable ipalignment work-around])
218])
219
[67bfd9a6]220AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
[832bed1]221
222# FIXME: This is sick
[67bfd9a6]223AM_CONDITIONAL([HAS_RDBG],[test "$HAS_RDBG" = "yes"])
[832bed1]224AM_CONDITIONAL([HAS_RDBG_i386],[test "$HAS_RDBG" = "yes" \
225 && test $RTEMS_CPU = "i386"])
226AM_CONDITIONAL([HAS_RDBG_m68k],[test "$HAS_RDBG" = "yes" \
227 && test $RTEMS_CPU = "m68k"])
228AM_CONDITIONAL([HAS_RDBG_powerpc],[test "$HAS_RDBG" = "yes" \
229 && test $RTEMS_CPU = "powerpc"])
230
[4108ae8]231AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes")
[67bfd9a6]232
233# The posix bsp doesn't support libchip
234# FIXME: We should use a feature based check, here
235AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
[94f4a9ba]236
237# The bare bsp doesn't have libbsp.a
238# FIXME: We should use a feature based check, here
[6184265d]239AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
[12b0ada]240
[94f4a9ba]241AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
242
[62fdded]243AM_CONDITIONAL([RPCTOOLS],[test "$RPCGEN" = rpcgen \
244&& test -n "$AWK" \
245&& test "$enable_rpcgen" = yes])
[4108ae8]246
[aea8e66]247AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
248  && test x"$rtems_cv_HAS_POSIX_API" = x"yes"])
249
[d7aecdc]250RTEMS_PROJECT_ROOT
[b826c3a]251
[d7aecdc]252# Explicitly list all Makefiles here
[f0d7515]253AC_CONFIG_FILES([Makefile],
254[${MAKE} make/${RTEMS_BSP}.cache],
255[RTEMS_BSP=${RTEMS_BSP}
256 MAKE=${MAKE}])
257
[babba25a]258AC_CONFIG_FILES([
259support/Makefile
[4108ae8]260
[6fcf4571]261librdbg/Makefile
262
[babba25a]263libchip/Makefile
[6fcf4571]264
[babba25a]265optman/Makefile
[6fcf4571]266
[539e266e]267lib/Makefile
268
[dd984c0]269lib/libcpu/Makefile
270
271lib/libbsp/Makefile
272
[aea8e66]273ada/Makefile
274
[babba25a]275wrapup/Makefile
276])
[94f4a9ba]277
[d7aecdc]278AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.