source: rtems/cpukit/configure.ac @ 85956f9

4.104.114.84.95
Last change on this file since 85956f9 was 85956f9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 07/08/03 at 12:24:02

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

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