source: rtems/cpukit/configure.ac @ 965c49b2

4.104.114.84.95
Last change on this file since 965c49b2 was 965c49b2, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/29/02 at 16:40:03

2002-10-29 Ralf Corsepius <corsepiu@…>

  • aclocal/multilib.m4: Remove RTEMS_ENABLE_MULTILIB_MASTER.
  • Property mode set to 100644
File size: 4.7 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ(2.52)
6AC_INIT([rtems-cpukit],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com])
7AC_CONFIG_SRCDIR([score])
8RTEMS_TOP(..)
9AC_CONFIG_AUX_DIR(..)
10
11RTEMS_CANONICAL_TARGET_CPU
12
13AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.6])
14AM_MAINTAINER_MODE
15
16RTEMS_ENABLE_MULTILIB
17RTEMS_ENABLE_MULTIPROCESSING
18RTEMS_ENABLE_POSIX
19RTEMS_ENABLE_ITRON
20RTEMS_ENABLE_INLINES
21RTEMS_ENABLE_RTEMS_DEBUG
22RTEMS_ENABLE_NETWORKING
23
24RTEMS_ENV_RTEMSCPU
25RTEMS_CHECK_RTEMS_DEBUG
26
27RTEMS_CHECK_CPU
28RTEMS_CANONICAL_HOST
29
30RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
31RTEMS_CANONICALIZE_TOOLS
32AC_PROG_RANLIB
33
34RTEMS_CHECK_NEWLIB
35
36RTEMS_CHECK_MULTIPROCESSING
37RTEMS_CHECK_POSIX_API
38RTEMS_CHECK_ITRON_API
39RTEMS_CHECK_NETWORKING
40
41# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
42AS_IF([test "$RTEMS_USE_MACROS" = "yes"],
43  [INLINEdir="macros"],
44  [INLINEdir="inline"])
45
46AM_CONDITIONAL(INLINE,test x"$INLINEdir" = x"inline" )
47AM_CONDITIONAL(MACROS,test x"$INLINEdir" = x"macros" )
48AM_CONDITIONAL(HAS_MP,test x"$HAS_MP" = x"yes" )
49
50AC_SUBST(RTEMS_VERSION)
51
52AM_CONDITIONAL(HAS_POSIX,test x"$HAS_POSIX_API" = x"yes")
53AM_CONDITIONAL(HAS_ITRON,test x"$HAS_ITRON_API" = x"yes")
54AM_CONDITIONAL(HAS_NETWORKING,test x"$HAS_NETWORKING" = x"yes")
55
56AS_IF([test x"$HAS_POSIX_API" = x"yes"],
57  [AC_CONFIG_SUBDIRS([posix])]
58)
59AS_IF([test x"$HAS_ITRON_API" = x"yes"],
60  [AC_CONFIG_SUBDIRS(itron)]
61)
62RTEMS_CPU_SUBDIRS([score/cpu])
63# FIXME: All ports should have a libscorecpu.a - But the powerpc doesn't!
64AM_CONDITIONAL([LIBSCORECPU],
65[test -f "${srcdir}/score/cpu/${RTEMS_CPU}/cpu.c"])
66
67AC_CONFIG_SUBDIRS([libcsupport])
68AC_CONFIG_SUBDIRS([libblock])
69AC_CONFIG_SUBDIRS([libfs])
70AS_IF([test x"$HAS_NETWORKING" = x"yes"],[
71  AC_CONFIG_SUBDIRS(libnetworking)
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
94AS_IF([test x"$enable_ada" = x"yes"],[
95  AS_IF([test x"$HAS_POSIX_API" = x"yes"],[
96    AC_CONFIG_SUBDIRS([ada])
97  ])
98])
99
100RTEMS_DEFINE_POSIX_API
101RTEMS_DEFINE_ITRON_API
102RTEMS_DEFINE_MULTIPROCESSING
103
104# HACK: We should use a feature-based configuration.
105AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
106  AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix])
107# HACK: silently accept --enable-unixlib
108  test -n "${enable_unixlib}" || enable_unixlib="yes"
109])
110
111AM_CONDITIONAL(UNIX,[test x"${RTEMS_CPU}" = x"unix"])
112
113AS_IF([test x"${enable_unixlib}" = x"yes"],
114  [AC_DEFINE_UNQUOTED([RTEMS_UNIXLIB],[1],
115    [to indicate RTEMS using RTEMS's unixlib])]
116)
117
118
119AM_CONFIG_HEADER([score/include/rtems/score/cpuopts-tmp.h],[
120echo "/* target cpu dependent options file */"         >$tmp/config.h
121echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h
122echo                                                  >>$tmp/config.h
123echo "#ifndef __CPU_OPTIONS_h"                        >>$tmp/config.h
124echo "#define __CPU_OPTIONS_h"                        >>$tmp/config.h
125echo                                                  >>$tmp/config.h
126sed -e '/.*PACKAGE.*/d' score/include/rtems/score/cpuopts-tmp.h >> $tmp/config.h
127echo                                                  >>$tmp/config.h
128echo "#endif"                                         >>$tmp/config.h
129AS_IF([cmp -s score/include/rtems/score/cpuopts.h $tmp/config.h 2>/dev/null],
130  [AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
131   rm -f $tmp/config.h],
132  [AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
133   rm -f score/include/rtems/score/cpuopts.h
134   mv $tmp/config.h score/include/rtems/score/cpuopts.h])
135])
136
137AC_ENABLE_MULTILIB([Makefile],[..])
138
139## HACK: Add a define to cpuopts.h to indicate using multilibs
140## Can be applied to produce compiler errors if using
141## multilib-incompatible settings somewhere else (eg. bspopts.h).
142AS_IF([test x"${enable_multilib}" = x"yes"],[
143  AC_DEFINE_UNQUOTED([RTEMS_MULTILIBS],[1],[using multilib'ed RTEMS])
144])
145
146# Explicitly list all Makefiles here
147AC_CONFIG_FILES([Makefile
148include/Makefile
149rtems/Makefile
150rtems/src/Makefile
151rtems/include/Makefile
152rtems/inline/Makefile
153rtems/macros/Makefile
154sapi/Makefile
155sapi/src/Makefile
156sapi/include/Makefile
157sapi/include/rtems/sptables.h
158sapi/inline/Makefile
159sapi/macros/Makefile
160score/Makefile
161score/cpu/Makefile
162score/include/Makefile
163score/inline/Makefile
164score/macros/Makefile
165score/src/Makefile
166wrapup/Makefile
167])
168AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.