source: rtems/cpukit/configure.ac @ b31b35f

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

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

  • configure.ac: Add libmisc/fsmount/Makefile.
  • Property mode set to 100644
File size: 8.2 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])
[85956f9]51
[85eb57e7]52AS_IF([test x"$HAS_NETWORKING" = x"yes"],[
53## FIXME: Should better use a feature-based test
[e336882]54AC_MSG_CHECKING([whether CPU supports librpc])
[85eb57e7]55  case "$RTEMS_CPU" in
56  c4x )  LIBRPC=no;;
57  or32 ) LIBRPC=no;;
58  * )    LIBRPC=yes;;
59  esac
[e336882]60AC_MSG_RESULT([$LIBRPC])
[2a582aa5]61])
[07da959]62
[965c49b2]63AC_ARG_ENABLE([ada],
64[AC_HELP_STRING([--enable-ada],[enable ada support])],
65[case "${enable_ada}" in
66  yes) ;;
67  no) ;;
68  *)  AC_MSG_ERROR([bad value ${enable_ada} for --enable-ada]) ;;
69esac],[enable_ada=no])
70
[b8a30d07]71RTEMS_DEFINE_POSIX_API
72RTEMS_DEFINE_ITRON_API
73RTEMS_DEFINE_MULTIPROCESSING
74
[c0394d4b]75# HACK: We should use a feature-based configuration.
[8217c40]76AS_IF([test x"${RTEMS_CPU}" = x"unix"],[
[64b1f81]77  AC_DEFINE_UNQUOTED([RTEMS_UNIX],[1],[to indicate RTEMS unix])
[8217c40]78# HACK: silently accept --enable-unixlib
[64b1f81]79  test -n "${enable_unixlib}" || enable_unixlib="yes"
[8217c40]80])
81
82AS_IF([test x"${enable_unixlib}" = x"yes"],
[64b1f81]83  [AC_DEFINE_UNQUOTED([RTEMS_UNIXLIB],[1],
[8217c40]84    [to indicate RTEMS using RTEMS's unixlib])]
85)
[c0394d4b]86
[b422de6c]87# BSD-isms, used throughout the sources
88# Not really used by this configure script
89# FIXME: They should be eliminated if possible.
[85956f9]90AC_CHECK_FUNCS([strsep strcasecmp snprintf])
[b422de6c]91AC_CHECK_FUNCS([bcopy bcmp])
92AC_CHECK_FUNCS([isascii fileno])
[f31a078]93
94AM_CONFIG_HEADER([score/include/rtems/score/cpuopts-tmp.h],[
95echo "/* target cpu dependent options file */"         >$tmp/config.h
96echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h
97echo                                                  >>$tmp/config.h
98echo "#ifndef __CPU_OPTIONS_h"                        >>$tmp/config.h
99echo "#define __CPU_OPTIONS_h"                        >>$tmp/config.h
100echo                                                  >>$tmp/config.h
101sed -e '/.*PACKAGE.*/d' score/include/rtems/score/cpuopts-tmp.h >> $tmp/config.h
102echo                                                  >>$tmp/config.h
103echo "#endif"                                         >>$tmp/config.h
104AS_IF([cmp -s score/include/rtems/score/cpuopts.h $tmp/config.h 2>/dev/null],
105  [AC_MSG_NOTICE([score/include/rtems/score/cpuopts.h is unchanged])
106   rm -f $tmp/config.h],
107  [AC_MSG_NOTICE([creating score/include/rtems/score/cpuopts.h])
108   rm -f score/include/rtems/score/cpuopts.h
109   mv $tmp/config.h score/include/rtems/score/cpuopts.h])
110])
[e0ba3e8]111
[8217c40]112AC_ENABLE_MULTILIB([Makefile],[..])
113
[64b1f81]114## HACK: Add a define to cpuopts.h to indicate using multilibs
115## Can be applied to produce compiler errors if using
116## multilib-incompatible settings somewhere else (eg. bspopts.h).
117AS_IF([test x"${enable_multilib}" = x"yes"],[
118  AC_DEFINE_UNQUOTED([RTEMS_MULTILIBS],[1],[using multilib'ed RTEMS])
119])
120
[e30210ea]121# libmisc/shell/* wants to assign file descriptors to stdio file descriptors.
122AC_MSG_CHECKING([for assignable stdio])
123AC_COMPILE_IFELSE(
124  [AC_LANG_PROGRAM(
125    [#include <stdio.h>],
126    [stdin = fopen("/tmp", "r")])],
127  [HAVE_ASSIGNABLE_STDIO=yes],
128  [HAVE_ASSIGNABLE_STDIO=no])
129AC_MSG_RESULT([$HAVE_ASSIGNABLE_STDIO])
130
131# libmisc/serdbg exploits weak symbols
132AC_CACHE_CHECK([whether $CC supports function __attribute__((weak))],
133[rtems_cv_cc_attribute_weak],[
134  AS_IF([test x"$GCC" = xyes],[
135    save_CFLAGS=$CFLAGS
136    CFLAGS=-Werror])
137
138  AC_COMPILE_IFELSE([
139    AC_LANG_PROGRAM(
140    [void myfunc(char c) __attribute__ ((weak));
141     void myfunc(char c) {}],
142    [])],
143    [rtems_cv_cc_attribute_weak=yes],
144    [rtems_cv_cc_attribute_weak=no])
145
146  AS_IF([test x"$GCC" = xyes],[
147    CFLAGS=$save_CFLAGS])
148])
[f7952533]149
[07da959]150AS_IF([test x"$RTEMS_USE_NEWLIB" != x"yes"],[
151## Provide headers only if the host doesn't.
152  AC_CHECK_HEADERS([sys/cdefs.h],[NEED_SYS_CDEFS_H=no],[NEED_SYS_CDEFS_H=yes])
153  AC_CHECK_HEADERS([stdint.h],[NEED_STDINT_H=no],[NEED_STDINT_H=yes])
154  AC_CHECK_HEADERS([inttypes.h],[NEED_INTTYPES_H=no],[NEED_INTTYPES=yes])
155],[
156## Using newlib, we provide sys/cdefs.h
157  NEED_SYS_CDEFS_H=yes
158  NEED_STDINT_H=yes
159  NEED_INTTYPES_H=yes
160])
161
162# FIXME: These checks are only in here to provide
163# configuration-time diagnostics and are not really used.
164AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include <limits.h>])
165AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>])
166
167AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],[
168ac_cv_have_decl_XTABS=yes
169ac_cv_have_decl_OLCUC=yes
170## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD)
171ac_cv_have_decl_ONLRET=yes
172ac_cv_have_decl_ONOCR=yes
173ac_cv_have_decl_TABDLY=yes
174ac_cv_have_decl_OCRNL=yes
175ac_cv_have_decl_IUCLC=yes
176## SUSV3-XSI extension
177ac_cv_have_decl_ECHOPRT=yes
178])
179
180# FIXME: Some cruft to work around portability issues with termios.c
181## Seemingly not covered by any standard.
182AC_CHECK_DECLS([XTABS],,,[#include <termios.h>])
183AC_CHECK_DECLS([OLCUC],,,[#include <termios.h>])
184## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD)
185AC_CHECK_DECLS([ONLRET],,,[#include <termios.h>])
186AC_CHECK_DECLS([ONOCR],,,[#include <termios.h>])
187AC_CHECK_DECLS([TABDLY],,,[#include <termios.h>])
188AC_CHECK_DECLS([OCRNL],,,[#include <termios.h>])
189AC_CHECK_DECLS([IUCLC],,,[#include <termios.h>])
190## SUSV3-XSI extension
191AC_CHECK_DECLS([ECHOPRT],,,[#include <termios.h>])
192
193## BSD-ism, excluded from POSIX, but available on most platforms
194AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>])
195
196## Check if libc provides BSD's strlcpy/strlcat
197AC_CHECK_FUNCS(strlcpy strlcat)
198
199
200# ... far too many conditionals ...
[b422de6c]201AM_CONDITIONAL(LIBRPC,[test "$LIBRPC" = "yes"])
202AM_CONDITIONAL(UNIX,[test x"${RTEMS_CPU}" = x"unix"])
[07da959]203AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes")
[b422de6c]204
205AM_CONDITIONAL(INLINE,test x"$INLINEdir" = x"inline" )
206AM_CONDITIONAL(MACROS,test x"$INLINEdir" = x"macros" )
207AM_CONDITIONAL(HAS_MP,test x"$HAS_MP" = x"yes" )
208
209AM_CONDITIONAL(HAS_POSIX,test x"$HAS_POSIX_API" = x"yes")
210AM_CONDITIONAL(HAS_ITRON,test x"$HAS_ITRON_API" = x"yes")
211AM_CONDITIONAL(HAS_NETWORKING,test x"$HAS_NETWORKING" = x"yes")
212
213# FIXME: All ports should have a libscorecpu.a - But the powerpc doesn't!
214AM_CONDITIONAL([LIBSCORECPU],
215[test -f "${srcdir}/score/cpu/${RTEMS_CPU}/cpu.c"])
216
[92ed8c2]217AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
218  && test x"$HAS_POSIX_API" = x"yes"])
219
[07da959]220AM_CONDITIONAL([NEED_SYS_CDEFS_H],[test x"$NEED_SYS_CDEFS_H" = x"yes"])
221AM_CONDITIONAL([NEED_STDINT_H],[test x"$NEED_STDINT_H" = x"yes"])
222AM_CONDITIONAL([NEED_INTTYPES_H],[test x"$NEED_INTTYPES_H" = x"yes"])
223
[e30210ea]224AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
225AM_CONDITIONAL([LIBSERDBG],[test x"$rtems_cv_cc_attribute_weak" = x"yes"])
226
[70810dc]227# Explicitly list all Makefiles here
[b422de6c]228AC_CONFIG_FILES([
229Makefile
[8217c40]230include/Makefile
[b422de6c]231ada/Makefile
[1896a650]232rtems/Makefile
233sapi/Makefile
[eb299afc]234score/Makefile
235score/cpu/Makefile
[b422de6c]236posix/Makefile
237itron/Makefile
238libblock/Makefile
239libfs/Makefile
[e604ab6]240libfs/src/Makefile
241libfs/src/imfs/Makefile
[b422de6c]242libfs/src/dosfs/Makefile
[07da959]243libcsupport/Makefile
[b422de6c]244libnetworking/Makefile
[85956f9]245libnetworking/lib/Makefile
246libnetworking/libc/Makefile
[b422de6c]247libnetworking/wrapup/Makefile
[da0fc5d]248librpc/Makefile
249librpc/include/Makefile
250librpc/src/Makefile
251librpc/src/xdr/Makefile
252librpc/src/rpc/Makefile
[b422de6c]253libmisc/Makefile
[e30210ea]254libmisc/cpuuse/Makefile
255libmisc/shell/Makefile
256libmisc/devnull/Makefile
257libmisc/dummy/Makefile
258libmisc/dumpbuf/Makefile
259libmisc/monitor/Makefile
260libmisc/rtmonuse/Makefile
261libmisc/serdbg/Makefile
262libmisc/stackchk/Makefile
263libmisc/capture/Makefile
264libmisc/untar/Makefile
265libmisc/mw-fb/Makefile
[b31b35f]266libmisc/fsmount/Makefile
[e30210ea]267libmisc/wrapup/Makefile
268
[b422de6c]269wrapup/Makefile
270])
[92ed8c2]271
[66387986]272AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.