source: rtems/cpukit/configure.ac @ 91f706a

4.104.114.84.95
Last change on this file since 91f706a was 91f706a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/28/04 at 07:14:34

2004-10-28 Ralf Corsepius <ralf_corsepius@…>

  • configure.ac: Remove RTEMS_CPUOPT([RTEMS_MULTILIBS],..). (Unused).
  • Property mode set to 100644
File size: 7.8 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ(2.59)
6AC_INIT([rtems-cpukit],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
7AC_CONFIG_SRCDIR([score])
8RTEMS_TOP([..],[])
9
10RTEMS_CANONICAL_TARGET_CPU
11
12AM_INIT_AUTOMAKE([no-define nostdinc subdir-objects foreign 1.9])
13AM_MAINTAINER_MODE
14
15RTEMS_ENABLE_MULTILIB
16RTEMS_ENABLE_MULTIPROCESSING
17RTEMS_ENABLE_POSIX
18RTEMS_ENABLE_ITRON
19RTEMS_ENABLE_INLINES
20RTEMS_ENABLE_RTEMS_DEBUG
21RTEMS_ENABLE_NETWORKING
22
23RTEMS_ENV_RTEMSCPU
24RTEMS_CHECK_RTEMS_DEBUG
25
26# Is this a supported CPU?
27AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
28if test -d "$srcdir/score/cpu/$RTEMS_CPU"; then
29  AC_MSG_RESULT(yes)
30else
31  AC_MSG_ERROR(no)
32fi
33
34RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
35RTEMS_PROG_CCAS
36RTEMS_CANONICALIZE_TOOLS
37AM_PROG_CC_C_O
38AC_PROG_RANLIB
39
40# FIXME: For the moment, no reason to check for ada
41# RTEMS_PROG_GNAT
42
43RTEMS_CHECK_NEWLIB
44
45RTEMS_CHECK_MULTIPROCESSING
46RTEMS_CHECK_POSIX_API
47RTEMS_CHECK_ITRON_API
48RTEMS_CHECK_NETWORKING
49
50AS_IF([test x"$HAS_NETWORKING" = x"yes"],[
51## FIXME: Should better use a feature-based test
52AC_MSG_CHECKING([whether CPU supports librpc])
53  case "$RTEMS_CPU" in
54  c4x )  LIBRPC=no;;
55  or32 ) LIBRPC=no;;
56  * )    LIBRPC=yes;;
57  esac
58AC_MSG_RESULT([$LIBRPC])
59])
60
61AC_ARG_ENABLE([ada],
62[AS_HELP_STRING(--enable-ada,enable ada support)],
63[case "${enable_ada}" in
64  yes) ;;
65  no) ;;
66  *)  AC_MSG_ERROR([bad value ${enable_ada} for --enable-ada]) ;;
67esac],[enable_ada=no])
68
69AC_ARG_ENABLE([deprecated],
70[AS_HELP_STRING(--enable-deprecated,allow using deprecated files)],
71[case "${enable_deprecated}" in
72  yes) ;;
73  no) ;;
74  *) enable_deprecated=yes ;;
75esac],[enable_deprecated=yes])
76AM_CONDITIONAL([DEPRECATED],[test "$enable_deprecated" = "yes"])
77
78# HACK: We should use a feature-based configuration.
79AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
80# HACK: silently accept --enable-unixlib
81  test -n "${enable_unixlib}" || enable_unixlib="yes"
82])
83
84# BSD-isms, used throughout the sources
85# Not really used by this configure script
86# FIXME: They should be eliminated if possible.
87AC_CHECK_FUNCS([strsep strcasecmp snprintf])
88AC_CHECK_FUNCS([bcopy bcmp])
89AC_CHECK_FUNCS([isascii fileno])
90
91## Check if the installed toolchain has these headers
92AC_CHECK_HEADER(stdint.h)
93AC_CHECK_HEADER(inttypes.h)
94
95AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],[
96  RTEMS_USES_STDINT_H=yes
97  RTEMS_USES_INTTYPES_H=yes],[
98  RTEMS_USES_STDINT_H=$ac_cv_header_stdint_h
99  RTEMS_USES_INTTYPES_H=$ac_cv_header_inttypes_h
100])
101
102AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
103## FIXME: This check is doubtful
104AS_IF([test "$HAS_MP" = "yes"],
105  [RTEMS_CHECK_SYSV_UNIX])
106
107## The code fragment below had been used in tools/cpu/unix/gensize.c.
108## FIXME:
109## * The pad very likely is not necessary.
110AC_CHECK_SIZEOF([CPU_CONTEXT],[],[
111#include <stdio.h>
112#include <setjmp.h>
113
114typedef struct {
115  jmp_buf     regs;
116  int         isr_level;
117  int         pad[4]; /* just in case */
118} CPU_CONTEXT;
119])
120])
121
122cat >>cpuopts.tmp <<\_ACEOF
123/* target cpu dependent options file */
124/* automatically generated -- DO NOT EDIT!! */
125#ifndef __CPU_OPTIONS_h
126#define __CPU_OPTIONS_h
127_ACEOF
128
129RTEMS_CPUOPT([RTEMS_DEBUG],
130  [test x"${enable_rtems_debug}" = x"yes"],
131  [1],
132  [if RTEMS_DEBUG is enabled])
133
134RTEMS_CPUOPT([RTEMS_INLINES],
135  [test x"${enable_rtems_inlines}" = x"yes"],
136  [1],
137  [if using inlines])
138
139RTEMS_CPUOPT([RTEMS_ITRON_API],
140  [test x"$rtems_cv_HAS_ITRON_API" = x"yes"],
141  [1],
142  [if itron api is supported])
143
144RTEMS_CPUOPT([RTEMS_MULTIPROCESSING],
145  [test x"$enable_multiprocessing" = x"yes"],
146  [1],
147  [if multiprocessing is enabled])
148
149RTEMS_CPUOPT([RTEMS_NEWLIB],
150  [test x"$RTEMS_USE_NEWLIB" = x"yes"],
151  [1],
152  [if using newlib])
153
154RTEMS_CPUOPT([RTEMS_POSIX_API],
155  [test x"$rtems_cv_HAS_POSIX_API" = x"yes"],
156  [1],
157  [if posix api is supported])
158
159RTEMS_CPUOPT([RTEMS_UNIX],
160  [test x"$RTEMS_CPU" = x"unix"],
161  [1],
162  [to indicate RTEMS unix])
163
164RTEMS_CPUOPT([RTEMS_UNIXLIB],
165  [test x"${enable_unixlib}" = x"yes"],
166  [1],
167  [to indicate RTEMS using RTEMS's unixlib])
168
169RTEMS_CPUOPT([RTEMS_USES_STDINT_H],
170  [test x"${RTEMS_USES_STDINT_H}" = x"yes"],
171  [1],
172  [if RTEMS uses stdint.h])
173
174RTEMS_CPUOPT([RTEMS_USES_INTTYPES_H],
175  [test x"${RTEMS_USES_INTTYPES_H}" = x"yes"],
176  [1],
177  [if RTEMS uses inttypes.h])
178
179RTEMS_CPUOPT([RTEMS_VERSION],
180  [true],
181  ["]_RTEMS_VERSION["],
182  [RTEMS version string])
183
184RTEMS_CPUOPT([SIZEOF_CPU_CONTEXT],
185  [test x"$RTEMS_CPU" = x"unix"],
186  [$ac_cv_sizeof_CPU_CONTEXT],
187  [The size of a 'CPU_CONTEXT', as computed by sizeof])
188
189cat >>cpuopts.tmp <<\_ACEOF
190
191#endif
192_ACEOF
193
194AS_MKDIR_P(score/include/rtems/score)
195AS_IF([test -f score/include/rtems/score/cpuopts.h],
196[
197  AS_IF([cmp -s score/include/rtems/score/cpuopts.h cpuopts.tmp 2>/dev/null],
198  [
199    AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
200    rm -f cpuopts.tmp
201  ],[
202    AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
203    rm -f score/include/rtems/score/cpuopts.h
204    mv cpuopts.tmp score/include/rtems/score/cpuopts.h
205  ])
206],[
207    AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
208    rm -f score/include/rtems/score/cpuopts.h
209    mv cpuopts.tmp score/include/rtems/score/cpuopts.h
210])
211
212AC_ENABLE_MULTILIB([Makefile],[..])
213
214# libmisc/shell/* wants to assign file descriptors to stdio file descriptors.
215AC_MSG_CHECKING([for assignable stdio])
216AC_COMPILE_IFELSE(
217  [AC_LANG_PROGRAM(
218    [#include <stdio.h>],
219    [stdin = fopen("/tmp", "r")])],
220  [HAVE_ASSIGNABLE_STDIO=yes],
221  [HAVE_ASSIGNABLE_STDIO=no])
222AC_MSG_RESULT([$HAVE_ASSIGNABLE_STDIO])
223
224# libmisc/serdbg exploits weak symbols
225RTEMS_CHECK_GCC_WEAK
226
227AC_CHECK_HEADERS([sys/cdefs.h],[NEED_SYS_CDEFS_H=no],[NEED_SYS_CDEFS_H=yes])
228AC_CHECK_HEADERS([sys/queue.h],[NEED_SYS_QUEUE_H=no],[NEED_SYS_QUEUE_H=yes])
229
230# FIXME: These checks are only in here to provide
231# configuration-time diagnostics and are not really used.
232AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include <limits.h>])
233AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>])
234
235## BSD-ism, excluded from POSIX, but available on most platforms
236AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>])
237
238## Check if libc provides BSD's strlcpy/strlcat
239AC_CHECK_FUNCS(strlcpy strlcat)
240
241
242# ... far too many conditionals ...
243AM_CONDITIONAL(LIBRPC,[test "$LIBRPC" = "yes"])
244AM_CONDITIONAL(UNIX,[test x"${RTEMS_CPU}" = x"unix"])
245AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes")
246
247AM_CONDITIONAL(INLINE,test x"$enable_rtems_inlines" = x"yes" )
248AM_CONDITIONAL(MACROS,test x"$enable_rtems_inlines" = x"no" )
249AM_CONDITIONAL(HAS_MP,test x"$enable_multiprocessing" = x"yes" )
250
251AM_CONDITIONAL(HAS_POSIX,test x"$rtems_cv_HAS_POSIX_API" = x"yes")
252AM_CONDITIONAL(HAS_ITRON,test x"$rtems_cv_HAS_ITRON_API" = x"yes")
253AM_CONDITIONAL(HAS_NETWORKING,test x"$HAS_NETWORKING" = x"yes")
254
255# FIXME: All ports should have a libscorecpu.a - But the powerpc doesn't!
256AM_CONDITIONAL([LIBSCORECPU],
257[test -f "${srcdir}/score/cpu/${RTEMS_CPU}/cpu.c"])
258
259AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
260  && test x"$HAS_POSIX_API" = x"yes"])
261
262AM_CONDITIONAL([NEED_SYS_CDEFS_H],[test x"$NEED_SYS_CDEFS_H" = x"yes"])
263AM_CONDITIONAL([NEED_SYS_QUEUE_H],[test x"$NEED_SYS_QUEUE_H" = x"yes"])
264
265AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
266AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"])
267
268AC_CONFIG_HEADER(config.h)
269
270# Explicitly list all Makefiles here
271AC_CONFIG_FILES([
272Makefile
273ada/Makefile
274rtems/Makefile
275sapi/Makefile
276score/Makefile
277score/cpu/Makefile
278score/cpu/arm/Makefile
279score/cpu/avr/Makefile
280score/cpu/c4x/Makefile
281score/cpu/h8300/Makefile
282score/cpu/i386/Makefile
283score/cpu/m68k/Makefile
284score/cpu/mips/Makefile
285score/cpu/or32/Makefile
286score/cpu/powerpc/Makefile
287score/cpu/sh/Makefile
288score/cpu/sparc/Makefile
289score/cpu/unix/Makefile
290score/cpu/no_cpu/Makefile
291posix/Makefile
292itron/Makefile
293libblock/Makefile
294libfs/Makefile
295libcsupport/Makefile
296libnetworking/Makefile
297librpc/Makefile
298libmisc/Makefile
299httpd/Makefile
300
301wrapup/Makefile
302])
303
304AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.