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
RevLine 
[66387986]1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
[eb299afc]4
[9b353a5]5AC_PREREQ(2.57)
[f31a078]6AC_INIT([rtems-cpukit],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com])
[66387986]7AC_CONFIG_SRCDIR([score])
[51b4875]8RTEMS_TOP(..)
[eb299afc]9
10RTEMS_CANONICAL_TARGET_CPU
11
[33e6983]12AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.7.2])
[eb299afc]13AM_MAINTAINER_MODE
[04e6f7bf]14
15RTEMS_ENABLE_MULTILIB
[eb299afc]16RTEMS_ENABLE_MULTIPROCESSING
17RTEMS_ENABLE_POSIX
[352c9b2]18RTEMS_ENABLE_ITRON
[eb299afc]19RTEMS_ENABLE_INLINES
[39607984]20RTEMS_ENABLE_RTEMS_DEBUG
[3e39b47]21RTEMS_ENABLE_NETWORKING
[eb299afc]22
[04e6f7bf]23RTEMS_ENV_RTEMSCPU
[39607984]24RTEMS_CHECK_RTEMS_DEBUG
[eb299afc]25
26RTEMS_CHECK_CPU
27RTEMS_CANONICAL_HOST
28
[53c3a2c6]29RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
[eb299afc]30RTEMS_CANONICALIZE_TOOLS
[e73e576]31AC_PROG_RANLIB
[eb299afc]32
[92ed8c2]33# FIXME: For the moment, no reason to check for ada
34# RTEMS_PROG_GNAT
35
[eb299afc]36RTEMS_CHECK_NEWLIB
37
[27f9f12]38RTEMS_CHECK_MULTIPROCESSING
39RTEMS_CHECK_POSIX_API
40RTEMS_CHECK_ITRON_API
[3e39b47]41RTEMS_CHECK_NETWORKING
[1896a650]42
[eb299afc]43# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
[8217c40]44AS_IF([test "$RTEMS_USE_MACROS" = "yes"],
45  [INLINEdir="macros"],
46  [INLINEdir="inline"])
[120e9fb]47AC_SUBST(INLINEdir)
[85956f9]48AC_DEFINE(RTEMS_VERSION,["][_RTEMS_VERSION]["],[RTEMS version string])
[1896a650]49
[7660ccd8]50RTEMS_CPU_SUBDIRS([score/cpu])
[90926129]51AC_CONFIG_SUBDIRS([libcsupport])
[85956f9]52
[85eb57e7]53AS_IF([test x"$HAS_NETWORKING" = x"yes"],[
54## FIXME: Should better use a feature-based test
[e336882]55AC_MSG_CHECKING([whether CPU supports librpc])
[85eb57e7]56  case "$RTEMS_CPU" in
57  c4x )  LIBRPC=no;;
58  or32 ) LIBRPC=no;;
59  * )    LIBRPC=yes;;
60  esac
[e336882]61AC_MSG_RESULT([$LIBRPC])
62  AS_IF([test "$LIBRPC" = "yes"],
[85eb57e7]63    [AC_CONFIG_SUBDIRS([librpc])
[2a582aa5]64  ])
65])
[965c49b2]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
[b8a30d07]74RTEMS_DEFINE_POSIX_API
75RTEMS_DEFINE_ITRON_API
76RTEMS_DEFINE_MULTIPROCESSING
77
[c0394d4b]78# HACK: We should use a feature-based configuration.
[8217c40]79AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
[64b1f81]80  AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix])
[8217c40]81# HACK: silently accept --enable-unixlib
[64b1f81]82  test -n "${enable_unixlib}" || enable_unixlib="yes"
[8217c40]83])
84
[35cd6ae]85
[8217c40]86AS_IF([test x"${enable_unixlib}" = x"yes"],
[64b1f81]87  [AC_DEFINE_UNQUOTED([RTEMS_UNIXLIB],[1],
[8217c40]88    [to indicate RTEMS using RTEMS's unixlib])]
89)
[c0394d4b]90
[b422de6c]91# BSD-isms, used throughout the sources
92# Not really used by this configure script
93# FIXME: They should be eliminated if possible.
[85956f9]94AC_CHECK_FUNCS([strsep strcasecmp snprintf])
[b422de6c]95AC_CHECK_FUNCS([bcopy bcmp])
96AC_CHECK_FUNCS([isascii fileno])
[f31a078]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])
[e0ba3e8]115
[8217c40]116AC_ENABLE_MULTILIB([Makefile],[..])
117
[64b1f81]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
[e30210ea]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])
[f7952533]153
[b422de6c]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
[92ed8c2]169AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
170  && test x"$HAS_POSIX_API" = x"yes"])
171
[e30210ea]172AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
173AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"])
174
[70810dc]175# Explicitly list all Makefiles here
[b422de6c]176AC_CONFIG_FILES([
177Makefile
[8217c40]178include/Makefile
[b422de6c]179ada/Makefile
[1896a650]180rtems/Makefile
181sapi/Makefile
[eb299afc]182score/Makefile
183score/cpu/Makefile
[b422de6c]184posix/Makefile
185itron/Makefile
186libblock/Makefile
187libfs/Makefile
[e604ab6]188libfs/src/Makefile
189libfs/src/imfs/Makefile
[b422de6c]190libfs/src/dosfs/Makefile
191libnetworking/Makefile
[85956f9]192libnetworking/lib/Makefile
193libnetworking/libc/Makefile
[b422de6c]194libnetworking/wrapup/Makefile
195libmisc/Makefile
[e30210ea]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
[b422de6c]210wrapup/Makefile
211])
[92ed8c2]212
[66387986]213AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.