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

4.115
Last change on this file since d8b4256 was f2d4ef5, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/07/11 at 03:52:47

2011-03-07 Ralf Corsépius <ralf.corsepius@…>

  • configure.ac: Remove dead code.
  • Property mode set to 100644
File size: 6.4 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ([2.68])
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.11.1])
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
34cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
35cat << EOF > ${DEPDIR}/cfg.P
36# Do not edit - automatically generated by $0
37make/custom/default.cfg: \$(srcdir)/make/custom/default.cfg.in
38        @\$(MKDIR_P) make/custom
39        cp \$(srcdir)/make/custom/default.cfg.in make/custom/default.cfg
40EOF
41
42# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
43# directory into the build tree's <bsp>/make/custom subdirectories
44CUSTOM_CFG_FILES=
45f="${RTEMS_BSP}.cfg"
46while test -n "$f"; do
47  cfg_file=
48  _RTEMS_CHECK_CUSTOM_BSP([$f],cfg_file)
49  if test -n "${cfg_file}"; then
50    cp ${cfg_file} make/custom/$f
51cat << EOF >> ${DEPDIR}/cfg.P
52make/custom/$f: ${cfg_file} make/custom/default.cfg
53        cp ${cfg_file} make/custom/$f
54EOF
55    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
56    f=`grep "^include.*make/custom" ${cfg_file} \
57    | sed \
58      -e 's%^.*custom\/%%' \
59      -e 's%default\.cfg%%'`;
60  else break; fi;
61done
62
63AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
64${MAKE-make} -f ${srcdir}/make/bsp.mak \
65RTEMS_BSP=${RTEMS_BSP} \
66RTEMS_ROOT=. make/${RTEMS_BSP}.cache
67
68# Read back the cache
69AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
70[. ./make/${RTEMS_BSP}.cache])
71RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
72AC_SUBST(RTEMS_CPU_MODEL)
73test -n "${RTEMS_CPU_MODEL}" && \
74  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
75
76AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
77[RTEMS_BSP_ALIAS([${RTEMS_BSP}],[ac_cv_env_RTEMS_BSP_FAMILY])])
78RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
79AC_SUBST(RTEMS_BSP_FAMILY)
80test -n "${RTEMS_BSP_FAMILY}" && \
81  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
82
83AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
84[. ./make/${RTEMS_BSP}.cache])
85CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
86
87AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
88[. ./make/${RTEMS_BSP}.cache])
89CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
90
91# Was CFLAGS set?
92rtems_cv_CFLAGS_set="${CFLAGS+set}"
93
94CFLAGS="${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}"
95
96RTEMS_PROG_CC_FOR_TARGET
97AM_PROG_CC_C_O
98RTEMS_PROG_CCAS
99RTEMS_CANONICALIZE_TOOLS
100
101# Append warning flags if CFLAGS wasn't set.
102AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
103[CFLAGS="$CFLAGS -Wall -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs"])
104
105AS_IF([test -n "${CFLAGS}"],[
106ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"])
107
108RTEMS_CHECK_GCC_WEAK
109
110AC_SUBST(CUSTOM_CFG_FILES)
111
112RTEMS_CHECK_MULTIPROCESSING
113
114BSP_SUBDIRS=
115## Configure ${srcdir}/../../cpukit as cpukit/ if multilibs are disabled
116RTEMS_BSP_CONFIG_SUBDIR(
117  [cpukit],[../../cpukit],
118  ['--with-project-root=${with_project_root}../$RTEMS_BSP/' \
119   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
120   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
121  ],
122  [test x"$multilib" = xno])
123
124## Note: the order of the directories below is essential
125AC_CONFIG_SUBDIRS([make])
126BSP_SUBDIRS="$BSP_SUBDIRS make"
127
128RTEMS_CPU_SUBDIRS(lib/libcpu)
129if test -d "${srcdir}/lib/libcpu/${RTEMS_CPU}"; then
130  libcpu_cpu_subdir="${RTEMS_CPU}"
131else
132  libcpu_cpu_subdir=
133fi
134AC_SUBST(libcpu_cpu_subdir)
135
136# Is there code where there should be for this BSP?
137RTEMS_CPU_SUBDIRS([lib/libbsp])
138AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
139
140BSP_SUBDIRS="$BSP_SUBDIRS lib"
141BSP_SUBDIRS="$BSP_SUBDIRS libchip"
142
143AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
144  AC_CONFIG_SUBDIRS([librtems++])
145  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
146])
147
148BSP_SUBDIRS="$BSP_SUBDIRS support"
149BSP_SUBDIRS="$BSP_SUBDIRS ada"
150BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
151
152BSP_SUBDIRS="$BSP_SUBDIRS optman"
153
154AC_ARG_ENABLE([ada],
155[AS_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
162RTEMS_BSP_CONFIG_SUBDIR(
163  [ada-tests],[ada-tests],
164  ['--enable-rtems-root=../' \
165   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
166   '--with-project-top=${with_project_top}../' \
167   '--enable-rtemsbsp=$RTEMS_BSP' \
168  ],
169  [test x"$enable_tests" = xyes && test x"$enable_ada" = xyes])
170
171# HACK ALERT!
172
173# FIXME: Assume multilib implies in-source-tree multilibs
174# Build testsuites multilibbed
175RTEMS_BSP_CONFIG_SUBDIR(
176  [testsuites],[../../testsuites],
177  ['--enable-rtems-root=../' \
178   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
179   '--with-project-top=${with_project_top}../' \
180   '--enable-rtemsbsp=$RTEMS_BSP' \
181   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
182   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
183  ],
184  [test x"$enable_tests" != x"no" && test x"$multilib" = xno])
185
186# Build testsuites non-multilibbed
187RTEMS_BSP_CONFIG_SUBDIR(
188  [testsuites],[../../testsuites],
189  ['--enable-rtems-root=../' \
190   '--enable-cpukit-root=${with_project_root}..' \
191   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
192   '--with-project-top=${with_project_top}../' \
193   '--enable-rtemsbsp=$RTEMS_BSP' \
194   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
195   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
196  ],
197  [test x"$enable_tests" != x"no" && test x"$multilib" = xyes])
198
199AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
200
201AS_IF([test "$host_cpu" = sparc],[
202  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
203    [whether to enable ipalignment work-around])
204])
205
206AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
207
208AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
209  && test x"$rtems_cv_HAS_POSIX_API" = x"yes"])
210
211RTEMS_PROJECT_ROOT
212
213# Explicitly list all Makefiles here
214AC_CONFIG_FILES([Makefile],
215[${MAKE} make/${RTEMS_BSP}.cache],
216[RTEMS_BSP=${RTEMS_BSP}
217 MAKE=${MAKE}])
218
219AC_CONFIG_FILES([
220support/Makefile
221
222libchip/Makefile
223
224optman/Makefile
225
226lib/Makefile
227
228lib/libcpu/Makefile
229
230lib/libbsp/Makefile
231
232ada/Makefile
233
234wrapup/Makefile
235])
236
237AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.