source: rtems/c/src/configure.ac @ 82948ea1

4.9
Last change on this file since 82948ea1 was 1b39f18, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jul 27, 2008 at 7:15:14 AM

2008-07-27 Ralf Corsépius <ralf.corsepius@…>

  • configure.ac: Remove RPCGEN, RPCTOOLS.
  • Property mode set to 100644
File size: 6.7 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ(2.60)
6AC_INIT([rtems-c-src],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
7AC_CONFIG_SRCDIR([optman])
8RTEMS_TOP(../..)
9
10RTEMS_ENABLE_CXX
11RTEMS_ENABLE_NETWORKING
12
13RTEMS_CANONICAL_TARGET_CPU
14
15AM_INIT_AUTOMAKE([no-define subdir-objects no-exeext foreign 1.10])
16AM_MAINTAINER_MODE
17
18RTEMS_ENABLE_MULTILIB
19RTEMS_ENABLE_MULTIPROCESSING
20RTEMS_ENV_RTEMSBSP
21
22RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
23
24RTEMS_CHECK_NETWORKING(RTEMS_BSP)
25RTEMS_CHECK_POSIX_API(RTEMS_BSP)
26
27AC_MSG_NOTICE([setting up make/custom])
28
29AS_MKDIR_P([make/custom])
30AM_SET_DEPDIR
31test -d ${DEPDIR} || mkdir ${DEPDIR}
32
33rm -f ${DEPDIR}/cfg.P
34echo "# Do not edit - automatically generated by" > ${DEPDIR}/cfg.P
35echo "# $0" >> ${DEPDIR}/cfg.P
36
37# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
38# directory into the build tree's <bsp>/make/custom subdirectories
39CUSTOM_CFG_FILES=
40f="${RTEMS_BSP}.cfg"
41while test -n "$f"; do
42  cfg_file=
43  _RTEMS_CHECK_CUSTOM_BSP([$f],cfg_file)
44  if test -n "${cfg_file}"; then
45    cp ${cfg_file} make/custom/$f
46    echo "make/custom/$f: ${cfg_file}" >> ${DEPDIR}/cfg.P
47    echo "      cp ${cfg_file} make/custom/$f" >> ${DEPDIR}/cfg.P
48    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
49    f=`grep "^include.*make/custom" ${cfg_file} \
50    | sed \
51      -e 's%^.*custom\/%%' \
52      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
53      -e 's%default\.cfg%%'`;
54  else break; fi;
55done
56cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
57
58AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
59${MAKE-make} -f ${srcdir}/make/bsp.mak \
60RTEMS_BSP=${RTEMS_BSP} \
61RTEMS_HOST=${RTEMS_HOST} \
62RTEMS_ROOT=. make/${RTEMS_BSP}.cache
63
64# Read back the cache
65AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
66[. ./make/${RTEMS_BSP}.cache])
67RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
68AC_SUBST(RTEMS_CPU_MODEL)
69test -n "${RTEMS_CPU_MODEL}" && \
70  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
71
72AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
73[. ./make/${RTEMS_BSP}.cache])
74RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
75AC_SUBST(RTEMS_BSP_FAMILY)
76test -n "${RTEMS_BSP_FAMILY}" && \
77  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
78
79AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
80[. ./make/${RTEMS_BSP}.cache])
81CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
82
83AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
84[. ./make/${RTEMS_BSP}.cache])
85CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
86
87CFLAGS="${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}"
88AS_IF([test x"${CFLAGS}" != x" "],[
89  ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"])
90
91RTEMS_PROG_CC_FOR_TARGET
92AM_PROG_CC_C_O
93RTEMS_PROG_CCAS
94RTEMS_CANONICALIZE_TOOLS
95
96RTEMS_CHECK_GCC_WEAK
97
98AC_SUBST(CUSTOM_CFG_FILES)
99AC_SUBST(cfg_dir)
100
101RTEMS_CHECK_MULTIPROCESSING
102
103BSP_SUBDIRS=
104## Configure ${srcdir}/../../cpukit as cpukit/ if multilibs are disabled
105RTEMS_BSP_CONFIG_SUBDIR(
106  [cpukit],[../../cpukit],
107  ['--with-project-root=${with_project_root}../$RTEMS_BSP/' \
108   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
109   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
110  ],
111  [test x"$multilib" = xno])
112
113## Note: the order of the directories below is essential
114AC_CONFIG_SUBDIRS([make])
115BSP_SUBDIRS="$BSP_SUBDIRS make"
116
117RTEMS_CPU_SUBDIRS(lib/libcpu)
118if test -d "${srcdir}/lib/libcpu/${RTEMS_CPU}"; then
119  libcpu_cpu_subdir="${RTEMS_CPU}"
120else
121  libcpu_cpu_subdir=
122fi
123AC_SUBST(libcpu_cpu_subdir)
124
125# Is there code where there should be for this BSP?
126# The bare bsp is a special case as it is not under the RTEMS_CPU path
127if test "$RTEMS_BSP_FAMILY" = bare ; then
128  AC_CONFIG_SUBDIRS([lib/libbsp/bare])
129  AC_SUBST(libbsp_cpu_subdir,bare)
130else
131  RTEMS_CPU_SUBDIRS([lib/libbsp])
132  AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
133fi
134
135BSP_SUBDIRS="$BSP_SUBDIRS lib"
136BSP_SUBDIRS="$BSP_SUBDIRS libchip"
137
138AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
139  AC_CONFIG_SUBDIRS([librtems++])
140  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
141])
142
143BSP_SUBDIRS="$BSP_SUBDIRS support"
144BSP_SUBDIRS="$BSP_SUBDIRS ada"
145BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
146
147BSP_SUBDIRS="$BSP_SUBDIRS optman"
148
149AC_ARG_ENABLE([ada],
150[AS_HELP_STRING(--enable-ada,enable ada support)],
151[case "${enable_ada}" in
152  yes) ;;
153  no) ;;
154  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
155esac],[enable_ada=no])
156
157RTEMS_BSP_CONFIG_SUBDIR(
158  [ada-tests],[ada-tests],
159  ['--enable-rtems-root=../' \
160   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
161   '--with-project-top=${with_project_top}../' \
162   '--enable-rtemsbsp=$RTEMS_BSP' \
163  ],
164  [test x"$enable_tests" = xyes && test x"$enable_ada" = xyes])
165
166# HACK ALERT!
167
168# FIXME: Assume multilib implies in-source-tree multilibs
169# Build testsuites multilibbed
170RTEMS_BSP_CONFIG_SUBDIR(
171  [testsuites],[../../testsuites],
172  ['--enable-rtems-root=../' \
173   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
174   '--with-project-top=${with_project_top}../' \
175   '--enable-rtemsbsp=$RTEMS_BSP' \
176   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
177   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
178  ],
179  [test x"$enable_tests" != x"no" && test x"$multilib" = xno])
180
181# Build testsuites non-multilibbed
182RTEMS_BSP_CONFIG_SUBDIR(
183  [testsuites],[../../testsuites],
184  ['--enable-rtems-root=../' \
185   '--enable-cpukit-root=${with_project_root}..' \
186   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
187   '--with-project-top=${with_project_top}../' \
188   '--enable-rtemsbsp=$RTEMS_BSP' \
189   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
190   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
191  ],
192  [test x"$enable_tests" != x"no" && test x"$multilib" = xyes])
193
194AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
195
196AS_IF([test "$host_cpu" = sparc],[
197  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
198    [whether to enable ipalignment work-around])
199])
200
201AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
202
203AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes")
204
205# The posix bsp doesn't support libchip
206# FIXME: We should use a feature based check, here
207AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
208
209# The bare bsp doesn't have libbsp.a
210# FIXME: We should use a feature based check, here
211AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
212
213AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
214
215AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
216  && test x"$rtems_cv_HAS_POSIX_API" = x"yes"])
217
218RTEMS_PROJECT_ROOT
219
220# Explicitly list all Makefiles here
221AC_CONFIG_FILES([Makefile],
222[${MAKE} make/${RTEMS_BSP}.cache],
223[RTEMS_BSP=${RTEMS_BSP}
224 MAKE=${MAKE}])
225
226AC_CONFIG_FILES([
227support/Makefile
228
229libchip/Makefile
230
231optman/Makefile
232
233lib/Makefile
234
235lib/libcpu/Makefile
236
237lib/libbsp/Makefile
238
239ada/Makefile
240
241wrapup/Makefile
242])
243
244AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.