source: rtems/c/src/lib/configure.in @ 3a8915e

4.104.114.84.95
Last change on this file since 3a8915e was 3a8915e, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 6, 1999 at 5:55:25 PM

Patch rtems-rc-19990709-6-diff from Ralf Corsepius <corsepiu@…>
applied. This modified many Makefiles and custom files and makes many more
settings (network, multiprocessing, etc) gnerated by autoconf.

  • Property mode set to 100644
File size: 4.7 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"
103fi
104
105AM_CONDITIONAL(UNIX,test "$RTEMS_CPU" = "unix")
106# find all the CPU dependent library Makefiles
107RTEMS_CHECK_MAKEFILE(libcpu/$RTEMS_CPU)
108
109dnl Workaround for go32
110case "${target}" in
111changequote(,)dnl
112  i[3456]86-go32-rtems*)
113changequote([,])dnl
114    ;;
115  *)
116    RTEMS_CHECK_MAKEFILE(start/$RTEMS_CPU)
117    ;;
118esac
119
120# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
121AC_MSG_CHECKING([if networking is enabled? ])
122AC_MSG_RESULT($RTEMS_HAS_NETWORKING)
123if test "$RTEMS_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 "$RTEMS_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
178RTEMS_CHECK_MAKEFILE(libchip)
179RTEMS_CHECK_MAKEFILE(libmisc)
180
181AC_CONFIG_SUBDIRS($bsptools_cfgdirs)
182
183# FIXME: libhwapi needs a separate configure.in in future ;-
184# AC_CONFIG_SUBDIRS(libhwapi)
185
186# try to explicitly list a Makefile here
187AC_OUTPUT(
188Makefile
189include/Makefile
190libbsp/Makefile
191libc/Makefile
192libcpu/Makefile
193start/Makefile
194wrapup/Makefile
195$makefiles)
Note: See TracBrowser for help on using the repository browser.