source: rtems/cpukit/configure.ac @ b422de6c

4.104.114.84.95
Last change on this file since b422de6c was b422de6c, checked in by Ralf Corsepius <ralf.corsepius@…>, on 07/08/03 at 13:50:16

2003-07-08 Ralf Corsepius <corsepiu@…>

  • configure.ac: Merge-in posix/configure.ac. Merge-in itron/configure.ac. Misc. cosmetical changes.
  • Makefile.am: Add posix, itron to SUBDIRS.
  • Property mode set to 100644
File size: 6.0 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ(2.57)
6AC_INIT([rtems-cpukit],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com])
7AC_CONFIG_SRCDIR([score])
8RTEMS_TOP(..)
9
10RTEMS_CANONICAL_TARGET_CPU
11
12AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.7.2])
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
26RTEMS_CHECK_CPU
27RTEMS_CANONICAL_HOST
28
29RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
30RTEMS_CANONICALIZE_TOOLS
31AC_PROG_RANLIB
32
33# FIXME: For the moment, no reason to check for ada
34# RTEMS_PROG_GNAT
35
36RTEMS_CHECK_NEWLIB
37
38RTEMS_CHECK_MULTIPROCESSING
39RTEMS_CHECK_POSIX_API
40RTEMS_CHECK_ITRON_API
41RTEMS_CHECK_NETWORKING
42
43# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
44AS_IF([test "$RTEMS_USE_MACROS" = "yes"],
45  [INLINEdir="macros"],
46  [INLINEdir="inline"])
47AC_SUBST(INLINEdir)
48AC_DEFINE(RTEMS_VERSION,["][_RTEMS_VERSION]["],[RTEMS version string])
49
50RTEMS_CPU_SUBDIRS([score/cpu])
51AC_CONFIG_SUBDIRS([libcsupport])
52
53AS_IF([test x"$HAS_NETWORKING" = x"yes"],[
54## FIXME: Should better use a feature-based test
55AC_MSG_CHECKING([whether CPU supports librpc])
56  case "$RTEMS_CPU" in
57  c4x )  LIBRPC=no;;
58  or32 ) LIBRPC=no;;
59  * )    LIBRPC=yes;;
60  esac
61AC_MSG_RESULT([$LIBRPC])
62  AS_IF([test "$LIBRPC" = "yes"],
63    [AC_CONFIG_SUBDIRS([librpc])
64  ])
65])
66AC_ARG_ENABLE([ada],
67[AC_HELP_STRING([--enable-ada],[enable ada support])],
68[case "${enable_ada}" in
69  yes) ;;
70  no) ;;
71  *)  AC_MSG_ERROR([bad value ${enable_ada} for --enable-ada]) ;;
72esac],[enable_ada=no])
73
74RTEMS_DEFINE_POSIX_API
75RTEMS_DEFINE_ITRON_API
76RTEMS_DEFINE_MULTIPROCESSING
77
78# HACK: We should use a feature-based configuration.
79AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
80  AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix])
81# HACK: silently accept --enable-unixlib
82  test -n "${enable_unixlib}" || enable_unixlib="yes"
83])
84
85
86AS_IF([test x"${enable_unixlib}" = x"yes"],
87  [AC_DEFINE_UNQUOTED([RTEMS_UNIXLIB],[1],
88    [to indicate RTEMS using RTEMS's unixlib])]
89)
90
91# BSD-isms, used throughout the sources
92# Not really used by this configure script
93# FIXME: They should be eliminated if possible.
94AC_CHECK_FUNCS([strsep strcasecmp snprintf])
95AC_CHECK_FUNCS([bcopy bcmp])
96AC_CHECK_FUNCS([isascii fileno])
97
98AM_CONFIG_HEADER([score/include/rtems/score/cpuopts-tmp.h],[
99echo "/* target cpu dependent options file */"         >$tmp/config.h
100echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h
101echo                                                  >>$tmp/config.h
102echo "#ifndef __CPU_OPTIONS_h"                        >>$tmp/config.h
103echo "#define __CPU_OPTIONS_h"                        >>$tmp/config.h
104echo                                                  >>$tmp/config.h
105sed -e '/.*PACKAGE.*/d' score/include/rtems/score/cpuopts-tmp.h >> $tmp/config.h
106echo                                                  >>$tmp/config.h
107echo "#endif"                                         >>$tmp/config.h
108AS_IF([cmp -s score/include/rtems/score/cpuopts.h $tmp/config.h 2>/dev/null],
109  [AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
110   rm -f $tmp/config.h],
111  [AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
112   rm -f score/include/rtems/score/cpuopts.h
113   mv $tmp/config.h score/include/rtems/score/cpuopts.h])
114])
115
116AC_ENABLE_MULTILIB([Makefile],[..])
117
118## HACK: Add a define to cpuopts.h to indicate using multilibs
119## Can be applied to produce compiler errors if using
120## multilib-incompatible settings somewhere else (eg. bspopts.h).
121AS_IF([test x"${enable_multilib}" = x"yes"],[
122  AC_DEFINE_UNQUOTED([RTEMS_MULTILIBS],[1],[using multilib'ed RTEMS])
123])
124
125# libmisc/shell/* wants to assign file descriptors to stdio file descriptors.
126AC_MSG_CHECKING([for assignable stdio])
127AC_COMPILE_IFELSE(
128  [AC_LANG_PROGRAM(
129    [#include <stdio.h>],
130    [stdin = fopen("/tmp", "r")])],
131  [HAVE_ASSIGNABLE_STDIO=yes],
132  [HAVE_ASSIGNABLE_STDIO=no])
133AC_MSG_RESULT([$HAVE_ASSIGNABLE_STDIO])
134
135# libmisc/serdbg exploits weak symbols
136AC_CACHE_CHECK([whether $CC supports function __attribute__((weak))],
137[rtems_cv_cc_attribute_weak],[
138  AS_IF([test x"$GCC" = xyes],[
139    save_CFLAGS=$CFLAGS
140    CFLAGS=-Werror])
141
142  AC_COMPILE_IFELSE([
143    AC_LANG_PROGRAM(
144    [void myfunc(char c) __attribute__ ((weak));
145     void myfunc(char c) {}],
146    [])],
147    [rtems_cv_cc_attribute_weak=yes],
148    [rtems_cv_cc_attribute_weak=no])
149
150  AS_IF([test x"$GCC" = xyes],[
151    CFLAGS=$save_CFLAGS])
152])
153
154AM_CONDITIONAL(LIBRPC,[test "$LIBRPC" = "yes"])
155AM_CONDITIONAL(UNIX,[test x"${RTEMS_CPU}" = x"unix"])
156
157AM_CONDITIONAL(INLINE,test x"$INLINEdir" = x"inline" )
158AM_CONDITIONAL(MACROS,test x"$INLINEdir" = x"macros" )
159AM_CONDITIONAL(HAS_MP,test x"$HAS_MP" = x"yes" )
160
161AM_CONDITIONAL(HAS_POSIX,test x"$HAS_POSIX_API" = x"yes")
162AM_CONDITIONAL(HAS_ITRON,test x"$HAS_ITRON_API" = x"yes")
163AM_CONDITIONAL(HAS_NETWORKING,test x"$HAS_NETWORKING" = x"yes")
164
165# FIXME: All ports should have a libscorecpu.a - But the powerpc doesn't!
166AM_CONDITIONAL([LIBSCORECPU],
167[test -f "${srcdir}/score/cpu/${RTEMS_CPU}/cpu.c"])
168
169AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
170  && test x"$HAS_POSIX_API" = x"yes"])
171
172AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
173AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"])
174
175# Explicitly list all Makefiles here
176AC_CONFIG_FILES([
177Makefile
178include/Makefile
179ada/Makefile
180rtems/Makefile
181sapi/Makefile
182score/Makefile
183score/cpu/Makefile
184posix/Makefile
185itron/Makefile
186libblock/Makefile
187libfs/Makefile
188libfs/src/Makefile
189libfs/src/imfs/Makefile
190libfs/src/dosfs/Makefile
191libnetworking/Makefile
192libnetworking/lib/Makefile
193libnetworking/libc/Makefile
194libnetworking/wrapup/Makefile
195libmisc/Makefile
196libmisc/cpuuse/Makefile
197libmisc/shell/Makefile
198libmisc/devnull/Makefile
199libmisc/dummy/Makefile
200libmisc/dumpbuf/Makefile
201libmisc/monitor/Makefile
202libmisc/rtmonuse/Makefile
203libmisc/serdbg/Makefile
204libmisc/stackchk/Makefile
205libmisc/capture/Makefile
206libmisc/untar/Makefile
207libmisc/mw-fb/Makefile
208libmisc/wrapup/Makefile
209
210wrapup/Makefile
211])
212
213AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.