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

5
Last change on this file since fef3ea9 was 03c1038, checked in by Chris Johns <chrisj@…>, on 08/10/16 at 03:28:50

librtems++: Remove from RTEMS.

This is old and there are better design patterns for threading and C++.
We recommend you use the new C++ standards based support.

Closes #2777.

  • Property mode set to 100644
File size: 6.3 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3
4AC_PREREQ([2.69])
5AC_INIT([rtems-c-src],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
6AC_CONFIG_SRCDIR([libchip])
7RTEMS_TOP(../..)
8
9RTEMS_ENABLE_CXX
10RTEMS_ENABLE_NETWORKING
11
12RTEMS_CANONICAL_TARGET_CPU
13
14AM_INIT_AUTOMAKE([no-define subdir-objects no-exeext foreign 1.12.2])
15AM_MAINTAINER_MODE
16
17RTEMS_ENABLE_MULTILIB
18RTEMS_ENABLE_MULTIPROCESSING
19RTEMS_ENABLE_CXX
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
97RTEMS_PROG_CXX_FOR_TARGET
98AM_PROG_CC_C_O
99RTEMS_PROG_CCAS
100RTEMS_CANONICALIZE_TOOLS
101
102# Append warning flags if CFLAGS wasn't set.
103AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
104[CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs"])
105
106AS_IF([test -n "${CFLAGS}"],[
107ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"])
108
109RTEMS_CHECK_GCC_WEAK
110
111AC_SUBST(CUSTOM_CFG_FILES)
112
113RTEMS_CHECK_MULTIPROCESSING
114
115BSP_SUBDIRS=
116## Configure ${srcdir}/../../cpukit as cpukit/ if multilibs are disabled
117RTEMS_BSP_CONFIG_SUBDIR(
118  [cpukit],[../../cpukit],
119  ['--with-project-root=${with_project_root}../$RTEMS_BSP/' \
120   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
121   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
122  ],
123  [test x"$multilib" = xno])
124
125## Note: the order of the directories below is essential
126AC_CONFIG_SUBDIRS([make])
127BSP_SUBDIRS="$BSP_SUBDIRS make"
128
129RTEMS_CPU_SUBDIRS(lib/libcpu)
130if test -d "${srcdir}/lib/libcpu/${RTEMS_CPU}"; then
131  libcpu_cpu_subdir="${RTEMS_CPU}"
132else
133  libcpu_cpu_subdir=
134fi
135AC_SUBST(libcpu_cpu_subdir)
136
137# Is there code where there should be for this BSP?
138RTEMS_CPU_SUBDIRS([lib/libbsp])
139AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
140
141BSP_SUBDIRS="$BSP_SUBDIRS lib"
142BSP_SUBDIRS="$BSP_SUBDIRS libchip"
143BSP_SUBDIRS="$BSP_SUBDIRS support"
144BSP_SUBDIRS="$BSP_SUBDIRS ada"
145BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
146
147AC_ARG_ENABLE([ada],
148[AS_HELP_STRING(--enable-ada,enable ada support)],
149[case "${enable_ada}" in
150  yes) ;;
151  no) ;;
152  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
153esac],[enable_ada=no])
154
155RTEMS_BSP_CONFIG_SUBDIR(
156  [ada-tests],[ada-tests],
157  ['--enable-rtems-root=../' \
158   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
159   '--with-project-top=${with_project_top}../' \
160   '--enable-rtemsbsp=$RTEMS_BSP' \
161  ],
162  [test x"$enable_tests" = xyes && test x"$enable_ada" = xyes])
163
164# HACK ALERT!
165
166# FIXME: Assume multilib implies in-source-tree multilibs
167# Build testsuites multilibbed
168RTEMS_BSP_CONFIG_SUBDIR(
169  [testsuites],[../../testsuites],
170  ['--enable-rtems-root=../' \
171   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
172   '--with-project-top=${with_project_top}../' \
173   '--enable-rtemsbsp=$RTEMS_BSP' \
174   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
175   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
176  ],
177  [test x"$enable_tests" != x"no" && test x"$multilib" = xno])
178
179# Build testsuites non-multilibbed
180RTEMS_BSP_CONFIG_SUBDIR(
181  [testsuites],[../../testsuites],
182  ['--enable-rtems-root=../' \
183   '--enable-cpukit-root=${with_project_root}..' \
184   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
185   '--with-project-top=${with_project_top}../' \
186   '--enable-rtemsbsp=$RTEMS_BSP' \
187   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
188   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
189  ],
190  [test x"$enable_tests" != x"no" && test x"$multilib" = xyes])
191
192AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
193
194AS_IF([test "$host_cpu" = sparc],[
195  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
196    [whether to enable ipalignment work-around])
197])
198
199AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
200
201AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
202  && test x"$rtems_cv_HAS_POSIX_API" = x"yes"])
203
204RTEMS_PROJECT_ROOT
205
206# Explicitly list all Makefiles here
207AC_CONFIG_FILES([Makefile],
208[${MAKE} make/${RTEMS_BSP}.cache],
209[RTEMS_BSP=${RTEMS_BSP}
210 MAKE=${MAKE}])
211
212AC_CONFIG_FILES([
213support/Makefile
214libchip/Makefile
215lib/Makefile
216lib/libcpu/Makefile
217lib/libbsp/Makefile
218ada/Makefile
219wrapup/Makefile
220])
221
222AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.