source: rtems/c/src/lib/configure.in @ 01be59d

4.104.114.84.95
Last change on this file since 01be59d was 01be59d, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 10, 1999 at 3:08:58 PM

Patch from Ralf Corsepius <corsepiu@…> to correct a minor
problem with the HAS_MP patch and regenerated files.

  • 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
47RTEMS_CHECK_SYSV_UNIX
48
49# find all the Makefiles for the BSPs
50makefiles="$makefiles libbsp/$RTEMS_CPU/Makefile"
51
52if test "${RTEMS_BSP}" = "bare"; then
53makefiles="$makefiles libbsp/bare/Makefile"
54fi
55
56RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
57RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
58RTEMS_CHECK_CXX(RTEMS_BSP)
59RTEMS_CHECK_NETWORKING(RTEMS_BSP)
60
61RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
62
63# Is there code where there should be for this BSP?
64# The bare bsp is a special case as it is not under the RTEMS_CPU path
65case ${RTEMS_BSP} in
66  bare)
67    bspcpudir=
68    if test "X${BARE_CPU_CFLAGS}" = "X" ; then
69      AC_MSG_ERROR([--enable-bare-cpu-cflags not specified for bare bsp])
70    fi
71    if test "X${BARE_CPU_MODEL}" = "X" ; then
72      AC_MSG_ERROR([--enable-bare-cpu-model not specified for bare bsp])
73    fi
74    ;;
75  *)
76    bspcpudir=$RTEMS_CPU/
77    ;;
78esac
79
80if test "$RTEMS_BSP" = "bare" ; then
81  RTEMS_LIBBSP_CPU_SUBDIR="bare"
82else
83  RTEMS_LIBBSP_CPU_SUBDIR='$(RTEMS_CPU)'
84fi
85AC_SUBST(RTEMS_LIBBSP_CPU_SUBDIR)
86     
87if test -d "$srcdir/libbsp/$bspcpudir$bspdir"; then
88  RTEMS_CHECK_MAKEFILE(libbsp/${bspcpudir}$bspdir)
89  RTEMS_CHECK_MAKEFILE(libbsp/${bspcpudir}shared)
90
91  # HACK: sed out bsp-tools from makefiles
92  t="libbsp/$bspcpudir$bspdir/tools"
93  if test -d "$srcdir/$t"; then
94    bsptools_cfgdirs="$bsptools_cfgdirs $t"
95    makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
96  fi
97else
98  AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for  ${RTEMS_BSP}])
99fi
100
101if test "$HAS_MP" = "yes"; then
102  makefiles="$makefiles libbsp/shmdr/Makefile"
103else
104  # HACK: sed out shmsupp/Makefile from makefiles
105  t="libbsp/$bspcpudir$bspdir/shmsupp"
106  makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
107fi
108
109AM_CONDITIONAL(UNIX,test "$RTEMS_CPU" = "unix")
110# find all the CPU dependent library Makefiles
111RTEMS_CHECK_MAKEFILE(libcpu/$RTEMS_CPU)
112
113dnl Workaround for go32
114case "${target}" in
115changequote(,)dnl
116  i[3456]86-go32-rtems*)
117changequote([,])dnl
118    ;;
119  *)
120    RTEMS_CHECK_MAKEFILE(start/$RTEMS_CPU)
121    ;;
122esac
123
124# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
125if test "$HAS_NETWORKING" = "yes"; then
126  RTEMS_CHECK_MAKEFILE(libnetworking)
127  RTEMS_CHECK_MAKEFILE(librpc)
128
129  if test "$HAS_RDBG" = "yes"; then
130    RTEMS_CHECK_RDBG(RTEMS_BSP)
131
132    if test "$HAS_RDBG" = "yes"; then
133      AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen)
134      AC_PROG_AWK
135      if test -z "$RPCGEN"; then
136        AC_MSG_ERROR([missing rpcgen, required to build librdbg])
137      fi
138      if test -z "$AWK"; then
139        AC_MSG_ERROR([missing awk, required to build librdbg])
140      fi
141    fi
142    if test "$HAS_RDBG" = "yes"; then
143      RTEMS_CHECK_MAKEFILE(librdbg)
144    fi
145  fi
146fi
147
148# If the C++ support is enabled, then include the Makefiles
149if test "$HAS_CPLUSPLUS" = "yes"; then
150  RTEMS_CHECK_MAKEFILE(librtems++)
151fi
152
153# If the HWAPI is enabled, the find the HWAPI Makefiles
154RTEMS_ENABLE_HWAPI
155if test "$RTEMS_HAS_HWAPI" = "yes"; then
156  AC_MSG_CHECKING(whether libwapi is present)
157  if test -f ${srcdir}/libhwapi/Makefile.in ; then
158    AC_MSG_RESULT(yes)
159    makefiles="$makefiles libhwapi/Makefile"
160    RTEMS_CHECK_MAKEFILE(libhwapi/analog)
161    RTEMS_CHECK_MAKEFILE(libhwapi/discrete)
162    RTEMS_CHECK_MAKEFILE(libhwapi/drivers)
163    RTEMS_CHECK_MAKEFILE(libhwapi/non_volatile_memory)
164    RTEMS_CHECK_MAKEFILE(libhwapi/serial)
165    RTEMS_CHECK_MAKEFILE(libhwapi/support)
166    RTEMS_CHECK_MAKEFILE(libhwapi/wrapup)
167  else
168    AC_MSG_ERROR(No source code found for the HWAPI)
169  fi
170fi
171
172AC_SUBST(RTEMS_HAS_CPLUSPLUS)
173AC_SUBST(RTEMS_USE_GCC272)
174AC_SUBST(CC_CFLAGS_DEFAULT)
175AC_SUBST(CC_CFLAGS_DEBUG_V)
176AC_SUBST(CC_CFLAGS_PROFILE_V)
177AC_SUBST(CC_LDFLAGS_PROFILE_V)
178
179# pick up all the Makefiles in required parts of the tree
180if test "$RTEMS_CPU" != "unix"; then
181## HACK: Suppress libchip for unix
182RTEMS_CHECK_MAKEFILE(libchip)
183fi
184
185RTEMS_CHECK_MAKEFILE(libmisc)
186
187AC_CONFIG_SUBDIRS($bsptools_cfgdirs)
188
189# FIXME: libhwapi needs a separate configure.in in future ;-
190# AC_CONFIG_SUBDIRS(libhwapi)
191
192# try to explicitly list a Makefile here
193AC_OUTPUT(
194Makefile
195include/Makefile
196libbsp/Makefile
197libc/Makefile
198libcpu/Makefile
199start/Makefile
200wrapup/Makefile
201$makefiles)
Note: See TracBrowser for help on using the repository browser.