source: rtems/c/src/lib/configure.in @ 6fc973e

4.104.114.84.95
Last change on this file since 6fc973e was 6fc973e, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 18, 1999 at 4:49:52 PM

Patch from Ralf Corsepius <corsepiu@…>:

Here is another fix, which addresses a few more or less severe bugs in
configuration and unix/posix:

  • Configuration fix: c/src/lib/configure.in didn't handle RDBG correctly
  • Configuration fix: make depend was non-functional in c/src/lib/libc/Makefile.in
  • Configuration fix: stray comment removed from aclocal/target.m4
  • RTEMS fix: termios support for unix/posix now uses the host's headers only (was completely broken).
  • Don't install RTEMS's newlib sys/termios.h for unix (sys/termios.h apparently is a newlib specific header)
  • To be able to compile RTEMS's termios.c with glibc2.1, glibc-2.1 needs USE_MISC, which is a private define from gcc's features.h, being defined only when _BSD_SOURCE of _SVID_SOURCE is defined. RTEMS's termios apparently implements BSD, thus -D_BSD_SOURCE was added to Linux-posix.cfg.
  • Conflicting definitions for USE_MISC and _BSD_SOURCE inside of RTEMS codes removed due to definition of _BSD_SOURCE on the toplevel.

This fix has been tested with linux/posix (primary glibc2.1 native),
linux/posix (secondary libc5 native), sh/gensh1, i386/pc386 and a couple
of other bsp's/CPU.

To apply:

cd <srcdir>
patch -p1 < rtems-rc-19990709-9.diff

and

aclocal -I aclocal && automake && autoconf
cd c/src/lib; autoconf

or

./autogen

  • Property mode set to 100644
