OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [configure.in] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
dnl Process this file with autoconf to produce a configure script.
2
dnl ====================================================================
3
dnl
4
dnl     configure.in
5
dnl
6
dnl     Top-level configure script for eCos software.
7
dnl
8
dnl ====================================================================
9
dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
10
dnl -------------------------------------------
11
dnl This file is part of the eCos host tools.
12
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
13
dnl
14
dnl This program is free software; you can redistribute it and/or modify
15
dnl it under the terms of the GNU General Public License as published by
16
dnl the Free Software Foundation; either version 2 or (at your option) any
17
dnl later version.
18
dnl
19
dnl This program is distributed in the hope that it will be useful, but
20
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
21
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22
dnl General Public License for more details.
23
dnl
24
dnl You should have received a copy of the GNU General Public License
25
dnl along with this program; if not, write to the
26
dnl Free Software Foundation, Inc., 51 Franklin Street,
27
dnl Fifth Floor, Boston, MA  02110-1301, USA.
28
dnl -------------------------------------------
29
dnl ####ECOSHOSTGPLCOPYRIGHTEND####
30
dnl ====================================================================
31
dnl#####DESCRIPTIONBEGIN####
32
dnl
33
dnl Author(s):  bartv
34
dnl Contact(s): bartv
35
dnl Date:       1998/12/17
36
dnl Version:    0.01
37
dnl
38
dnl####DESCRIPTIONEND####
39
dnl ====================================================================
40
 
41
dnl eCos is a componentized architecture for deeply embedded systems.
42
dnl It requires a very different configuration system from typical
43
dnl autoconfiscated software such as the various GNU packages.
44
dnl
45
dnl The main eCos host-side software is autoconfiscated to some extent,
46
dnl in that the usual sequence of "configure;make;make install" will
47
dnl work under the right conditions. However it does not conform to
48
dnl the GNU coding standards in numerous ways, for example "make dist"
49
dnl will not work. The main eCos host-side software lives in the
50
dnl "host" subdirectory, and is built unconditionally.
51
dnl
52
dnl The eCos target-side software lives in the "packages" subdirectory,
53
dnl and is organized in numerous subdirectories corresponding to different
54
dnl packages and potentially different versions of each package. In the
55
dnl master repository managed by CVS there will only be one version of
56
dnl each package, "current", which simplifies things somewhat. Other
57
dnl repositories will not be quite so straightforward and require a
58
dnl suitable administration tool.
59
dnl
60
dnl The various eCos packages are not currently auto-confiscated.
61
dnl In particular building eCos requires the use of eCos configuration
62
dnl technology, not autoconf - there is simply no good way of handling
63
dnl a system as highly configurable as eCos using a few command-line
64
dnl options passed to "configure". There would also be serious confusion
65
dnl between host and target, especially when e.g. cross-compiling the
66
dnl host tools. However a possible future enhancement
67
dnl would involve making eCos releases via configure and make, thus
68
dnl allowing for a release process that combines building the various
69
dnl host-side tools such as gcc with creating eCos epk's for the various
70
dnl packages.
71
dnl
72
dnl A complication is that some of the eCos target-side packages also
73
dnl contain package-specific host-side support. For example the
74
dnl Linux synthetic target support uses special host-side software
75
dnl to provide I/O facilities: the architectural HAL package provdes
76
dnl generic support, the synthetic ethernet package extends this
77
dnl with ethernet support, and so on. Such package-specific host-side
78
dnl software does not belong in the main host subdirectory, that
79
dnl would make it very difficult to distribute new packages or
80
dnl new versions of a package. However keeping the code with the
81
dnl various packages makes building more complicated.
82
dnl
83
dnl   1) if the entire repository is managed by CVS or anoncvs, this
84
dnl      configure script will search the packages tree for any packages
85
dnl      that have host-side software that needs to be built -
86
dnl      specifically, that have a file "configure" inside a "host"
87
dnl      subdirectory in a version of a package.
88
dnl
89
dnl   2) if instead the repository contains additional packages
90
dnl      installed as epk's and managed by an administration tool then
91
dnl      it is the responsibility of that tool to let the users build
92
dnl      and rebuild the host-side software as required, for whichever
93
dnl      host platform or platforms are being used. In other words
94
dnl      it is the responsibility of the admin tool to create a
95
dnl      suitable build directory and run "configure; make; make install",
96
dnl      usually as part of the installation process. Note that several
97
dnl      versions of a package may be installed, and it is the
98
dnl      responsibility of each package to take this into account
99
dnl      (although the configure macros are aware of this to some extent,
100
dnl      and will e.g. generate suitable install directory names).
101
dnl      Also note that the top-level configure script will not pick
102
dnl      up such packages because they will be versioned, i.e. the
103
dnl      test for current/host/configure will fail because the
104
dnl      version will not be "current".
105
dnl
106
dnl   3) as a special case it may be desirable to ship pre-built binaries
107
dnl      of some of the package-specific software. It is not clear
108
dnl      just what would be the best way of shipping these - putting
109
dnl      them into the epk's would not be quite right because that would
110
dnl      make the epk's host-specific rather than generic.
111
dnl
112
dnl There is an unresolved problem with possible dependencies between
113
dnl packages, if e.g. the host-side of the synthetic ethernet package could
114
dnl only be built after the architectural synthetic target package.
115
 
