source: rtems/c/src/configure.ac @ 261f99bd

4.104.114.84.95
Last change on this file since 261f99bd was 261f99bd, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 2, 2007 at 3:00:07 PM

2007-08-02 Joel Sherrill <joel.sherrill@…>

  • configure.ac, wrapup/Makefile.am: Remove RDBG.
  • aclocal/check-rdbg.m4, aclocal/enable-rdbg.m4, librdbg/.cvsignore, librdbg/Makefile.am, librdbg/preinstall.am, librdbg/include/rdbg/rdbg.h, librdbg/include/rdbg/servrpc.h, librdbg/include/rdbg/i386/rdbg_f.h, librdbg/include/rdbg/i386/reg.h, librdbg/include/rdbg/m68k/rdbg_f.h, librdbg/include/rdbg/m68k/reg.h, librdbg/include/rdbg/powerpc/rdbg_f.h, librdbg/include/rdbg/powerpc/reg.h, librdbg/src/_servtgt.c, librdbg/src/awk.svc, librdbg/src/excep.c, librdbg/src/ptrace.c, librdbg/src/rdbg.c, librdbg/src/remdeb.x, librdbg/src/servbkpt.c, librdbg/src/servcon.c, librdbg/src/servrpc.c, librdbg/src/servtgt.c, librdbg/src/servtsp.c, librdbg/src/servutil.c, librdbg/src/i386/excep_f.c, librdbg/src/i386/rdbg_cpu_asm.S, librdbg/src/i386/rdbg_f.c, librdbg/src/i386/any/remdeb.h, librdbg/src/i386/any/remdeb_f.x, librdbg/src/i386/any/remdeb_svc.c, librdbg/src/i386/any/remdeb_xdr.c, librdbg/src/m68k/excep_f.c, librdbg/src/m68k/rdbg_cpu_asm.S, librdbg/src/m68k/rdbg_f.c, librdbg/src/m68k/any/remdeb.h, librdbg/src/m68k/any/remdeb_f.x, librdbg/src/m68k/any/remdeb_svc.c, librdbg/src/m68k/any/remdeb_xdr.c, librdbg/src/powerpc/excep_f.c, librdbg/src/powerpc/rdbg_cpu_asm.S, librdbg/src/powerpc/rdbg_f.c, librdbg/src/powerpc/new_exception_processing/remdeb.h, librdbg/src/powerpc/new_exception_processing/remdeb_f.x, librdbg/src/powerpc/new_exception_processing/remdeb_svc.c, librdbg/src/powerpc/new_exception_processing/remdeb_xdr.c: Removed.
  • Property mode set to 100644
