source: rtems/cpukit/configure.ac @ 45633aa

Last change on this file since 45633aa was 45633aa, checked in by Ralf Corsepius <ralf.corsepius@…>, on Mar 6, 2003 at 9:38:10 AM

2003-03-06 Ralf Corsepius <corsepiu@…>

  • configure.ac: Remove AC_CONFIG_AUX_DIR.
  • aclocal/rtems-top.m4: Add AC_CONFIG_AUX_DIR.
  • Property mode set to 100644
File size: 4.5 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
33RTEMS_CHECK_NEWLIB
34
35RTEMS_CHECK_MULTIPROCESSING
36RTEMS_CHECK_POSIX_API
37RTEMS_CHECK_ITRON_API
38RTEMS_CHECK_NETWORKING
39
40# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
41AS_IF([test "$RTEMS_USE_MACROS" = "yes"],
42  [INLINEdir="macros"],
43  [INLINEdir="inline"])
44AC_SUBST(INLINEdir)
45AM_CONDITIONAL(INLINE,test x"$INLINEdir" = x"inline" )
46AM_CONDITIONAL(MACROS,test x"$INLINEdir" = x"macros" )
47AM_CONDITIONAL(HAS_MP,test x"$HAS_MP" = x"yes" )
48
49AC_DEFINE(RTEMS_VERSION,["rtems-][_RTEMS_VERSION]["],[RTEMS version string])
50
51AM_CONDITIONAL(HAS_POSIX,test x"$HAS_POSIX_API" = x"yes")
52AM_CONDITIONAL(HAS_ITRON,test x"$HAS_ITRON_API" = x"yes")
53AM_CONDITIONAL(HAS_NETWORKING,test x"$HAS_NETWORKING" = x"yes")
54
55AS_IF([test x"$HAS_POSIX_API" = x"yes"],
56  [AC_CONFIG_SUBDIRS([posix])]
57)
58AS_IF([test x"$HAS_ITRON_API" = x"yes"],
59  [AC_CONFIG_SUBDIRS(itron)]
60)
61RTEMS_CPU_SUBDIRS([score/cpu])
62# FIXME: All ports should have a libscorecpu.a - But the powerpc doesn't!
63AM_CONDITIONAL([LIBSCORECPU],
64[test -f "${srcdir}/score/cpu/${RTEMS_CPU}/cpu.c"])
65
66AC_CONFIG_SUBDIRS([libcsupport])
67AC_CONFIG_SUBDIRS([libblock])
68AC_CONFIG_SUBDIRS([libfs])
69AS_IF([test x"$HAS_NETWORKING" = x"yes"],[
70  AC_CONFIG_SUBDIRS(libnetworking)
71## FIXME: Should better use a feature-based test
72AC_MSG_CHECKING([whether CPU supports librpc])
73  case "$RTEMS_CPU" in
74  c4x )  LIBRPC=no;;
75  or32 ) LIBRPC=no;;
76  * )    LIBRPC=yes;;
77  esac
78AC_MSG_RESULT([$LIBRPC])
79  AS_IF([test "$LIBRPC" = "yes"],
80    [AC_CONFIG_SUBDIRS([librpc])
81  ])
82])
83AM_CONDITIONAL(LIBRPC,[test "$LIBRPC" = "yes"])
84
85AC_ARG_ENABLE([ada],
86[AC_HELP_STRING([--enable-ada],[enable ada support])],
87[case "${enable_ada}" in
88  yes) ;;
89  no) ;;
90  *)  AC_MSG_ERROR([bad value ${enable_ada} for --enable-ada]) ;;
91esac],[enable_ada=no])
92
93AS_IF([test x"$enable_ada" = x"yes"],[
94  AS_IF([test x"$HAS_POSIX_API" = x"yes"],[
95    AC_CONFIG_SUBDIRS([ada])
96  ])
97])
98
99RTEMS_DEFINE_POSIX_API
100RTEMS_DEFINE_ITRON_API
101RTEMS_DEFINE_MULTIPROCESSING
102
103# HACK: We should use a feature-based configuration.
104AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
105  AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix])
106# HACK: silently accept --enable-unixlib
107  test -n "${enable_unixlib}" || enable_unixlib="yes"
108])
109
110AM_CONDITIONAL(UNIX,[test x"${RTEMS_CPU}" = x"unix"])
111
112AS_IF([test x"${enable_unixlib}" = x"yes"],
113  [AC_DEFINE_UNQUOTED([RTEMS_UNIXLIB],[1],
114    [to indicate RTEMS using RTEMS's unixlib])]
115)
116
117
118AM_CONFIG_HEADER([score/include/rtems/score/cpuopts-tmp.h],[
119echo "/* target cpu dependent options file */"         >$tmp/config.h
120echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h
121echo                                                  >>$tmp/config.h
122echo "#ifndef __CPU_OPTIONS_h"                        >>$tmp/config.h
123echo "#define __CPU_OPTIONS_h"                        >>$tmp/config.h
124echo                                                  >>$tmp/config.h
125sed -e '/.*PACKAGE.*/d' score/include/rtems/score/cpuopts-tmp.h >> $tmp/config.h
126echo                                                  >>$tmp/config.h
127echo "#endif"                                         >>$tmp/config.h
128AS_IF([cmp -s score/include/rtems/score/cpuopts.h $tmp/config.h 2>/dev/null],
129  [AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
130   rm -f $tmp/config.h],
131  [AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
132   rm -f score/include/rtems/score/cpuopts.h
133   mv $tmp/config.h score/include/rtems/score/cpuopts.h])
134])
135
136AC_ENABLE_MULTILIB([Makefile],[..])
137
138## HACK: Add a define to cpuopts.h to indicate using multilibs
139## Can be applied to produce compiler errors if using
140## multilib-incompatible settings somewhere else (eg. bspopts.h).
141AS_IF([test x"${enable_multilib}" = x"yes"],[
142  AC_DEFINE_UNQUOTED([RTEMS_MULTILIBS],[1],[using multilib'ed RTEMS])
143])
144
145AC_CONFIG_SUBDIRS([libmisc])
146
147# Explicitly list all Makefiles here
148AC_CONFIG_FILES([Makefile
149include/Makefile
150rtems/Makefile
151sapi/Makefile
152score/Makefile
153score/cpu/Makefile
154wrapup/Makefile
155])
156AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.