source: rtems/c/src/configure.ac @ 44b4cf4

4.104.114.84.95
Last change on this file since 44b4cf4 was d7610229, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/25/05 at 12:20:58

2005-05-25 Ralf Corsepius <ralf.corsepius@…>

  • aclocal/check-rdbg.m4: Use compilation check on _OLD_EXCEPTIONS to enable rdbg.
  • configure.ac: Reflect changes above.
  • Property mode set to 100644
File size: 7.2 KB
RevLine 
[d7aecdc]1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
[810720b6]5AC_PREREQ(2.59)
[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
[97891e5e]16AM_INIT_AUTOMAKE([no-define subdir-objects no-exeext foreign 1.9])
[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
94test -n "${CPU_CFLAGS}" && \
95  ac_configure_args="$ac_configure_args 'CPU_CFLAGS=${CPU_CFLAGS}'"
[028792e8]96
[9346df0]97AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
[da499ad]98[. ./make/${RTEMS_BSP}.cache])
[9346df0]99CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
100test -n "${CFLAGS_OPTIMIZE_V}" && \
101  ac_configure_args="$ac_configure_args 'CFLAGS_OPTIMIZE_V=${CFLAGS_OPTIMIZE_V}'"
[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   'CFLAGS="${CFLAGS}"' \
129  ],
[259c516]130  [test x"$multilib" = xno])
[02ccf4a]131
[94f4a9ba]132## Note: the order of the directories below is essential
133AC_CONFIG_SUBDIRS([make])
[85a8933]134BSP_SUBDIRS="$BSP_SUBDIRS make"
135BSP_SUBDIRS="$BSP_SUBDIRS optman"
[dd984c0]136
137RTEMS_CPU_SUBDIRS(lib/libcpu)
[539e266e]138if test -d "${srcdir}/lib/libcpu/${RTEMS_CPU}"; then
[dd984c0]139  libcpu_cpu_subdir="${RTEMS_CPU}"
140else
141  libcpu_cpu_subdir=
142fi
143AC_SUBST(libcpu_cpu_subdir)
144
145# Is there code where there should be for this BSP?
146# The bare bsp is a special case as it is not under the RTEMS_CPU path
[259c516]147if test "$RTEMS_BSP_FAMILY" = bare ; then
[dd984c0]148  AC_CONFIG_SUBDIRS([lib/libbsp/bare])
149  AC_SUBST(libbsp_cpu_subdir,bare)
150else
151  RTEMS_CPU_SUBDIRS([lib/libbsp])
152  AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
153fi
154
[539e266e]155BSP_SUBDIRS="$BSP_SUBDIRS lib"
[4108ae8]156BSP_SUBDIRS="$BSP_SUBDIRS libchip"
157BSP_SUBDIRS="$BSP_SUBDIRS libnetworking"
[6fcf4571]158BSP_SUBDIRS="$BSP_SUBDIRS librdbg"
[832bed1]159
[94f4a9ba]160AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
[4db904ec]161  AC_CONFIG_SUBDIRS([librtems++])
[85a8933]162  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
[94f4a9ba]163])
[d7aecdc]164
[db3e91f2]165BSP_SUBDIRS="$BSP_SUBDIRS support"
[aea8e66]166BSP_SUBDIRS="$BSP_SUBDIRS ada"
[85a8933]167BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
[a456af96]168
[54508fd]169AC_ARG_ENABLE([ada],
[a03c1ab]170[AS_HELP_STRING(--enable-ada,enable ada support)],
[54508fd]171[case "${enable_ada}" in
172  yes) ;;
173  no) ;;
174  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
175esac],[enable_ada=no])
176
[259c516]177RTEMS_BSP_CONFIG_SUBDIR(
178  [ada-tests],[ada-tests],
179  ['--enable-rtems-root=../' \
180   '--with-project-root=${with_project_root}../' \
181   '--with-project-top=${with_project_top}../' \
182   '--enable-rtemsbsp=$RTEMS_BSP' \
183  ],
184  [test x"$enable_tests" = xyes && test x"$enable_ada" = xyes])
[a456af96]185
[789694a1]186RTEMS_BSP_CONFIG_SUBDIR(
187  [testsuites],[../../testsuites],
[850c88d]188  ['--enable-rtems-root=../' \
189   '--with-project-root=${with_project_root}../' \
190   '--with-project-top=${with_project_top}../' \
[789694a1]191   '--enable-rtemsbsp=$RTEMS_BSP' \
[6c2b5324]192   'CFLAGS="${CFLAGS}"' \
193  ],
[789694a1]194  [test x"$enable_tests" != x"no"])
[41fc78d]195
[85a8933]196AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
[d7aecdc]197
[259c516]198AS_IF([test "$host_cpu" = sparc],[
[babba25a]199  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
200    [whether to enable ipalignment work-around])
201])
202
[67bfd9a6]203AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
[832bed1]204
205# FIXME: This is sick
[67bfd9a6]206AM_CONDITIONAL([HAS_RDBG],[test "$HAS_RDBG" = "yes"])
[832bed1]207AM_CONDITIONAL([HAS_RDBG_i386],[test "$HAS_RDBG" = "yes" \
208 && test $RTEMS_CPU = "i386"])
209AM_CONDITIONAL([HAS_RDBG_m68k],[test "$HAS_RDBG" = "yes" \
210 && test $RTEMS_CPU = "m68k"])
211AM_CONDITIONAL([HAS_RDBG_powerpc],[test "$HAS_RDBG" = "yes" \
212 && test $RTEMS_CPU = "powerpc"])
213
[4108ae8]214AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes")
[67bfd9a6]215
216# The posix bsp doesn't support libchip
217# FIXME: We should use a feature based check, here
218AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
[94f4a9ba]219
220# The bare bsp doesn't have libbsp.a
221# FIXME: We should use a feature based check, here
[6184265d]222AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
[12b0ada]223
[94f4a9ba]224AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
225
[62fdded]226AM_CONDITIONAL([RPCTOOLS],[test "$RPCGEN" = rpcgen \
227&& test -n "$AWK" \
228&& test "$enable_rpcgen" = yes])
[4108ae8]229
[aea8e66]230AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
231  && test x"$rtems_cv_HAS_POSIX_API" = x"yes"])
232
[d7aecdc]233RTEMS_PROJECT_ROOT
234
[b826c3a]235AC_PATH_PROG([AMPOLISH3],[ampolish3],[])
236AM_CONDITIONAL([AMPOLISH3],[test x"$USE_MAINTAINER_MODE" = x"yes" \
237  && test -n "$AMPOLISH3"])
238
[d7aecdc]239# Explicitly list all Makefiles here
[f0d7515]240AC_CONFIG_FILES([Makefile],
241[${MAKE} make/${RTEMS_BSP}.cache],
242[RTEMS_BSP=${RTEMS_BSP}
243 MAKE=${MAKE}])
244
[babba25a]245AC_CONFIG_FILES([
246support/Makefile
[4108ae8]247
248libnetworking/Makefile
249libnetworking/pppd/Makefile
250libnetworking/rtems_telnetd/Makefile
251
[6fcf4571]252librdbg/Makefile
253
[babba25a]254libchip/Makefile
[6fcf4571]255
[babba25a]256optman/Makefile
[6fcf4571]257
[539e266e]258lib/Makefile
259
[dd984c0]260lib/libcpu/Makefile
261
262lib/libbsp/Makefile
263
[aea8e66]264ada/Makefile
265
[babba25a]266wrapup/Makefile
267])
[94f4a9ba]268
[d7aecdc]269AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.