File size: 7.1 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
22AC_ARG_ENABLE(rpcgen,
23[AS_HELP_STRING([--enable-rpcgen],[rebuild rpcgen-generated sources])],
24[case "${enable_rpcgen}" in
25  yes) enable_rpcgen=yes ;;
26  no) enable_rpcgen=no ;;
27  *)  enable_rpcgen=no ;;
28esac],[enable_rpcgen=no])
29
30RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
31
32RTEMS_CHECK_NETWORKING(RTEMS_BSP)
33RTEMS_CHECK_POSIX_API(RTEMS_BSP)
34
35AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen)
36AC_PROG_AWK
37
38AC_MSG_NOTICE([setting up make/custom])
39
40AS_MKDIR_P([make/custom])
41AM_SET_DEPDIR
42test -d ${DEPDIR} || mkdir ${DEPDIR}
43
44rm -f ${DEPDIR}/cfg.P
45echo "# Do not edit - automatically generated by" > ${DEPDIR}/cfg.P
46echo "# $0" >> ${DEPDIR}/cfg.P
47
48# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
49# directory into the build tree's <bsp>/make/custom subdirectories
50CUSTOM_CFG_FILES=
51f="${RTEMS_BSP}.cfg"
52while test -n "$f"; do
53  cfg_file=
54  _RTEMS_CHECK_CUSTOM_BSP([$f],cfg_file)
55  if test -n "${cfg_file}"; then
56    cp ${cfg_file} make/custom/$f
57    echo "make/custom/$f: ${cfg_file}" >> ${DEPDIR}/cfg.P
58    echo "      cp ${cfg_file} make/custom/$f" >> ${DEPDIR}/cfg.P
59    CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
60    f=`grep "^include.*make/custom" ${cfg_file} \
61    | sed \
62      -e 's%^.*custom\/%%' \
63      -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
64      -e 's%default\.cfg%%'`;
65  else break; fi;
66done
67cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
68
69AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
70${MAKE-make} -f ${srcdir}/make/bsp.mak \
71RTEMS_BSP=${RTEMS_BSP} \
72RTEMS_HOST=${RTEMS_HOST} \
73RTEMS_ROOT=. make/${RTEMS_BSP}.cache
74
75# Read back the cache
76AC_CACHE_CHECK([for RTEMS_CPU_MODEL], [ac_cv_env_RTEMS_CPU_MODEL],
77[. ./make/${RTEMS_BSP}.cache])
78RTEMS_CPU_MODEL=$ac_cv_env_RTEMS_CPU_MODEL
79AC_SUBST(RTEMS_CPU_MODEL)
80test -n "${RTEMS_CPU_MODEL}" && \
81  ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'"
82
83AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY],
84[. ./make/${RTEMS_BSP}.cache])
85RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY
86AC_SUBST(RTEMS_BSP_FAMILY)
87test -n "${RTEMS_BSP_FAMILY}" && \
88  ac_configure_args="$ac_configure_args 'RTEMS_BSP_FAMILY=${RTEMS_BSP_FAMILY}'"
89
90AC_CACHE_CHECK([for CPU_CFLAGS],[ac_cv_env_CPU_CFLAGS],
91[. ./make/${RTEMS_BSP}.cache])
92CPU_CFLAGS=$ac_cv_env_CPU_CFLAGS
93
94AC_CACHE_CHECK([for CFLAGS_OPTIMIZE_V],[ac_cv_env_CFLAGS_OPTIMIZE_V],
95[. ./make/${RTEMS_BSP}.cache])
96CFLAGS_OPTIMIZE_V=$ac_cv_env_CFLAGS_OPTIMIZE_V
97
98CFLAGS="${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}"
99AS_IF([test x"${CFLAGS}" != x" "],[
100  ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"])
101
102RTEMS_PROG_CC_FOR_TARGET
103AM_PROG_CC_C_O
104RTEMS_PROG_CCAS
105RTEMS_CANONICALIZE_TOOLS
106
107RTEMS_CHECK_GCC_WEAK
108
109AC_SUBST(CUSTOM_CFG_FILES)
110AC_SUBST(cfg_dir)
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?
137# The bare bsp is a special case as it is not under the RTEMS_CPU path
138if test "$RTEMS_BSP_FAMILY" = bare ; then
139  AC_CONFIG_SUBDIRS([lib/libbsp/bare])
140  AC_SUBST(libbsp_cpu_subdir,bare)
141else
142  RTEMS_CPU_SUBDIRS([lib/libbsp])
143  AC_SUBST(libbsp_cpu_subdir,$RTEMS_CPU)
144fi
145
146BSP_SUBDIRS="$BSP_SUBDIRS lib"
147BSP_SUBDIRS="$BSP_SUBDIRS libchip"
148BSP_SUBDIRS="$BSP_SUBDIRS nfsclient"
149
150AS_IF([test "$RTEMS_HAS_CPLUSPLUS" = "yes"],[
151  AC_CONFIG_SUBDIRS([librtems++])
152  BSP_SUBDIRS="$BSP_SUBDIRS librtems++"
153])
154
155BSP_SUBDIRS="$BSP_SUBDIRS support"
156BSP_SUBDIRS="$BSP_SUBDIRS ada"
157BSP_SUBDIRS="$BSP_SUBDIRS wrapup"
158
159BSP_SUBDIRS="$BSP_SUBDIRS optman"
160
161AC_ARG_ENABLE([ada],
162[AS_HELP_STRING(--enable-ada,enable ada support)],
163[case "${enable_ada}" in
164  yes) ;;
165  no) ;;
166  *)  AC_MSG_ERROR(bad value ${enable_ada} for --enable-ada) ;;
167esac],[enable_ada=no])
168
169RTEMS_BSP_CONFIG_SUBDIR(
170  [ada-tests],[ada-tests],
171  ['--enable-rtems-root=../' \
172   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
173   '--with-project-top=${with_project_top}../' \
174   '--enable-rtemsbsp=$RTEMS_BSP' \
175  ],
176  [test x"$enable_tests" = xyes && test x"$enable_ada" = xyes])
177
178# HACK ALERT!
179
180# FIXME: Assume multilib implies in-source-tree multilibs
181# Build testsuites multilibbed
182RTEMS_BSP_CONFIG_SUBDIR(
183  [testsuites],[../../testsuites],
184  ['--enable-rtems-root=../' \
185   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
186   '--with-project-top=${with_project_top}../' \
187   '--enable-rtemsbsp=$RTEMS_BSP' \
188   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
189   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
190  ],
191  [test x"$enable_tests" != x"no" && test x"$multilib" = xno])
192
193# Build testsuites non-multilibbed
194RTEMS_BSP_CONFIG_SUBDIR(
195  [testsuites],[../../testsuites],
196  ['--enable-rtems-root=../' \
197   '--enable-cpukit-root=${with_project_root}..' \
198   '--enable-project-root=${with_project_root}../$RTEMS_BSP' \
199   '--with-project-top=${with_project_top}../' \
200   '--enable-rtemsbsp=$RTEMS_BSP' \
201   '--includedir=${exec_prefix}/${RTEMS_BSP}/lib/include' \
202   '--libdir=${exec_prefix}/${RTEMS_BSP}/lib' \
203  ],
204  [test x"$enable_tests" != x"no" && test x"$multilib" = xyes])
205
206AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS])
207
208AS_IF([test "$host_cpu" = sparc],[
209  AC_DEFINE_UNQUOTED([CPU_U32_FIX],[1],
210    [whether to enable ipalignment work-around])
211])
212
213AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
214
215AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes")
216
217# The posix bsp doesn't support libchip
218# FIXME: We should use a feature based check, here
219AM_CONDITIONAL([LIBCHIP],[test "$RTEMS_BSP_FAMILY" != "posix"])
220
221# The bare bsp doesn't have libbsp.a
222# FIXME: We should use a feature based check, here
223AM_CONDITIONAL([HAS_LIBBSP],[test "$RTEMS_BSP_FAMILY" != "bare"])
224
225AM_CONDITIONAL([MULTILIB],[test x"${enable_multilib}" = x"yes"])
226
227AM_CONDITIONAL([RPCTOOLS],[test "$RPCGEN" = rpcgen \
228&& test -n "$AWK" \
229&& test "$enable_rpcgen" = yes])
230
231AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
232  && test x"$rtems_cv_HAS_POSIX_API" = x"yes"])
233
234RTEMS_PROJECT_ROOT
235
236# Explicitly list all Makefiles here
237AC_CONFIG_FILES([Makefile],
238[${MAKE} make/${RTEMS_BSP}.cache],
239[RTEMS_BSP=${RTEMS_BSP}
240 MAKE=${MAKE}])
241
242AC_CONFIG_FILES([
243support/Makefile
244
245libchip/Makefile
246
247optman/Makefile
248
249lib/Makefile
250
251lib/libcpu/Makefile
252
253lib/libbsp/Makefile
254
255nfsclient/Makefile
256ada/Makefile
257
258wrapup/Makefile
259])
260
261AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.