File size: 4.8 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl
3dnl  $Id$
4
5AC_PREREQ(2.13)
6AC_INIT(libbsp)
7RTEMS_TOP(../../..)
8AC_CONFIG_AUX_DIR(../../..)
9
10AC_PROG_MAKE_SET
11RTEMS_CANONICAL_TARGET_CPU
12
13AM_MAINTAINER_MODE
14
15RTEMS_ENABLE_MULTIPROCESSING
16RTEMS_ENABLE_NETWORKING
17RTEMS_ENABLE_RDBG
18RTEMS_ENABLE_CXX
19RTEMS_ENABLE_GCC28
20RTEMS_ENABLE_LIBCDIR
21RTEMS_ENABLE_BARE
22RTEMS_ENABLE_HWAPI
23
24RTEMS_ENV_RTEMSBSP
25
26AC_PROG_INSTALL
27
28RTEMS_CHECK_CPU
29RTEMS_CANONICAL_HOST
30
31RTEMS_PROJECT_ROOT
32
33dnl check target cc
34RTEMS_PROG_CC_FOR_TARGET
35
36dnl check for g++
37if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
38  RTEMS_PROG_CXX_FOR_TARGET
39fi
40
41RTEMS_CANONICALIZE_TOOLS
42
43dnl if this is an i386, does gas have good code16 support?
44RTEMS_I386_GAS_CODE16
45AM_CONDITIONAL(RTEMS_GAS_CODE16,test "$RTEMS_GAS_CODE16" = "yes");
46
47# find all the Makefiles for the BSPs
48makefiles="$makefiles libbsp/$RTEMS_CPU/Makefile"
49
50if test "${RTEMS_BSP}" = "bare"; then
51makefiles="$makefiles libbsp/bare/Makefile"
52fi
53
54RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
55RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
56RTEMS_CHECK_CXX(RTEMS_BSP)
57RTEMS_CHECK_NETWORKING(RTEMS_BSP)
58
59RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
60
61# Is there code where there should be for this BSP?
62# The bare bsp is a special case as it is not under the RTEMS_CPU path
63case ${RTEMS_BSP} in
64  bare)
65    bspcpudir=
66    if test "X${BARE_CPU_CFLAGS}" = "X" ; then
67      AC_MSG_ERROR([--enable-bare-cpu-cflags not specified for bare bsp])
68    fi
69    if test "X${BARE_CPU_MODEL}" = "X" ; then
70      AC_MSG_ERROR([--enable-bare-cpu-model not specified for bare bsp])
71    fi
72    ;;
73  *)
74    bspcpudir=$RTEMS_CPU/
75    ;;
76esac
77
78if test "$RTEMS_BSP" = "bare" ; then
79  RTEMS_LIBBSP_CPU_SUBDIR="bare"
80else
81  RTEMS_LIBBSP_CPU_SUBDIR='$(RTEMS_CPU)'
82fi
83AC_SUBST(RTEMS_LIBBSP_CPU_SUBDIR)
84     
85if test -d "$srcdir/libbsp/$bspcpudir$bspdir"; then
86  RTEMS_CHECK_MAKEFILE(libbsp/${bspcpudir}$bspdir)
87  RTEMS_CHECK_MAKEFILE(libbsp/${bspcpudir}shared)
88
89  # HACK: sed out bsp-tools from makefiles
90  t="libbsp/$bspcpudir$bspdir/tools"
91  if test -d "$srcdir/$t"; then
92    bsptools_cfgdirs="$bsptools_cfgdirs $t"
93    makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
94  fi
95else
96  AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for  ${RTEMS_BSP}])
97fi
98
99if test "$HAS_MP" = "yes"; then
100  makefiles="$makefiles libbsp/shmdr/Makefile"
101else
102  # HACK: sed out shmsupp/Makefile from makefiles
103  t="libbsp/$bspcpudir$bspdir/shmsupp"
104  makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
105fi
106
107AM_CONDITIONAL(UNIX,test "$RTEMS_CPU" = "unix")
108# find all the CPU dependent library Makefiles
109RTEMS_CHECK_MAKEFILE(libcpu/$RTEMS_CPU)
110
111dnl Workaround for go32
112case "${target}" in
113changequote(,)dnl
114  i[3456]86-go32-rtems*)
115changequote([,])dnl
116    ;;
117  *)
118    RTEMS_CHECK_MAKEFILE(start/$RTEMS_CPU)
119    ;;
120esac
121
122# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
123if test "$HAS_NETWORKING" = "yes"; then
124  RTEMS_CHECK_MAKEFILE(libnetworking)
125  RTEMS_CHECK_MAKEFILE(librpc)
126
127  if test "$RTEMS_HAS_RDBG" = "yes"; then
128    RTEMS_CHECK_RDBG(RTEMS_BSP)
129
130    if test "$HAS_RDBG" = "yes"; then
131      AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen)
132      AC_PROG_AWK
133      if test -z "$RPCGEN"; then
134        AC_MSG_ERROR([missing rpcgen, required to build librdbg])
135      fi
136      if test -z "$AWK"; then
137        AC_MSG_ERROR([missing awk, required to build librdbg])
138      fi
139    fi
140    if test "$HAS_RDBG" = "yes"; then
141      RTEMS_CHECK_MAKEFILE(librdbg)
142    fi
143  fi
144fi
145
146# If the C++ support is enabled, then include the Makefiles
147if test "$HAS_CPLUSPLUS" = "yes"; then
148  RTEMS_CHECK_MAKEFILE(librtems++)
149fi
150
151# If the HWAPI is enabled, the find the HWAPI Makefiles
152RTEMS_ENABLE_HWAPI
153if test "$RTEMS_HAS_HWAPI" = "yes"; then
154  AC_MSG_CHECKING(whether libwapi is present)
155  if test -f ${srcdir}/libhwapi/Makefile.in ; then
156    AC_MSG_RESULT(yes)
157    makefiles="$makefiles libhwapi/Makefile"
158    RTEMS_CHECK_MAKEFILE(libhwapi/analog)
159    RTEMS_CHECK_MAKEFILE(libhwapi/discrete)
160    RTEMS_CHECK_MAKEFILE(libhwapi/drivers)
161    RTEMS_CHECK_MAKEFILE(libhwapi/non_volatile_memory)
162    RTEMS_CHECK_MAKEFILE(libhwapi/serial)
163    RTEMS_CHECK_MAKEFILE(libhwapi/support)
164    RTEMS_CHECK_MAKEFILE(libhwapi/wrapup)
165  else
166    AC_MSG_ERROR(No source code found for the HWAPI)
167  fi
168fi
169
170AC_SUBST(RTEMS_HAS_CPLUSPLUS)
171AC_SUBST(RTEMS_USE_GCC272)
172AC_SUBST(CC_CFLAGS_DEFAULT)
173AC_SUBST(CC_CFLAGS_DEBUG_V)
174AC_SUBST(CC_CFLAGS_PROFILE_V)
175AC_SUBST(CC_LDFLAGS_PROFILE_V)
176
177# pick up all the Makefiles in required parts of the tree
178if test "$RTEMS_CPU" != "unix"; then
179## HACK: Suppress libchip for unix
180RTEMS_CHECK_MAKEFILE(libchip)
181fi
182
183RTEMS_CHECK_MAKEFILE(libmisc)
184
185AC_CONFIG_SUBDIRS($bsptools_cfgdirs)
186
187# FIXME: libhwapi needs a separate configure.in in future ;-
188# AC_CONFIG_SUBDIRS(libhwapi)
189
190# try to explicitly list a Makefile here
191AC_OUTPUT(
192Makefile
193include/Makefile
194libbsp/Makefile
195libc/Makefile
196libcpu/Makefile
197start/Makefile
198wrapup/Makefile
199$makefiles)
Note: See TracBrowser for help on using the repository browser.