source: rtems/c/src/lib/configure.in @ 1896a650

4.104.114.84.95
Last change on this file since 1896a650 was 1896a650, checked in by Joel Sherrill <joel.sherrill@…>, on 07/30/99 at 17:52:50

Patch from Ralf Corsepius <corsepiu@…>:

The main topic is replacing the hard-coded values for HAS_MP and
HAS_RDBG in custom/*.cfg with per-bsp configuration-time autoconf checks
(This is the patch I had mentioned before earlier this week).

CHANGES

  • HAS_MP removed from custom/*.cfg, replaced with configuration time autoconf check
  • HAS_RDBG removed from custom/*.cfg, replaced with configuration-time autoconf check
  • NEW: c/src/make/bsp.cfg.in, takes configuration-time checked per-bsp values (i.e. HAS_MP, HAS_RDBG), gets installed as $(prefix)/<bsp>/make/bsp.cfg
  • NEW: default.cfg includes bsp.cfg - this change is backward compatible.
  • IMPORT_SRC: apply VPATH instead for ts_386ex/i386ex subdirectory Makefile.ins
  • HACK: a bug in acpolish mis-handles addtions to makefile variables which are enclosed in gmake conditionals: c/src/lib/libbsp/m68k/ods68302/start302/Makefile.in
  • Apply inline_dir, HAS_MP and HAS_RDBG for avoiding configuration of unneeded subdirectories in various configure.in files.
  • Several minor changes in Makefile.ins and configure.ins, wrt. to the order of including *.cfg and defining Makefile variables

APPLYING THE PATCH:

patch -p1 < rtems-rc-19990709-4.diff
./autogen

  • Property mode set to 100644
File size: 5.0 KB
RevLine 
[eb299afc]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_POSIX
17RTEMS_ENABLE_NETWORKING
18RTEMS_ENABLE_RDBG
19RTEMS_ENABLE_INLINES
20RTEMS_ENABLE_CXX
21RTEMS_ENABLE_GCC28
22RTEMS_ENABLE_LIBCDIR
23RTEMS_ENABLE_BARE
24RTEMS_ENABLE_HWAPI
25
26RTEMS_ENV_RTEMSBSP
27
28AC_PROG_INSTALL
29
30RTEMS_CHECK_CPU
31RTEMS_CANONICAL_HOST
32
33RTEMS_PROJECT_ROOT
34
35dnl check target cc
36RTEMS_PROG_CC_FOR_TARGET
37
38dnl check for g++
39if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
40  RTEMS_PROG_CXX_FOR_TARGET
41fi
42
43RTEMS_CANONICALIZE_TOOLS
44
45dnl if this is an i386, does gas have good code16 support?
46RTEMS_I386_GAS_CODE16
47AM_CONDITIONAL(RTEMS_GAS_CODE16,test "$RTEMS_GAS_CODE16" = "yes");
48
49RTEMS_CHECK_SYSV_UNIX
50
51# find all the Makefiles for the BSPs
52makefiles="$makefiles libbsp/$RTEMS_CPU/Makefile"
53
54if test "${RTEMS_BSP}" = "bare"; then
55makefiles="$makefiles libbsp/bare/Makefile"
56fi
57
58RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
[1896a650]59RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
[eb299afc]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
101AM_CONDITIONAL(UNIX,test "$RTEMS_CPU" = "unix")
102# find all the CPU dependent library Makefiles
103RTEMS_CHECK_MAKEFILE(libcpu/$RTEMS_CPU)
104
105dnl Workaround for go32
106case "${target}" in
107changequote(,)dnl
108  i[3456]86-go32-rtems*)
109changequote([,])dnl
110    ;;
111  *)
112    RTEMS_CHECK_MAKEFILE(start/$RTEMS_CPU)
113    ;;
114esac
115
116# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
117if test "$RTEMS_USE_MACROS" = "yes"; then
118  inline_dir=macros
119  if test "$RTEMS_HAS_POSIX_API" = "yes"; then
120    # The problem is that there is currently no code in posix/macros :)
121    AC_MSG_ERROR(Macros are not implemented for the POSIX API)
122  fi
123else
124  inline_dir=inline
125fi
126
127# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
128AC_MSG_CHECKING([if networking is enabled? ])
129AC_MSG_RESULT($RTEMS_HAS_NETWORKING)
130if test "$RTEMS_HAS_NETWORKING" = "yes"; then
131  RTEMS_CHECK_MAKEFILE(libnetworking)
132  RTEMS_CHECK_MAKEFILE(librpc)
133
134  if test "$RTEMS_HAS_RDBG" = "yes"; then
[1896a650]135    RTEMS_CHECK_RDBG(RTEMS_BSP)
[eb299afc]136
[1896a650]137    if test "$HAS_RDBG" = "yes"; then
[eb299afc]138      AC_CHECK_PROG(RPCGEN,rpcgen,rpcgen)
139      AC_PROG_AWK
140      if test -z "$RPCGEN"; then
141        AC_MSG_ERROR([missing rpcgen, required to build librdbg])
142      fi
143      if test -z "$AWK"; then
144        AC_MSG_ERROR([missing awk, required to build librdbg])
145      fi
146    fi
[1896a650]147    if test "$HAS_RDBG" = "yes"; then
[eb299afc]148      RTEMS_CHECK_MAKEFILE(librdbg)
149    fi
150  fi
151fi
152
153# If the C++ support is enabled, then include the Makefiles
154if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
155  RTEMS_CHECK_MAKEFILE(librtems++)
156fi
157
158# If the HWAPI is enabled, the find the HWAPI Makefiles
159RTEMS_ENABLE_HWAPI
160if test "$RTEMS_HAS_HWAPI" = "yes"; then
161  AC_MSG_CHECKING(whether libwapi is present)
162  if test -f ${srcdir}/libhwapi/Makefile.in ; then
163    AC_MSG_RESULT(yes)
164    makefiles="$makefiles libhwapi/Makefile"
165    RTEMS_CHECK_MAKEFILE(libhwapi/analog)
166    RTEMS_CHECK_MAKEFILE(libhwapi/discrete)
167    RTEMS_CHECK_MAKEFILE(libhwapi/drivers)
168    RTEMS_CHECK_MAKEFILE(libhwapi/non_volatile_memory)
169    RTEMS_CHECK_MAKEFILE(libhwapi/serial)
170    RTEMS_CHECK_MAKEFILE(libhwapi/support)
171    RTEMS_CHECK_MAKEFILE(libhwapi/wrapup)
172  else
173    AC_MSG_ERROR(No source code found for the HWAPI)
174  fi
175fi
176
177AC_SUBST(RTEMS_HAS_CPLUSPLUS)
178AC_SUBST(RTEMS_USE_GCC272)
179AC_SUBST(CC_CFLAGS_DEFAULT)
180AC_SUBST(CC_CFLAGS_DEBUG_V)
181AC_SUBST(CC_CFLAGS_PROFILE_V)
182AC_SUBST(CC_LDFLAGS_PROFILE_V)
183
184# pick up all the Makefiles in required parts of the tree
185RTEMS_CHECK_MAKEFILE(libchip)
186RTEMS_CHECK_MAKEFILE(libmisc)
187
188AC_CONFIG_SUBDIRS($bsptools_cfgdirs)
189
190# FIXME: libhwapi needs a separate configure.in in future ;-
191# AC_CONFIG_SUBDIRS(libhwapi)
192
193# try to explicitly list a Makefile here
194AC_OUTPUT(
195Makefile
196include/Makefile
197libbsp/Makefile
198libbsp/shmdr/Makefile
199libc/Makefile
200libcpu/Makefile
201start/Makefile
202wrapup/Makefile
203$makefiles)
Note: See TracBrowser for help on using the repository browser.