116
dnl Some of the eCos documentation is generic and lives in the "doc"
117
dnl subdirectory. Other eCos documentation is package-specific and lives
118
dnl in the appropriate package directory. At present there is no support
119
dnl for building the documentation via configure and make, but such
120
dnl support may be added in future.
121
dnl
122
dnl There is a subdirectory acsupport containing various files such
123
dnl as config.guess and install.sh that are common. This also contains
124
dnl an acinclude.m4 file with various macros that are useful for
125
dnl eCos.
126
 
127
dnl Generic initialization.
128
AC_INIT(acsupport/config.guess)
129
AC_CONFIG_AUX_DIR(acsupport)
130
AC_CANONICAL_HOST
131
AM_INIT_AUTOMAKE(eCos,2.0,0)
132
AM_MAINTAINER_MODE
133
 
134
dnl Detect attempts at cross-compilation. Usually this is the result
135
dnl of somebody failing to read the documentation or the README.host
136
dnl file.
137
if test "${target_alias}x" != "x" ; then
138
  AC_MSG_ERROR("
139
================================================================
140
You have specified a target ${target_alias}.
141
This configure script is for building the eCos host-side support
142
tools which are independent of the target architecture. It is not
143
used for building eCos itself.
144
 
145
If your intention is to build eCos itself then you should first
146
read the relevant documentation starting with the User's Guide.
147
 
148
If your intention is to rebuild the host-side support tools then
149
there is no need to specify --target.
150
 
151
If your intention is to cross-compile the host-side support tools
152
then you should be using --host instead of --target.
153
================================================================
154
")
155
fi
156
 
157
dnl Make sure the source and build trees are kept separate.
158
ECOS_CHECK_BUILD_ne_SRC
159
 
160
dnl Nothing actually gets built in this directory, so there should be no
161
dnl need to worry about compiler flags etc. Instead, the problem is
162
dnl figuring out what should actually get built.
163
dnl
164
dnl  1) the host subdirectory should always get built, if it exists.
165
dnl     With the 2.0 release system the directory gets moved to
166
dnl     tools/src
167
 
168
if test -f "${srcdir}/host/configure" ; then
169
   ecos_subdirs="host"
170
elif test -f "${srcdir}/tools/src/configure" ; then
171
   ecos_subdirs="tools/src"
172
else
173
   ecos_subdirs=""
174
fi
175
 
176
dnl  2) any package which has a configure script in a
177
dnl     current/host subdirectory should also get built.
178
dnl
179
dnl     Searching the directory tree is currently done by shell globbing.
180
dnl     Invoking "find" with suitable arguments might be quicker, but
181
dnl     less portable. On some hosts there may be problems with environmental
182
dnl     limits if too many packages provide host-side software.
183
dnl
184
dnl     Currently there is no ordering of packages, so e.g. a device
185
dnl     driver's host-side support cannot depend on some HAL package
186
dnl     because the latter may not have been built and installed yet.
187
dnl     This is a good thing because packages are meant to be self-contained
188
dnl     whenever possible. Interaction between packages is typically handled
189
dnl     at the Tcl level at run-time, so there are no build-time complications.
190
 
191
AC_MSG_NOTICE([searching for configure scripts in eCos packages'
192
host subdirectories. This operation can take a long time.
193
If running on Windows and the eCos repository is accessed
194
over a network then it may take some hours.])
195
ecos_hostdirs=""
196
ecos_configure_scripts="${srcdir}/packages/*/*/host/configure"
197
ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/host/configure"
198
ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/*/host/configure"
199
ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/*/*/host/configure"
200
ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/*/*/*/host/configure"
201
for configure in ${ecos_configure_scripts}; do
202
    if test -f ${configure}; then
203
        dnl A configure script has been found in the source tree.
204
        dnl First turn it into a directory, then replace the absolute path
205
        dnl with a relative one.
206
        hostdir=`dirname ${configure}`
207
        hostdir=`echo ${hostdir} | sed -e "s:^${srcdir}/::"`
208
        ecos_hostdirs="${ecos_hostdirs} ${hostdir}"
209
    fi
210
done
211
AC_MSG_NOTICE([found configure scripts in
212
${ecos_hostdirs}])
213
ecos_subdirs="${ecos_subdirs} ${ecos_hostdirs}"
214
 
215
dnl Because the eCos directory layout does not conform to GNU conventions
216
dnl it is necessary to create various levels of intermediate directories.
217
dnl This happens via config.status, prior to the recursion into the
218
dnl appropriate directories.
219
AC_OUTPUT_COMMANDS([${CONFIG_SHELL-/bin/sh} ${ac_top_srcdir}/acsupport/mkinstalldirs ${REQUIRED_DIRS}],REQUIRED_DIRS="${ecos_subdirs}")
220
 
221
dnl This causes warnings with current versions of configure which
222
dnl want literal arguments. Since this script deliberately searches
223
dnl for subdirectories there is no obvious way to eliminate those
224
dnl warnings.
225
AC_CONFIG_SUBDIRS(${ecos_subdirs})
226
AC_OUTPUT(Makefile)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.