source: rtems/c/src/tests/configure @ eb299afc

4.104.114.84.95
Last change on this file since eb299afc was eb299afc, checked in by Joel Sherrill <joel.sherrill@…>, on 07/26/99 at 20:20:22

This is part of a major patch from Ralf Corsepius <corsepiu@…>
to move RTEMS more to automake/autoconf and GNU compliance.

Finally, here they are: the "big-patch" patches - merged into one big
patch (~1.5MB).

Sorry for the delay, but testing took much more time than I had expected

  • esp. reworking the acpolish script triggered many more tiny issues than I had expected (cf. below).

At least, now you've got something to spend your weekend with :-.

WARNINGS:

  • I've gone a little (??) further than I had announced before.
  • Several directories have been moved.
  • Several files have been added and removed
  • I have tested it with many BSPs/CPUs and a variety of permutiations of configuration flags, but not with all.
  • Most parts of the patch are automatically generated, however there are many tiny manual modifications.

APPLYING THE PATCH:

./autogen -c
mkdir tools
mv c/src/exec/score/tools tools/cpu
mv c/build-tools tools/build
mv c/update-tools tools/update
patch -p1 -E < rtems-rc-19990709-0.diff
./autogen

If the patch doesn't apply to rtems-cvs, I would suggest that you should
try to apply it brute-force and then to run tools/update/rtems-polish.sh
-ac -am afterwards. A recursive diff between rtems-19990709 + patch and
rtems-cvs + patch then should report only a few dozen significant
changes to configuration files which need to be merged manually (IIRC, I
did not change any source files).

* Attention: There are files to be removed, moved, copied and added
in/to CVS!

NEWS/CHANGES:

  1. Configuration takes place in 3 stages: 1. per host (toplevel configure script), 2. per target (c/configure), 3. per bsp c/src/configure automatically triggered from ./configure and c/Makefile.am.
  2. Building of subdirectory c/ takes place in c/$(target_alias) for cross-targets in c/ for native targets
  3. Building of subdirectory c/src takes place in c/${target_alias}/<bsp> for cross-targets, c/<bsp> for native targets
  4. c/build-tools moved to tools/build
  5. c/src/exec/score/cpu/tools moved to tools/cpu (=cpu-tools split out)
  6. c/update-tools moved to tools/update
  7. New subdirectory c/src/make, handles files from make/ on a per BSP basis
  8. Maintainer mode support: Ie. if configuring with --enable-maintainer-mode disabled (the default), then tracking of many dependencies will be disabled in Makefiles. Esp. many dependencies for auto* generated files will be switched off in Makefiles. Ie. if not using "--enable-maintainer-mode" many auto* generated files will not be updated automatically, i.e. normal users should not be required to have auto* tools anymore (untested).
  9. Independent configuration scripts for / (toplevel), tools/build, tools/cpu, tools/update, c/, c/src/, c/src/exec, c/src/lib, c/src/tests, c/src/make
  10. Automake support for all directories above and besides c/src
  11. "preinstall" now is implemented as depth-first recursive make target
  1. host compiled tools (exception bsp-tools) are accessed in location in the build tree instead of inside the build-tree when building RTEMS.
  2. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the build-tree - many tiny changes as consequence from this.
  3. --with-cross-host support removed (offically announced obsolete by cygnus)
  4. Changing the order of building libraries below c/src/lib/
  5. Former toplevel configure script broken into aclocal/*.m4 macros
  6. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed from *cfg.
  7. sptables.h now generated by autoconf
  8. Rules for "mkinstalldirs temporary installation tree" moved from c/Makefile to subdirectories.
  9. Cpu-tools do not get installed.
  10. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams which are in directories with own configure scripts.
  11. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get overridden from the environment.
  12. FIX: Handling of MP_PIECES in various Makefiles
  13. FIX: Removing "::" rules from some Makefile.ins
  14. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m 755) - Now all include files use -m 644.
  15. Removed many gnumake-conditionals in Makefile.ins - Partially replaced with automake-conditional, partially replaced with conditionalized Makefile variables (... _yes_V)
  16. Massively reworked acpolish: acpolish now parses Makefile.ins and interprets parts of the Makefile.ins.
  17. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with explicit lists of files in Makefile.ins.
  18. FIX: Replacing MKLIB with RANLIB in Makefile.ins
  19. HACK: Add preinstallation for pc386 specific $(PROJECT_RELEASE)/BootImgs? directory

... many more details, I can't recall

KNOWN BUGS:

  1. make [debug|profile]_install do not do what they are promissing. "make [debug|profile] install" does what "make [debug|profile]_install" has been doing. Proposal: remove [debug|profile]_install
  2. Dependencies between temporary installation tree and source tree are not yet handled correctly.
  3. Dependencies between temporary installation tree and source tree are handled ineffencently (Using INSTALL_CHANGE instead of make dependencies)
  4. RTEMS_ROOT, PROJECT_ROOT, top_builddir, RTEMS_TOPdir now are redundant.
  5. The new configure scripts still are in their infancy. They contain redundant checks and might still contain bugs, too.
  6. RTEMS autoconf Makefile.ins use a mixture of configuration information gathered in c/$(target_alias)/<bsp>/make and of information collected from their configure scripts.
  7. make dist is not fully functional
  8. Subdirectory host-/build-/target- configure options (--target, --host, --build) do not conform to Cygnus/GNU conventions.
  9. Some RTEMS autoconf Makefile.in's makefile targets are not supported in automake Makefile.ams/ins (e.g. get, clobber).
  10. Some automake standard targets are not propagated from toplevel and c/Makefile.am to autoconf subdirectories (eg. make dist).
  11. rpcgen generated files are not part of the source-tree (Automake conventions favor supplying generated files inside the source-tree, however there is no support for rpcgen generated files in automake, cf. yacc/lex support in automake).
  12. RTEMS_HAS_RDBG handling is flaky. make/*.cfg use RTEMS_HAS_RDBG per CPU, while librdb's sources can only be built per BSP. Raises the more general question whether librdbg located correctly in the source-tree.
  13. All make/*cfg files are configured per cpu, currently there is no location to store per-bsp configuration information --> bsp.cfg, per aconfig.h?
  14. "make install" without having run "make all" beforehand does not work.
  15. handling of --enable-multiprocessing seems to be broken in make/custom/*
  16. Makefile.ins still exploit many gmake features.
  17. File permisson chaos on libraries (no explict -m for libraries/rels/etc).
  18. mcp750 Makefiles are broken (Note: I *do* mean buggy - I am not talking about "not-conforming to conventions", here :-).
  19. Dependencies between configure scripts are not handled, eg. aborting "make RTEMS_BSP=<bsp>" can leave the build-tree in an unusable state.
  20. "make clean" does not delete <build-tree>/<bsp>. This is intentional for now, because rerunning "make" after "make clean" requires an explicit "make preinstall" afterwards now. This should be done automatically, but doesn't work in this case for now. To work around this problem <build-tree>/<bsp> is kept during "make clean" for now (HACK).

TODO:

  1. split out host-compiled bsp-tools
  2. Use Cygnus/GNU standards for cross-compiling target-subdir (CC=CC_FOR_TARGET .. configure --host=${target_alias} --build=`config.guess'}), to be added to toplevel configure script after splitting out bsp-tools.
  3. Exploit per cpu support directory (c/src/<cpu>)- Splitting out per-cpu libraries - Are there any?
  4. Further automake support
  5. Converting subdirectories into standalone / self-contained subdirectories (Esp. moving their headers to the same common root as their sources, eg. mv lib/include/rtems++ lib/librtems++/include/rtems++) - This is the main obstacle which prevents moving further towards automake.
  6. Propagating values from *.cfg into Makefiles instead of propagating them at make time via Makefile-fragments (i.e. try to avoid using *.cfg).
  7. Testing on cygwin host (I *do* expect cygwin specific problems).
  8. The ARCH in o-$(ARCH)-$(VARIANT) build-subdirectories is not needed anymore.

GENERAL ISSUES:

  1. Temporary installation tree -- Ian and I seem to disagree basically. Though I think that I understand his argumentation, I do not share it. IMO, his way of using the buildtree is mis-using the build-tree, relying on an inofficial feature of RTEMS's current implementation, which doesn't even work correctly in the current build-tree, though it attempts hard to do so. From my very POV, it unnecessarily complicates the structures of the source- and build-trees. It is not supported by automake (No automatic generation for the necessary rules) and complicates the transition to automake significantly (Generating the rules with an enhanced version of acpolish could be possible). As Ian correctly pointed out, here a management decision is needed - though I don't see the need to draw this decision in short terms.
  1. preinstallation generally is a sure means to spoil the structure of the source tree, IMHO (No ranting intended, I am completly serious about this one). eg. through tree dependencies. The worst problem related to this I have found in the meantime is bsp_specs. bsp_specs is part of libbsp, ie. there is *no* way to build *any* part of the source tree *without* having a BSP *preinstalled*. Note: This issue is related to issue 1., but is not identical - The difference is the change of the order make rules have to be triggered. While preinstallation triggers rules spread all over the source tree before a "make all" can be run, a temporary installation tree could also be installed by post "make all" hooks (all-local:, to be run after make all in a directory is completed) if the directories' dependencies would be a tree,
  1. Stuctural dependencies between subdirectories.
  2. Depth of the source tree (Prevents multilibbing and introduces many unnecessary configure scripts).
  3. per cpu vs. per bsp configuration (There are no real per-cpu parts yets :-).
  4. automake does not support $makefiles in AC_OUTPUT. Unlike before, we now should try to avoid RTEMS_CHECK_MAKEFILE and to hard-code as much paths to Makefiles as possible.
  5. General redesign of the source tree
  6. Main installation point - Changing it to ${prefix}/${target_alias}. ?

Besides item 8. (which is a must, IMHO), as far as I see most of them
can not be solved soon and will remain issues in the mid- to long-term
:-.

REMARKS:

  • You (as the maintainer) should always use --enable-maintainer-mode when building RTEMS to ensure that maintainer mode generated files (esp. those in c/src/make) will be updated when make/* files have changed.
  • Use @RTEMS_BSP@ in Makefile.ins and Makefile.ams below c/src/, $(RTEMS_BSP) or ${RTEMS_BSP} will be overridden from environment variables when using make RTEMS_BSP="....".
  • c/src/make is a temporary cludge until configuration issues are solved. At the moment it is configured per bsp, but contains per-target/cpu info only. Its main purpose now is to circumvent modifying make/*.cfg files, because I consider make/* to be frozen for backward compatibilty.
  • This patch should only affect configuration files. At least I do not remember having touched any source files.
  • To build the bare bsp you now need to mention it in --enable-rtemsbsp.

Example: building gensh1 and sh1/bare simultaneously:
../rtems-rc-19990709-1/configure --target=sh-rtems \
--enable-rtemsbsp="bare gensh1" \
--prefix=/tmp/rtems \
--enable-bare-cpu-cflags='-DMHZ=20 -m1
-DCPU_CONSOLE_DEVNAME=\"/dev/null\"' \
--enable-bare-cpu-model=sh7032 \
--enable-maintainer-mode \
--enable-cxx
make
make install

  • The next steps in development would be to split out bsp-tools and then to change to Cygnus/GNU canonicalization conventions for building the c/ subdirectory afterwards (i.e. many standard AC_*.m4 macros could be used instead of customized versions)

FINAL REMARK:
The issues mentioned in the lists above sound much worser than the
situation actually is. Most of them are not specific to this patch, but
are also valid for the snapshot. I just wrote down what I came across
when working on the patch over the last few weeks.

I wouldn't be too surprised if you don't like the patch at the current
point in development. I am willing to discuss details and problems, I
also have no problem if you would post-pone applying this patch to times
after 4.1, but rejecting it as a whole for all times would be a false
management decision, IMHO.

Therefore I would suggest that you, if your time constaints allow it,
should at least play a little while with this patch to understand what
is going on and before drawing a decision on how to handle this
proposal. I know this patch is neither perfect nor complete, but I
consider it to be a major breakthrough. Don't be anxious because of the
size of the patch, the core of the patch is rather small, the size is
mainly the side effect of some systematic cleanups inside the Makefiles
(result of acpolish).

Feel free to ask if you encounter problems, if you don't understand
something or if you meet bugs - I am far from being perfect and am
prepared to answer them.

Ralf.

--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@… FAX: +49/731/501-999
http://www.faw.uni-ulm.de

  • Property mode set to 100644
File size: 95.9 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --with-target-subdir=DIR"
16ac_help="$ac_help
17  --enable-maintainer-mode enable make rules and dependencies not useful
18                          (and sometimes confusing) to the casual installer"
19ac_help="$ac_help
20  --enable-multiprocessing             enable multiprocessing interface"
21ac_help="$ac_help
22  --enable-posix                       enable posix interface"
23ac_help="$ac_help
24  --enable-networking                  enable TCP/IP stack"
25ac_help="$ac_help
26  --enable-rdbg                        enable remote debugger"
27ac_help="$ac_help
28  --enable-rtems-inlines               enable RTEMS inline functions
29                                       (default:enabled, disable to use macros)"
30ac_help="$ac_help
31  --enable-cxx                         enable C++ support,
32                                       and build the rtems++ library"
33ac_help="$ac_help
34  --enable-gcc28                       enable use of gcc 2.8.x features"
35ac_help="$ac_help
36  --enable-libcdir=directory           set the directory for the C library"
37ac_help="$ac_help
38  --enable-bare-cpu-cflags             specify a particular cpu cflag
39                                       (bare bsp specific)"
40ac_help="$ac_help
41  --enable-bare-cpu-model              specify a particular cpu model
42                                       (bare bsp specific)"
43ac_help="$ac_help
44  --enable-tests                       enable tests (default:disabled)"
45
46# Initialize some variables set by options.
47# The variables have the same names as the options, with
48# dashes changed to underlines.
49build=NONE
50cache_file=./config.cache
51exec_prefix=NONE
52host=NONE
53no_create=
54nonopt=NONE
55no_recursion=
56prefix=NONE
57program_prefix=NONE
58program_suffix=NONE
59program_transform_name=s,x,x,
60silent=
61site=
62srcdir=
63target=NONE
64verbose=
65x_includes=NONE
66x_libraries=NONE
67bindir='${exec_prefix}/bin'
68sbindir='${exec_prefix}/sbin'
69libexecdir='${exec_prefix}/libexec'
70datadir='${prefix}/share'
71sysconfdir='${prefix}/etc'
72sharedstatedir='${prefix}/com'
73localstatedir='${prefix}/var'
74libdir='${exec_prefix}/lib'
75includedir='${prefix}/include'
76oldincludedir='/usr/include'
77infodir='${prefix}/info'
78mandir='${prefix}/man'
79
80# Initialize some other variables.
81subdirs=
82MFLAGS= MAKEFLAGS=
83SHELL=${CONFIG_SHELL-/bin/sh}
84# Maximum number of lines to put in a shell here document.
85ac_max_here_lines=12
86
87ac_prev=
88for ac_option
89do
90
91  # If the previous option needs an argument, assign it.
92  if test -n "$ac_prev"; then
93    eval "$ac_prev=\$ac_option"
94    ac_prev=
95    continue
96  fi
97
98  case "$ac_option" in
99  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
100  *) ac_optarg= ;;
101  esac
102
103  # Accept the important Cygnus configure options, so we can diagnose typos.
104
105  case "$ac_option" in
106
107  -bindir | --bindir | --bindi | --bind | --bin | --bi)
108    ac_prev=bindir ;;
109  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
110    bindir="$ac_optarg" ;;
111
112  -build | --build | --buil | --bui | --bu)
113    ac_prev=build ;;
114  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
115    build="$ac_optarg" ;;
116
117  -cache-file | --cache-file | --cache-fil | --cache-fi \
118  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
119    ac_prev=cache_file ;;
120  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
121  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
122    cache_file="$ac_optarg" ;;
123
124  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
125    ac_prev=datadir ;;
126  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
127  | --da=*)
128    datadir="$ac_optarg" ;;
129
130  -disable-* | --disable-*)
131    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
132    # Reject names that are not valid shell variable names.
133    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
134      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135    fi
136    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137    eval "enable_${ac_feature}=no" ;;
138
139  -enable-* | --enable-*)
140    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
141    # Reject names that are not valid shell variable names.
142    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
143      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
144    fi
145    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
146    case "$ac_option" in
147      *=*) ;;
148      *) ac_optarg=yes ;;
149    esac
150    eval "enable_${ac_feature}='$ac_optarg'" ;;
151
152  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
153  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
154  | --exec | --exe | --ex)
155    ac_prev=exec_prefix ;;
156  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
157  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
158  | --exec=* | --exe=* | --ex=*)
159    exec_prefix="$ac_optarg" ;;
160
161  -gas | --gas | --ga | --g)
162    # Obsolete; use --with-gas.
163    with_gas=yes ;;
164
165  -help | --help | --hel | --he)
166    # Omit some internal or obsolete options to make the list less imposing.
167    # This message is too long to be a string in the A/UX 3.1 sh.
168    cat << EOF
169Usage: configure [options] [host]
170Options: [defaults in brackets after descriptions]
171Configuration:
172  --cache-file=FILE       cache test results in FILE
173  --help                  print this message
174  --no-create             do not create output files
175  --quiet, --silent       do not print \`checking...' messages
176  --version               print the version of autoconf that created configure
177Directory and file names:
178  --prefix=PREFIX         install architecture-independent files in PREFIX
179                          [$ac_default_prefix]
180  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
181                          [same as prefix]
182  --bindir=DIR            user executables in DIR [EPREFIX/bin]
183  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
184  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
185  --datadir=DIR           read-only architecture-independent data in DIR
186                          [PREFIX/share]
187  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
188  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
189                          [PREFIX/com]
190  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
191  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
192  --includedir=DIR        C header files in DIR [PREFIX/include]
193  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
194  --infodir=DIR           info documentation in DIR [PREFIX/info]
195  --mandir=DIR            man documentation in DIR [PREFIX/man]
196  --srcdir=DIR            find the sources in DIR [configure dir or ..]
197  --program-prefix=PREFIX prepend PREFIX to installed program names
198  --program-suffix=SUFFIX append SUFFIX to installed program names
199  --program-transform-name=PROGRAM
200                          run sed PROGRAM on installed program names
201EOF
202    cat << EOF
203Host type:
204  --build=BUILD           configure for building on BUILD [BUILD=HOST]
205  --host=HOST             configure for HOST [guessed]
206  --target=TARGET         configure for TARGET [TARGET=HOST]
207Features and packages:
208  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
209  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
210  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
211  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
212  --x-includes=DIR        X include files are in DIR
213  --x-libraries=DIR       X library files are in DIR
214EOF
215    if test -n "$ac_help"; then
216      echo "--enable and --with options recognized:$ac_help"
217    fi
218    exit 0 ;;
219
220  -host | --host | --hos | --ho)
221    ac_prev=host ;;
222  -host=* | --host=* | --hos=* | --ho=*)
223    host="$ac_optarg" ;;
224
225  -includedir | --includedir | --includedi | --included | --include \
226  | --includ | --inclu | --incl | --inc)
227    ac_prev=includedir ;;
228  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
229  | --includ=* | --inclu=* | --incl=* | --inc=*)
230    includedir="$ac_optarg" ;;
231
232  -infodir | --infodir | --infodi | --infod | --info | --inf)
233    ac_prev=infodir ;;
234  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
235    infodir="$ac_optarg" ;;
236
237  -libdir | --libdir | --libdi | --libd)
238    ac_prev=libdir ;;
239  -libdir=* | --libdir=* | --libdi=* | --libd=*)
240    libdir="$ac_optarg" ;;
241
242  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
243  | --libexe | --libex | --libe)
244    ac_prev=libexecdir ;;
245  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
246  | --libexe=* | --libex=* | --libe=*)
247    libexecdir="$ac_optarg" ;;
248
249  -localstatedir | --localstatedir | --localstatedi | --localstated \
250  | --localstate | --localstat | --localsta | --localst \
251  | --locals | --local | --loca | --loc | --lo)
252    ac_prev=localstatedir ;;
253  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
254  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
255  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
256    localstatedir="$ac_optarg" ;;
257
258  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
259    ac_prev=mandir ;;
260  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
261    mandir="$ac_optarg" ;;
262
263  -nfp | --nfp | --nf)
264    # Obsolete; use --without-fp.
265    with_fp=no ;;
266
267  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
268  | --no-cr | --no-c)
269    no_create=yes ;;
270
271  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
272  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
273    no_recursion=yes ;;
274
275  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
276  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
277  | --oldin | --oldi | --old | --ol | --o)
278    ac_prev=oldincludedir ;;
279  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
280  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
281  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
282    oldincludedir="$ac_optarg" ;;
283
284  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
285    ac_prev=prefix ;;
286  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
287    prefix="$ac_optarg" ;;
288
289  -program-prefix | --program-prefix | --program-prefi | --program-pref \
290  | --program-pre | --program-pr | --program-p)
291    ac_prev=program_prefix ;;
292  -program-prefix=* | --program-prefix=* | --program-prefi=* \
293  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
294    program_prefix="$ac_optarg" ;;
295
296  -program-suffix | --program-suffix | --program-suffi | --program-suff \
297  | --program-suf | --program-su | --program-s)
298    ac_prev=program_suffix ;;
299  -program-suffix=* | --program-suffix=* | --program-suffi=* \
300  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
301    program_suffix="$ac_optarg" ;;
302
303  -program-transform-name | --program-transform-name \
304  | --program-transform-nam | --program-transform-na \
305  | --program-transform-n | --program-transform- \
306  | --program-transform | --program-transfor \
307  | --program-transfo | --program-transf \
308  | --program-trans | --program-tran \
309  | --progr-tra | --program-tr | --program-t)
310    ac_prev=program_transform_name ;;
311  -program-transform-name=* | --program-transform-name=* \
312  | --program-transform-nam=* | --program-transform-na=* \
313  | --program-transform-n=* | --program-transform-=* \
314  | --program-transform=* | --program-transfor=* \
315  | --program-transfo=* | --program-transf=* \
316  | --program-trans=* | --program-tran=* \
317  | --progr-tra=* | --program-tr=* | --program-t=*)
318    program_transform_name="$ac_optarg" ;;
319
320  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
321  | -silent | --silent | --silen | --sile | --sil)
322    silent=yes ;;
323
324  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
325    ac_prev=sbindir ;;
326  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
327  | --sbi=* | --sb=*)
328    sbindir="$ac_optarg" ;;
329
330  -sharedstatedir | --sharedstatedir | --sharedstatedi \
331  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
332  | --sharedst | --shareds | --shared | --share | --shar \
333  | --sha | --sh)
334    ac_prev=sharedstatedir ;;
335  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
336  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
337  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
338  | --sha=* | --sh=*)
339    sharedstatedir="$ac_optarg" ;;
340
341  -site | --site | --sit)
342    ac_prev=site ;;
343  -site=* | --site=* | --sit=*)
344    site="$ac_optarg" ;;
345
346  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
347    ac_prev=srcdir ;;
348  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
349    srcdir="$ac_optarg" ;;
350
351  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
352  | --syscon | --sysco | --sysc | --sys | --sy)
353    ac_prev=sysconfdir ;;
354  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
355  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
356    sysconfdir="$ac_optarg" ;;
357
358  -target | --target | --targe | --targ | --tar | --ta | --t)
359    ac_prev=target ;;
360  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
361    target="$ac_optarg" ;;
362
363  -v | -verbose | --verbose | --verbos | --verbo | --verb)
364    verbose=yes ;;
365
366  -version | --version | --versio | --versi | --vers)
367    echo "configure generated by autoconf version 2.13"
368    exit 0 ;;
369
370  -with-* | --with-*)
371    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
372    # Reject names that are not valid shell variable names.
373    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
374      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375    fi
376    ac_package=`echo $ac_package| sed 's/-/_/g'`
377    case "$ac_option" in
378      *=*) ;;
379      *) ac_optarg=yes ;;
380    esac
381    eval "with_${ac_package}='$ac_optarg'" ;;
382
383  -without-* | --without-*)
384    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
385    # Reject names that are not valid shell variable names.
386    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
387      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
388    fi
389    ac_package=`echo $ac_package| sed 's/-/_/g'`
390    eval "with_${ac_package}=no" ;;
391
392  --x)
393    # Obsolete; use --with-x.
394    with_x=yes ;;
395
396  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
397  | --x-incl | --x-inc | --x-in | --x-i)
398    ac_prev=x_includes ;;
399  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
400  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
401    x_includes="$ac_optarg" ;;
402
403  -x-libraries | --x-libraries | --x-librarie | --x-librari \
404  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
405    ac_prev=x_libraries ;;
406  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
407  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
408    x_libraries="$ac_optarg" ;;
409
410  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
411    ;;
412
413  *)
414    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
415      echo "configure: warning: $ac_option: invalid host type" 1>&2
416    fi
417    if test "x$nonopt" != xNONE; then
418      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
419    fi
420    nonopt="$ac_option"
421    ;;
422
423  esac
424done
425
426if test -n "$ac_prev"; then
427  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
428fi
429
430trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
431
432# File descriptor usage:
433# 0 standard input
434# 1 file creation
435# 2 errors and warnings
436# 3 some systems may open it to /dev/tty
437# 4 used on the Kubota Titan
438# 6 checking for... messages and results
439# 5 compiler messages saved in config.log
440if test "$silent" = yes; then
441  exec 6>/dev/null
442else
443  exec 6>&1
444fi
445exec 5>./config.log
446
447echo "\
448This file contains any messages produced by compilers while
449running configure, to aid debugging if configure makes a mistake.
450" 1>&5
451
452# Strip out --no-create and --no-recursion so they do not pile up.
453# Also quote any args containing shell metacharacters.
454ac_configure_args=
455for ac_arg
456do
457  case "$ac_arg" in
458  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
459  | --no-cr | --no-c) ;;
460  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
461  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
462  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
463  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
464  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
465  esac
466done
467
468# NLS nuisances.
469# Only set these to C if already set.  These must not be set unconditionally
470# because not all systems understand e.g. LANG=C (notably SCO).
471# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
472# Non-C LC_CTYPE values break the ctype check.
473if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
474if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
475if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
476if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
477
478# confdefs.h avoids OS command line length limits that DEFS can exceed.
479rm -rf conftest* confdefs.h
480# AIX cpp loses on an empty file, so make sure it contains at least a newline.
481echo > confdefs.h
482
483# A filename unique to this package, relative to the directory that
484# configure is in, which we can look for to find out if srcdir is correct.
485ac_unique_file=libtests
486
487# Find the source files, if location was not specified.
488if test -z "$srcdir"; then
489  ac_srcdir_defaulted=yes
490  # Try the directory containing this script, then its parent.
491  ac_prog=$0
492  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
493  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
494  srcdir=$ac_confdir
495  if test ! -r $srcdir/$ac_unique_file; then
496    srcdir=..
497  fi
498else
499  ac_srcdir_defaulted=no
500fi
501if test ! -r $srcdir/$ac_unique_file; then
502  if test "$ac_srcdir_defaulted" = yes; then
503    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
504  else
505    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
506  fi
507fi
508srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
509
510# Prefer explicitly selected file to automatically selected ones.
511if test -z "$CONFIG_SITE"; then
512  if test "x$prefix" != xNONE; then
513    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514  else
515    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
516  fi
517fi
518for ac_site_file in $CONFIG_SITE; do
519  if test -r "$ac_site_file"; then
520    echo "loading site script $ac_site_file"
521    . "$ac_site_file"
522  fi
523done
524
525if test -r "$cache_file"; then
526  echo "loading cache $cache_file"
527  . $cache_file
528else
529  echo "creating cache $cache_file"
530  > $cache_file
531fi
532
533ac_ext=c
534# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
535ac_cpp='$CPP $CPPFLAGS'
536ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
537ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
538cross_compiling=$ac_cv_prog_cc_cross
539
540ac_exeext=
541ac_objext=o
542if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
543  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
544  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
545    ac_n= ac_c='
546' ac_t='        '
547  else
548    ac_n=-n ac_c= ac_t=
549  fi
550else
551  ac_n= ac_c='\c' ac_t=
552fi
553
554
555# Check whether --with-target-subdir or --without-target-subdir was given.
556if test "${with_target_subdir+set}" = set; then
557  withval="$with_target_subdir"
558  TARGET_SUBDIR="$withval"
559else
560  TARGET_SUBDIR="."
561fi
562
563
564RTEMS_TOPdir="../../..";
565
566
567echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6
568echo "configure:569: checking for RTEMS Version" >&5
569if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
570RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
571sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
572else
573{ echo "configure: error: Unable to find ${RTEMS_TOPdir}/VERSION" 1>&2; exit 1; }
574fi
575if test -z "$RTEMS_VERSION"; then
576{ echo "configure: error: Unable to determine version" 1>&2; exit 1; }
577fi
578echo "$ac_t""$RTEMS_VERSION" 1>&6
579
580ac_aux_dir=
581for ac_dir in ../../.. $srcdir/../../..; do
582  if test -f $ac_dir/install-sh; then
583    ac_aux_dir=$ac_dir
584    ac_install_sh="$ac_aux_dir/install-sh -c"
585    break
586  elif test -f $ac_dir/install.sh; then
587    ac_aux_dir=$ac_dir
588    ac_install_sh="$ac_aux_dir/install.sh -c"
589    break
590  fi
591done
592if test -z "$ac_aux_dir"; then
593  { echo "configure: error: can not find install-sh or install.sh in ../../.. $srcdir/../../.." 1>&2; exit 1; }
594fi
595ac_config_guess=$ac_aux_dir/config.guess
596ac_config_sub=$ac_aux_dir/config.sub
597ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
598
599
600echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
601echo "configure:602: checking whether ${MAKE-make} sets \${MAKE}" >&5
602set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
603if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
604  echo $ac_n "(cached) $ac_c" 1>&6
605else
606  cat > conftestmake <<\EOF
607all:
608        @echo 'ac_maketemp="${MAKE}"'
609EOF
610# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
611eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
612if test -n "$ac_maketemp"; then
613  eval ac_cv_prog_make_${ac_make}_set=yes
614else
615  eval ac_cv_prog_make_${ac_make}_set=no
616fi
617rm -f conftestmake
618fi
619if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
620  echo "$ac_t""yes" 1>&6
621  SET_MAKE=
622else
623  echo "$ac_t""no" 1>&6
624  SET_MAKE="MAKE=${MAKE-make}"
625fi
626
627
628
629# Do some error checking and defaulting for the host and target type.
630# The inputs are:
631#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
632#
633# The rules are:
634# 1. You are not allowed to specify --host, --target, and nonopt at the
635#    same time.
636# 2. Host defaults to nonopt.
637# 3. If nonopt is not specified, then host defaults to the current host,
638#    as determined by config.guess.
639# 4. Target and build default to nonopt.
640# 5. If nonopt is not specified, then target and build default to host.
641
642# The aliases save the names the user supplied, while $host etc.
643# will get canonicalized.
644case $host---$target---$nonopt in
645NONE---*---* | *---NONE---* | *---*---NONE) ;;
646*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
647esac
648
649
650# Make sure we can run config.sub.
651if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
652else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
653fi
654
655echo $ac_n "checking host system type""... $ac_c" 1>&6
656echo "configure:657: checking host system type" >&5
657
658host_alias=$host
659case "$host_alias" in
660NONE)
661  case $nonopt in
662  NONE)
663    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
664    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
665    fi ;;
666  *) host_alias=$nonopt ;;
667  esac ;;
668esac
669
670host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
671host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
672host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
673host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
674echo "$ac_t""$host" 1>&6
675
676echo $ac_n "checking target system type""... $ac_c" 1>&6
677echo "configure:678: checking target system type" >&5
678
679target_alias=$target
680case "$target_alias" in
681NONE)
682  case $nonopt in
683  NONE) target_alias=$host_alias ;;
684  *) target_alias=$nonopt ;;
685  esac ;;
686esac
687
688target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
689target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
690target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
691target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
692echo "$ac_t""$target" 1>&6
693
694echo $ac_n "checking build system type""... $ac_c" 1>&6
695echo "configure:696: checking build system type" >&5
696
697build_alias=$build
698case "$build_alias" in
699NONE)
700  case $nonopt in
701  NONE) build_alias=$host_alias ;;
702  *) build_alias=$nonopt ;;
703  esac ;;
704esac
705
706build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
707build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
708build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
709build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
710echo "$ac_t""$build" 1>&6
711
712test "$host_alias" != "$target_alias" &&
713  test "$program_prefix$program_suffix$program_transform_name" = \
714    NONENONEs,x,x, &&
715  program_prefix=${target_alias}-
716
717echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
718echo "configure:719: checking rtems target cpu" >&5
719case "${target}" in
720  # hpux unix port should go here
721  i[3456]86-go32-rtems*)
722        RTEMS_CPU=i386
723        ;;
724  i[3456]86-pc-linux*)          # unix "simulator" port
725        RTEMS_CPU=unix
726        ;;
727  i[3456]86-*freebsd2*)         # unix "simulator" port
728        RTEMS_CPU=unix
729        ;;
730  no_cpu-*rtems*)
731        RTEMS_CPU=no_cpu
732        ;;
733  sparc-sun-solaris*)           # unix "simulator" port
734        RTEMS_CPU=unix
735        ;;
736  *)
737        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
738        ;;
739esac
740
741echo "$ac_t""$RTEMS_CPU" 1>&6
742
743
744echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
745echo "configure:746: checking whether to enable maintainer-specific portions of Makefiles" >&5
746    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
747if test "${enable_maintainer_mode+set}" = set; then
748  enableval="$enable_maintainer_mode"
749  USE_MAINTAINER_MODE=$enableval
750else
751  USE_MAINTAINER_MODE=no
752fi
753
754  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
755 
756
757if test $USE_MAINTAINER_MODE = yes; then
758  MAINTAINER_MODE_TRUE=
759  MAINTAINER_MODE_FALSE='#'
760else
761  MAINTAINER_MODE_TRUE='#'
762  MAINTAINER_MODE_FALSE=
763fi
764  MAINT=$MAINTAINER_MODE_TRUE
765 
766
767
768
769# Check whether --enable-multiprocessing or --disable-multiprocessing was given.
770if test "${enable_multiprocessing+set}" = set; then
771  enableval="$enable_multiprocessing"
772  case "${enableval}" in
773  yes) RTEMS_HAS_MULTIPROCESSING=yes ;;
774  no) RTEMS_HAS_MULTIPROCESSING=no ;;
775  *)  { echo "configure: error: bad value ${enableval} for enable-multiprocessing option" 1>&2; exit 1; } ;;
776esac
777else
778  RTEMS_HAS_MULTIPROCESSING=no
779fi
780
781
782
783# Check whether --enable-posix or --disable-posix was given.
784if test "${enable_posix+set}" = set; then
785  enableval="$enable_posix"
786  case "${enableval}" in
787  yes) RTEMS_HAS_POSIX_API=yes ;;
788  no) RTEMS_HAS_POSIX_API=no ;;
789  *)  { echo "configure: error: bad value ${enableval} for enable-posix option" 1>&2; exit 1; } ;;
790esac
791else
792  RTEMS_HAS_POSIX_API=yes
793fi
794 
795
796
797case "${target}" in
798  # hpux unix port should go here
799  i[3456]86-go32-rtems*)
800        RTEMS_HAS_POSIX_API=no
801        ;;
802  i[3456]86-pc-linux*)         # unix "simulator" port
803        RTEMS_HAS_POSIX_API=no
804        ;;
805  i[3456]86-*freebsd2*) # unix "simulator" port
806        RTEMS_HAS_POSIX_API=no
807        ;;
808  no_cpu-*rtems*)
809        RTEMS_HAS_POSIX_API=no
810        ;;
811  sparc-sun-solaris*)             # unix "simulator" port
812        RTEMS_HAS_POSIX_API=no
813        ;;
814  *)
815        ;;
816esac
817
818
819
820# Check whether --enable-networking or --disable-networking was given.
821if test "${enable_networking+set}" = set; then
822  enableval="$enable_networking"
823  case "${enableval}" in
824  yes) RTEMS_HAS_NETWORKING=yes ;;
825  no) RTEMS_HAS_NETWORKING=no ;;
826  *)  { echo "configure: error: bad value ${enableval} for enable-networking option" 1>&2; exit 1; } ;;
827esac
828else
829  RTEMS_HAS_NETWORKING=yes
830fi
831
832
833
834# Check whether --enable-rdbg or --disable-rdbg was given.
835if test "${enable_rdbg+set}" = set; then
836  enableval="$enable_rdbg"
837  case "${enableval}" in
838  yes) RTEMS_HAS_RDBG=yes ;;
839  no) RTEMS_HAS_RDBG=no ;;
840  *)  { echo "configure: error: bad value ${enableval} for enable-rdbg option" 1>&2; exit 1; } ;;
841esac
842else
843  RTEMS_HAS_RDBG=no
844fi
845
846
847# Check whether --enable-rtems-inlines or --disable-rtems-inlines was given.
848if test "${enable_rtems_inlines+set}" = set; then
849  enableval="$enable_rtems_inlines"
850  case "${enableval}" in
851  yes) RTEMS_USE_MACROS=no ;;
852  no) RTEMS_USE_MACROS=yes ;;
853  *)  { echo "configure: error: bad value ${enableval} for disable-rtems-inlines option" 1>&2; exit 1; } ;;
854esac
855else
856  RTEMS_USE_MACROS=no
857fi
858
859
860
861# Check whether --enable-cxx or --disable-cxx was given.
862if test "${enable_cxx+set}" = set; then
863  enableval="$enable_cxx"
864  case "${enableval}" in
865  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
866  no) RTEMS_HAS_CPLUSPLUS=no   ;;
867  *)  { echo "configure: error: bad value ${enableval} for enable-cxx option" 1>&2; exit 1; } ;;
868esac
869else
870  RTEMS_HAS_CPLUSPLUS=no
871fi
872
873
874
875# Check whether --enable-gcc28 or --disable-gcc28 was given.
876if test "${enable_gcc28+set}" = set; then
877  enableval="$enable_gcc28"
878  case "${enableval}" in
879  yes) RTEMS_USE_GCC272=no ;;
880  no) RTEMS_USE_GCC272=yes ;;
881  *)  { echo "configure: error: bad value ${enableval} for gcc-28 option" 1>&2; exit 1; } ;;
882esac
883else
884  RTEMS_USE_GCC272=no
885fi
886
887
888
889# Check whether --enable-libcdir or --disable-libcdir was given.
890if test "${enable_libcdir+set}" = set; then
891  enableval="$enable_libcdir"
892   RTEMS_LIBC_DIR="${enableval}" ; \
893test -d ${enableval} || { echo "configure: error: "$enableval is not a directory" " 1>&2; exit 1; } 
894fi
895
896
897
898# Check whether --enable-bare-cpu-cflags or --disable-bare-cpu-cflags was given.
899if test "${enable_bare_cpu_cflags+set}" = set; then
900  enableval="$enable_bare_cpu_cflags"
901  case "${enableval}" in
902  no) BARE_CPU_CFLAGS="" ;;
903  *)    BARE_CPU_CFLAGS="${enableval}" ;;
904esac
905else
906  BARE_CPU_CFLAGS=""
907fi
908
909
910# Check whether --enable-bare-cpu-model or --disable-bare-cpu-model was given.
911if test "${enable_bare_cpu_model+set}" = set; then
912  enableval="$enable_bare_cpu_model"
913  case "${enableval}" in
914  no)   BARE_CPU_MODEL="" ;;
915  *)    BARE_CPU_MODEL="${enableval}" ;;
916esac
917else
918  BARE_CPU_MODEL=""
919fi
920
921
922
923# If the tests are enabled, then find all the test suite Makefiles
924echo $ac_n "checking if the test suites are enabled? ""... $ac_c" 1>&6
925echo "configure:926: checking if the test suites are enabled? " >&5
926# Check whether --enable-tests or --disable-tests was given.
927if test "${enable_tests+set}" = set; then
928  enableval="$enable_tests"
929  case "${enableval}" in
930    yes) tests_enabled=yes ;;
931    no)  tests_enabled=no ;;
932    *)   { echo "configure: error: bad value ${enableval} for tests option" 1>&2; exit 1; } ;;
933  esac
934else
935  tests_enabled=no
936fi
937
938echo "$ac_t""$tests_enabled" 1>&6
939
940
941echo $ac_n "checking for RTEMS_BSP""... $ac_c" 1>&6
942echo "configure:943: checking for RTEMS_BSP" >&5
943if eval "test \"`echo '$''{'rtems_cv_RTEMS_BSP'+set}'`\" = set"; then
944  echo $ac_n "(cached) $ac_c" 1>&6
945else
946    test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
947
948fi
949if test -z "$rtems_cv_RTEMS_BSP"; then
950  { echo "configure: error: Missing RTEMS_BSP" 1>&2; exit 1; }
951fi
952RTEMS_BSP="$rtems_cv_RTEMS_BSP"
953echo "$ac_t""${RTEMS_BSP}" 1>&6
954
955
956
957
958# Extract the first word of "rm", so it can be a program name with args.
959set dummy rm; ac_word=$2
960echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961echo "configure:962: checking for $ac_word" >&5
962if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
963  echo $ac_n "(cached) $ac_c" 1>&6
964else
965  case "$RM" in
966  /*)
967  ac_cv_path_RM="$RM" # Let the user override the test with a path.
968  ;;
969  ?:/*)                 
970  ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
971  ;;
972  *)
973  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
974  ac_dummy="$PATH"
975  for ac_dir in $ac_dummy; do
976    test -z "$ac_dir" && ac_dir=.
977    if test -f $ac_dir/$ac_word; then
978      ac_cv_path_RM="$ac_dir/$ac_word"
979      break
980    fi
981  done
982  IFS="$ac_save_ifs"
983  ;;
984esac
985fi
986RM="$ac_cv_path_RM"
987if test -n "$RM"; then
988  echo "$ac_t""$RM" 1>&6
989else
990  echo "$ac_t""no" 1>&6
991fi
992
993# Find a good install program.  We prefer a C program (faster),
994# so one script is as good as another.  But avoid the broken or
995# incompatible versions:
996# SysV /etc/install, /usr/sbin/install
997# SunOS /usr/etc/install
998# IRIX /sbin/install
999# AIX /bin/install
1000# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1001# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1002# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1003# ./install, which can be erroneously created by make from ./install.sh.
1004echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1005echo "configure:1006: checking for a BSD compatible install" >&5
1006if test -z "$INSTALL"; then
1007if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1008  echo $ac_n "(cached) $ac_c" 1>&6
1009else
1010    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1011  for ac_dir in $PATH; do
1012    # Account for people who put trailing slashes in PATH elements.
1013    case "$ac_dir/" in
1014    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1015    *)
1016      # OSF1 and SCO ODT 3.0 have their own names for install.
1017      # Don't use installbsd from OSF since it installs stuff as root
1018      # by default.
1019      for ac_prog in ginstall scoinst install; do
1020        if test -f $ac_dir/$ac_prog; then
1021          if test $ac_prog = install &&
1022            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1023            # AIX install.  It has an incompatible calling convention.
1024            :
1025          else
1026            ac_cv_path_install="$ac_dir/$ac_prog -c"
1027            break 2
1028          fi
1029        fi
1030      done
1031      ;;
1032    esac
1033  done
1034  IFS="$ac_save_IFS"
1035
1036fi
1037  if test "${ac_cv_path_install+set}" = set; then
1038    INSTALL="$ac_cv_path_install"
1039  else
1040    # As a last resort, use the slow shell script.  We don't cache a
1041    # path for INSTALL within a source directory, because that will
1042    # break other packages using the cache if that directory is
1043    # removed, or if the path is relative.
1044    INSTALL="$ac_install_sh"
1045  fi
1046fi
1047echo "$ac_t""$INSTALL" 1>&6
1048
1049# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1050# It thinks the first close brace ends the variable substitution.
1051test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1052
1053test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1054
1055test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1056
1057
1058
1059
1060
1061# Is this a supported CPU?
1062echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
1063echo "configure:1064: checking if cpu $RTEMS_CPU is supported" >&5
1064if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
1065  echo "$ac_t""yes" 1>&6
1066else
1067  { echo "configure: error: no" 1>&2; exit 1; }
1068fi
1069
1070
1071RTEMS_HOST=$host_os
1072case "${target}" in
1073  # hpux unix port should go here
1074  i[3456]86-pc-linux*)         # unix "simulator" port
1075        RTEMS_HOST=Linux
1076        ;;
1077  i[3456]86-*freebsd2*) # unix "simulator" port
1078        RTEMS_HOST=FreeBSD
1079        ;;
1080  sparc-sun-solaris*)             # unix "simulator" port
1081        RTEMS_HOST=Solaris
1082        ;;
1083  *)
1084        ;;
1085esac
1086
1087
1088
1089
1090if test "$TARGET_SUBDIR" = "." ; then
1091PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
1092else
1093PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
1094fi
1095
1096
1097RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
1098
1099
1100INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
1101
1102
1103PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
1104
1105
1106
1107
1108if [ "${program_prefix}" = "NONE" ] ; then
1109  if [ "${target}" = "${host}" ] ; then
1110    program_prefix=
1111  else
1112    program_prefix=${target}-
1113  fi
1114fi
1115
1116
1117
1118
1119for ac_prog in "$program_prefix"gcc "$program_prefix"cc
1120do
1121# Extract the first word of "$ac_prog", so it can be a program name with args.
1122set dummy $ac_prog; ac_word=$2
1123echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1124echo "configure:1125: checking for $ac_word" >&5
1125if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
1126  echo $ac_n "(cached) $ac_c" 1>&6
1127else
1128  case "$CC_FOR_TARGET" in
1129  /*)
1130  ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a path.
1131  ;;
1132  ?:/*)                 
1133  ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a dos path.
1134  ;;
1135  *)
1136  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1137  ac_dummy="$PATH"
1138  for ac_dir in $ac_dummy; do
1139    test -z "$ac_dir" && ac_dir=.
1140    if test -f $ac_dir/$ac_word; then
1141      ac_cv_path_CC_FOR_TARGET="$ac_dir/$ac_word"
1142      break
1143    fi
1144  done
1145  IFS="$ac_save_ifs"
1146  ;;
1147esac
1148fi
1149CC_FOR_TARGET="$ac_cv_path_CC_FOR_TARGET"
1150if test -n "$CC_FOR_TARGET"; then
1151  echo "$ac_t""$CC_FOR_TARGET" 1>&6
1152else
1153  echo "$ac_t""no" 1>&6
1154fi
1155
1156test -n "$CC_FOR_TARGET" && break
1157done
1158
1159test -z "$CC_FOR_TARGET" \
1160  && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1161
1162rtems_save_CC=$CC
1163rtems_save_CFLAGS=$CFLAGS
1164
1165CC=$CC_FOR_TARGET
1166
1167echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1168echo "configure:1169: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1169
1170ac_ext=c
1171# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1172ac_cpp='$CPP $CPPFLAGS'
1173ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1174ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1175cross_compiling=$ac_cv_prog_cc_cross
1176
1177cat > conftest.$ac_ext << EOF
1178
1179#line 1180 "configure"
1180#include "confdefs.h"
1181
1182main(){return(0);}
1183EOF
1184if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1185  ac_cv_prog_cc_works=yes
1186  # If we can't run a trivial program, we are probably using a cross compiler.
1187  if (./conftest; exit) 2>/dev/null; then
1188    ac_cv_prog_cc_cross=no
1189  else
1190    ac_cv_prog_cc_cross=yes
1191  fi
1192else
1193  echo "configure: failed program was:" >&5
1194  cat conftest.$ac_ext >&5
1195  ac_cv_prog_cc_works=no
1196fi
1197rm -fr conftest*
1198ac_ext=c
1199# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1200ac_cpp='$CPP $CPPFLAGS'
1201ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1202ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1203cross_compiling=$ac_cv_prog_cc_cross
1204
1205echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1206if test $ac_cv_prog_cc_works = no; then
1207  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1208fi
1209echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1210echo "configure:1211: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1211echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1212cross_compiling=$ac_cv_prog_cc_cross
1213
1214echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1215echo "configure:1216: checking whether we are using GNU C" >&5
1216if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1217  echo $ac_n "(cached) $ac_c" 1>&6
1218else
1219  cat > conftest.c <<EOF
1220#ifdef __GNUC__
1221  yes;
1222#endif
1223EOF
1224if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1225  ac_cv_prog_gcc=yes
1226else
1227  ac_cv_prog_gcc=no
1228fi
1229fi
1230
1231echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1232
1233if test $ac_cv_prog_gcc = yes; then
1234  GCC=yes
1235  ac_test_CFLAGS="${CFLAGS+set}"
1236  ac_save_CFLAGS="$CFLAGS"
1237  CFLAGS=
1238  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1239echo "configure:1240: checking whether ${CC-cc} accepts -g" >&5
1240if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1241  echo $ac_n "(cached) $ac_c" 1>&6
1242else
1243  echo 'void f(){}' > conftest.c
1244if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1245  ac_cv_prog_cc_g=yes
1246else
1247  ac_cv_prog_cc_g=no
1248fi
1249rm -f conftest*
1250
1251fi
1252
1253echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1254  if test "$ac_test_CFLAGS" = set; then
1255    CFLAGS="$ac_save_CFLAGS"
1256  elif test $ac_cv_prog_cc_g = yes; then
1257    CFLAGS="-g -O2"
1258  else
1259    CFLAGS="-O2"
1260  fi
1261else
1262  GCC=
1263  test "${CFLAGS+set}" = set || CFLAGS="-g"
1264fi
1265
1266rtems_cv_prog_gcc=$ac_cv_prog_gcc
1267rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
1268rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
1269rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
1270
1271CC=$rtems_save_CC
1272CFLAGS=$rtems_save_CFLAGS
1273
1274unset ac_cv_prog_gcc
1275unset ac_cv_prog_cc_g
1276unset ac_cv_prog_cc_works
1277unset ac_cv_prog_cc_cross
1278
1279
1280echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
1281echo "configure:1282: checking whether $CC_FOR_TARGET accepts -specs" >&5
1282if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
1283  echo $ac_n "(cached) $ac_c" 1>&6
1284else
1285 
1286rtems_cv_gcc_specs=no
1287if test "$rtems_cv_prog_gcc" = "yes"; then
1288  touch confspec
1289  echo 'void f(){}' >conftest.c
1290  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
1291    rtems_cv_gcc_specs=yes
1292  fi
1293fi
1294rm -f confspec conftest*
1295
1296fi
1297
1298echo "$ac_t""$rtems_cv_gcc_specs" 1>&6
1299 
1300
1301echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
1302echo "configure:1303: checking whether $CC_FOR_TARGET accepts --pipe" >&5
1303if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
1304  echo $ac_n "(cached) $ac_c" 1>&6
1305else
1306 
1307rtems_cv_gcc_pipe=no
1308if test "$rtems_cv_prog_gcc" = "yes"; then
1309case "$host_os" in
1310  cygwin*)
1311    ;;
1312  *)
1313    echo 'void f(){}' >conftest.c
1314    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
1315      rtems_cv_gcc_pipe=yes
1316    fi
1317    rm -f conftest*
1318    ;;
1319esac
1320fi
1321
1322fi
1323
1324echo "$ac_t""$rtems_cv_gcc_pipe" 1>&6
1325
1326if test "$RTEMS_USE_GCC272" != "yes" ; then
1327  if test "$rtems_cv_gcc_specs" = "no"; then
1328    echo "configure: warning: *** disabling --enable-gcc28" 1>&2
1329      RTEMS_USE_GCC272=yes
1330  fi
1331fi
1332test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
1333
1334case $host_os in
1335*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
1336*) ;;
1337esac
1338
1339
1340
1341if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
1342 
1343 
1344
1345for ac_prog in "$program_prefix"g++ "$program_prefix"c++
1346do
1347# Extract the first word of "$ac_prog", so it can be a program name with args.
1348set dummy $ac_prog; ac_word=$2
1349echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1350echo "configure:1351: checking for $ac_word" >&5
1351if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then
1352  echo $ac_n "(cached) $ac_c" 1>&6
1353else
1354  case "$CXX_FOR_TARGET" in
1355  /*)
1356  ac_cv_path_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test with a path.
1357  ;;
1358  ?:/*)                 
1359  ac_cv_path_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test with a dos path.
1360  ;;
1361  *)
1362  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1363  ac_dummy="$PATH"
1364  for ac_dir in $ac_dummy; do
1365    test -z "$ac_dir" && ac_dir=.
1366    if test -f $ac_dir/$ac_word; then
1367      ac_cv_path_CXX_FOR_TARGET="$ac_dir/$ac_word"
1368      break
1369    fi
1370  done
1371  IFS="$ac_save_ifs"
1372  ;;
1373esac
1374fi
1375CXX_FOR_TARGET="$ac_cv_path_CXX_FOR_TARGET"
1376if test -n "$CXX_FOR_TARGET"; then
1377  echo "$ac_t""$CXX_FOR_TARGET" 1>&6
1378else
1379  echo "$ac_t""no" 1>&6
1380fi
1381
1382test -n "$CXX_FOR_TARGET" && break
1383done
1384
1385test -z "$CXX_FOR_TARGET" \
1386  && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1387
1388rtems_save_CXX=$CXX
1389rtems_save_CXXFLAGS=$CXXFLAGS
1390
1391CXX=$CXX_FOR_TARGET
1392
1393echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1394echo "configure:1395: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1395
1396ac_ext=C
1397# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1398ac_cpp='$CXXCPP $CPPFLAGS'
1399ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1400ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1401cross_compiling=$ac_cv_prog_cxx_cross
1402
1403cat > conftest.$ac_ext << EOF
1404
1405#line 1406 "configure"
1406#include "confdefs.h"
1407
1408int main(){return(0);}
1409EOF
1410if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1411  ac_cv_prog_cxx_works=yes
1412  # If we can't run a trivial program, we are probably using a cross compiler.
1413  if (./conftest; exit) 2>/dev/null; then
1414    ac_cv_prog_cxx_cross=no
1415  else
1416    ac_cv_prog_cxx_cross=yes
1417  fi
1418else
1419  echo "configure: failed program was:" >&5
1420  cat conftest.$ac_ext >&5
1421  ac_cv_prog_cxx_works=no
1422fi
1423rm -fr conftest*
1424ac_ext=c
1425# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1426ac_cpp='$CPP $CPPFLAGS'
1427ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1428ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1429cross_compiling=$ac_cv_prog_cc_cross
1430
1431echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1432if test $ac_cv_prog_cxx_works = no; then
1433  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1434fi
1435echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1436echo "configure:1437: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1437echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1438cross_compiling=$ac_cv_prog_cxx_cross
1439
1440echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1441echo "configure:1442: checking whether we are using GNU C++" >&5
1442if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1443  echo $ac_n "(cached) $ac_c" 1>&6
1444else
1445  cat > conftest.C <<EOF
1446#ifdef __GNUC__
1447  yes;
1448#endif
1449EOF
1450if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1451  ac_cv_prog_gxx=yes
1452else
1453  ac_cv_prog_gxx=no
1454fi
1455fi
1456
1457echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1458
1459if test $ac_cv_prog_gxx = yes; then
1460  GXX=yes
1461  ac_test_CXXFLAGS="${CXXFLAGS+set}"
1462  ac_save_CXXFLAGS="$CXXFLAGS"
1463  CXXFLAGS=
1464  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1465echo "configure:1466: checking whether ${CXX-g++} accepts -g" >&5
1466if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1467  echo $ac_n "(cached) $ac_c" 1>&6
1468else
1469  echo 'void f(){}' > conftest.cc
1470if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1471  ac_cv_prog_cxx_g=yes
1472else
1473  ac_cv_prog_cxx_g=no
1474fi
1475rm -f conftest*
1476
1477fi
1478
1479echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1480  if test "$ac_test_CXXFLAGS" = set; then
1481    CXXFLAGS="$ac_save_CXXFLAGS"
1482  elif test $ac_cv_prog_cxx_g = yes; then
1483    CXXFLAGS="-g -O2"
1484  else
1485    CXXFLAGS="-O2"
1486  fi
1487else
1488  GXX=
1489  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1490fi
1491
1492rtems_cv_prog_gxx=$ac_cv_prog_gxx
1493rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g
1494rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works
1495rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross
1496
1497CXX=$rtems_save_CXX
1498CXXFLAGS=$rtems_save_CXXFLAGS
1499
1500unset ac_cv_prog_gxx
1501unset ac_cv_prog_cc_g
1502unset ac_cv_prog_cxx_works
1503unset ac_cv_prog_cxx_cross
1504
1505  if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then
1506    { echo "configure: error: ***
1507     Inconsistency in compiler configuration:
1508     Target C compiler and Target C++ compiler
1509     must both either be cross compilers or native compilers
1510     Hint: If building a posix bsp: LD_LIBRARY_PATH? " 1>&2; exit 1; }
1511  fi
1512
1513fi
1514
1515
1516 
1517echo $ac_n "checking target's ar""... $ac_c" 1>&6
1518echo "configure:1519: checking target's ar" >&5
1519if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1520  echo $ac_n "(cached) $ac_c" 1>&6
1521else
1522  :
1523fi
1524
1525echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
1526
1527if test -n "$ac_cv_path_AR_FOR_TARGET"; then
1528    AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
1529else
1530    if test -z "$AR_FOR_TARGET" ; then
1531    if test "$rtems_cv_prog_gcc" = "yes"; then
1532      # We are using gcc, ask it about its tool
1533      # NOTE: Necessary if gcc was configured to use the target's
1534      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1535       case $host_os in
1536  *cygwin*)
1537            AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar | sed -e 's%\\\\%/%g' `
1538    ;;
1539  *)
1540    AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
1541    ;;
1542  esac
1543
1544    fi
1545  else
1546    # The user set an environment variable.
1547    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1548    # will override the environment variable, which isn't what the user
1549    # intends
1550    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1551echo "configure:1552: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
1552    case "$AR_FOR_TARGET" in
1553    /*) # valid
1554      echo "$ac_t"""yes"" 1>&6
1555    ;;
1556    *)  # invalid for AC_PATH_PROG
1557      echo "$ac_t"""no"" 1>&6
1558      { echo "configure: error: ***
1559        Environment variable AR_FOR_TARGET should either
1560        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1561    ;;
1562    esac
1563  fi
1564
1565  # Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
1566set dummy "$program_prefix"ar; ac_word=$2
1567echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1568echo "configure:1569: checking for $ac_word" >&5
1569if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1570  echo $ac_n "(cached) $ac_c" 1>&6
1571else
1572  case "$AR_FOR_TARGET" in
1573  /*)
1574  ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
1575  ;;
1576  ?:/*)                 
1577  ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
1578  ;;
1579  *)
1580  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1581  ac_dummy="$PATH"
1582  for ac_dir in $ac_dummy; do
1583    test -z "$ac_dir" && ac_dir=.
1584    if test -f $ac_dir/$ac_word; then
1585      ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
1586      break
1587    fi
1588  done
1589  IFS="$ac_save_ifs"
1590  test -z "$ac_cv_path_AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET="no"
1591  ;;
1592esac
1593fi
1594AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
1595if test -n "$AR_FOR_TARGET"; then
1596  echo "$ac_t""$AR_FOR_TARGET" 1>&6
1597else
1598  echo "$ac_t""no" 1>&6
1599fi
1600
1601fi
1602
1603 
1604echo $ac_n "checking target's as""... $ac_c" 1>&6
1605echo "configure:1606: checking target's as" >&5
1606if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
1607  echo $ac_n "(cached) $ac_c" 1>&6
1608else
1609  :
1610fi
1611
1612echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
1613
1614if test -n "$ac_cv_path_AS_FOR_TARGET"; then
1615    AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
1616else
1617    if test -z "$AS_FOR_TARGET" ; then
1618    if test "$rtems_cv_prog_gcc" = "yes"; then
1619      # We are using gcc, ask it about its tool
1620      # NOTE: Necessary if gcc was configured to use the target's
1621      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1622       case $host_os in
1623  *cygwin*)
1624            AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as | sed -e 's%\\\\%/%g' `
1625    ;;
1626  *)
1627    AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
1628    ;;
1629  esac
1630
1631    fi
1632  else
1633    # The user set an environment variable.
1634    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1635    # will override the environment variable, which isn't what the user
1636    # intends
1637    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1638echo "configure:1639: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
1639    case "$AS_FOR_TARGET" in
1640    /*) # valid
1641      echo "$ac_t"""yes"" 1>&6
1642    ;;
1643    *)  # invalid for AC_PATH_PROG
1644      echo "$ac_t"""no"" 1>&6
1645      { echo "configure: error: ***
1646        Environment variable AS_FOR_TARGET should either
1647        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1648    ;;
1649    esac
1650  fi
1651
1652  # Extract the first word of ""$program_prefix"as", so it can be a program name with args.
1653set dummy "$program_prefix"as; ac_word=$2
1654echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1655echo "configure:1656: checking for $ac_word" >&5
1656if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
1657  echo $ac_n "(cached) $ac_c" 1>&6
1658else
1659  case "$AS_FOR_TARGET" in
1660  /*)
1661  ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
1662  ;;
1663  ?:/*)                 
1664  ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
1665  ;;
1666  *)
1667  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1668  ac_dummy="$PATH"
1669  for ac_dir in $ac_dummy; do
1670    test -z "$ac_dir" && ac_dir=.
1671    if test -f $ac_dir/$ac_word; then
1672      ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
1673      break
1674    fi
1675  done
1676  IFS="$ac_save_ifs"
1677  test -z "$ac_cv_path_AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET="no"
1678  ;;
1679esac
1680fi
1681AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
1682if test -n "$AS_FOR_TARGET"; then
1683  echo "$ac_t""$AS_FOR_TARGET" 1>&6
1684else
1685  echo "$ac_t""no" 1>&6
1686fi
1687
1688fi
1689
1690 
1691echo $ac_n "checking target's ld""... $ac_c" 1>&6
1692echo "configure:1693: checking target's ld" >&5
1693if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
1694  echo $ac_n "(cached) $ac_c" 1>&6
1695else
1696  :
1697fi
1698
1699echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
1700
1701if test -n "$ac_cv_path_LD_FOR_TARGET"; then
1702    LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
1703else
1704    if test -z "$LD_FOR_TARGET" ; then
1705    if test "$rtems_cv_prog_gcc" = "yes"; then
1706      # We are using gcc, ask it about its tool
1707      # NOTE: Necessary if gcc was configured to use the target's
1708      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1709       case $host_os in
1710  *cygwin*)
1711            LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld | sed -e 's%\\\\%/%g' `
1712    ;;
1713  *)
1714    LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
1715    ;;
1716  esac
1717
1718    fi
1719  else
1720    # The user set an environment variable.
1721    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1722    # will override the environment variable, which isn't what the user
1723    # intends
1724    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1725echo "configure:1726: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
1726    case "$LD_FOR_TARGET" in
1727    /*) # valid
1728      echo "$ac_t"""yes"" 1>&6
1729    ;;
1730    *)  # invalid for AC_PATH_PROG
1731      echo "$ac_t"""no"" 1>&6
1732      { echo "configure: error: ***
1733        Environment variable LD_FOR_TARGET should either
1734        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1735    ;;
1736    esac
1737  fi
1738
1739  # Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
1740set dummy "$program_prefix"ld; ac_word=$2
1741echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1742echo "configure:1743: checking for $ac_word" >&5
1743if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
1744  echo $ac_n "(cached) $ac_c" 1>&6
1745else
1746  case "$LD_FOR_TARGET" in
1747  /*)
1748  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
1749  ;;
1750  ?:/*)                 
1751  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
1752  ;;
1753  *)
1754  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1755  ac_dummy="$PATH"
1756  for ac_dir in $ac_dummy; do
1757    test -z "$ac_dir" && ac_dir=.
1758    if test -f $ac_dir/$ac_word; then
1759      ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
1760      break
1761    fi
1762  done
1763  IFS="$ac_save_ifs"
1764  test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
1765  ;;
1766esac
1767fi
1768LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
1769if test -n "$LD_FOR_TARGET"; then
1770  echo "$ac_t""$LD_FOR_TARGET" 1>&6
1771else
1772  echo "$ac_t""no" 1>&6
1773fi
1774
1775fi
1776
1777 
1778echo $ac_n "checking target's nm""... $ac_c" 1>&6
1779echo "configure:1780: checking target's nm" >&5
1780if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
1781  echo $ac_n "(cached) $ac_c" 1>&6
1782else
1783  :
1784fi
1785
1786echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
1787
1788if test -n "$ac_cv_path_NM_FOR_TARGET"; then
1789    NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
1790else
1791    if test -z "$NM_FOR_TARGET" ; then
1792    if test "$rtems_cv_prog_gcc" = "yes"; then
1793      # We are using gcc, ask it about its tool
1794      # NOTE: Necessary if gcc was configured to use the target's
1795      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1796       case $host_os in
1797  *cygwin*)
1798            NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm | sed -e 's%\\\\%/%g' `
1799    ;;
1800  *)
1801    NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
1802    ;;
1803  esac
1804
1805    fi
1806  else
1807    # The user set an environment variable.
1808    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1809    # will override the environment variable, which isn't what the user
1810    # intends
1811    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1812echo "configure:1813: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
1813    case "$NM_FOR_TARGET" in
1814    /*) # valid
1815      echo "$ac_t"""yes"" 1>&6
1816    ;;
1817    *)  # invalid for AC_PATH_PROG
1818      echo "$ac_t"""no"" 1>&6
1819      { echo "configure: error: ***
1820        Environment variable NM_FOR_TARGET should either
1821        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1822    ;;
1823    esac
1824  fi
1825
1826  # Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
1827set dummy "$program_prefix"nm; ac_word=$2
1828echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1829echo "configure:1830: checking for $ac_word" >&5
1830if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
1831  echo $ac_n "(cached) $ac_c" 1>&6
1832else
1833  case "$NM_FOR_TARGET" in
1834  /*)
1835  ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
1836  ;;
1837  ?:/*)                 
1838  ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
1839  ;;
1840  *)
1841  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1842  ac_dummy="$PATH"
1843  for ac_dir in $ac_dummy; do
1844    test -z "$ac_dir" && ac_dir=.
1845    if test -f $ac_dir/$ac_word; then
1846      ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
1847      break
1848    fi
1849  done
1850  IFS="$ac_save_ifs"
1851  test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no"
1852  ;;
1853esac
1854fi
1855NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
1856if test -n "$NM_FOR_TARGET"; then
1857  echo "$ac_t""$NM_FOR_TARGET" 1>&6
1858else
1859  echo "$ac_t""no" 1>&6
1860fi
1861
1862fi
1863
1864
1865 
1866echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
1867echo "configure:1868: checking target's ranlib" >&5
1868if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
1869  echo $ac_n "(cached) $ac_c" 1>&6
1870else
1871  :
1872fi
1873
1874echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
1875
1876if test -n "$ac_cv_path_RANLIB_FOR_TARGET"; then
1877    RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
1878else
1879    if test -z "$RANLIB_FOR_TARGET" ; then
1880    if test "$rtems_cv_prog_gcc" = "yes"; then
1881      # We are using gcc, ask it about its tool
1882      # NOTE: Necessary if gcc was configured to use the target's
1883      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1884       case $host_os in
1885  *cygwin*)
1886            RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib | sed -e 's%\\\\%/%g' `
1887    ;;
1888  *)
1889    RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
1890    ;;
1891  esac
1892
1893    fi
1894  else
1895    # The user set an environment variable.
1896    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1897    # will override the environment variable, which isn't what the user
1898    # intends
1899    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1900echo "configure:1901: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
1901    case "$RANLIB_FOR_TARGET" in
1902    /*) # valid
1903      echo "$ac_t"""yes"" 1>&6
1904    ;;
1905    *)  # invalid for AC_PATH_PROG
1906      echo "$ac_t"""no"" 1>&6
1907      { echo "configure: error: ***
1908        Environment variable RANLIB_FOR_TARGET should either
1909        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1910    ;;
1911    esac
1912  fi
1913
1914  # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
1915set dummy "$program_prefix"ranlib; ac_word=$2
1916echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1917echo "configure:1918: checking for $ac_word" >&5
1918if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
1919  echo $ac_n "(cached) $ac_c" 1>&6
1920else
1921  case "$RANLIB_FOR_TARGET" in
1922  /*)
1923  ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
1924  ;;
1925  ?:/*)                 
1926  ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
1927  ;;
1928  *)
1929  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1930  ac_dummy="$PATH"
1931  for ac_dir in $ac_dummy; do
1932    test -z "$ac_dir" && ac_dir=.
1933    if test -f $ac_dir/$ac_word; then
1934      ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
1935      break
1936    fi
1937  done
1938  IFS="$ac_save_ifs"
1939  test -z "$ac_cv_path_RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET="no"
1940  ;;
1941esac
1942fi
1943RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
1944if test -n "$RANLIB_FOR_TARGET"; then
1945  echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
1946else
1947  echo "$ac_t""no" 1>&6
1948fi
1949
1950fi
1951
1952  if test "$RANLIB_FOR_TARGET" = "no"; then
1953    # ranlib wasn't found; check if ar -s is available
1954   
1955echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
1956echo "configure:1957: checking whether $AR_FOR_TARGET -s works" >&5
1957if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
1958  echo $ac_n "(cached) $ac_c" 1>&6
1959else
1960 
1961cat > conftest.$ac_ext <<EOF
1962int foo( int b )
1963{ return b; }
1964EOF
1965if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
1966  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
1967  && test -s conftest.a ; \
1968then
1969  rtems_cv_AR_FOR_TARGET_S="yes"
1970else
1971  rtems_cv_AR_FOR_TARGET_S="no"
1972fi
1973  rm -f conftest*
1974
1975fi
1976
1977echo "$ac_t""$rtems_cv_AR_FOR_TARGET_S" 1>&6
1978
1979    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
1980            ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
1981      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
1982    else
1983      { echo "configure: error: ***
1984        Can't figure out how to build a library index
1985        Neither ranlib nor ar -s seem to be available " 1>&2; exit 1; }
1986    fi
1987  fi
1988
1989 
1990echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
1991echo "configure:1992: checking target's objcopy" >&5
1992if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
1993  echo $ac_n "(cached) $ac_c" 1>&6
1994else
1995  :
1996fi
1997
1998echo "$ac_t""$ac_cv_path_OBJCOPY_FOR_TARGET" 1>&6
1999
2000if test -n "$ac_cv_path_OBJCOPY_FOR_TARGET"; then
2001    OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
2002else
2003    if test -z "$OBJCOPY_FOR_TARGET" ; then
2004    if test "$rtems_cv_prog_gcc" = "yes"; then
2005      # We are using gcc, ask it about its tool
2006      # NOTE: Necessary if gcc was configured to use the target's
2007      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2008       case $host_os in
2009  *cygwin*)
2010            OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy | sed -e 's%\\\\%/%g' `
2011    ;;
2012  *)
2013    OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy`
2014    ;;
2015  esac
2016
2017    fi
2018  else
2019    # The user set an environment variable.
2020    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2021    # will override the environment variable, which isn't what the user
2022    # intends
2023    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
2024echo "configure:2025: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
2025    case "$OBJCOPY_FOR_TARGET" in
2026    /*) # valid
2027      echo "$ac_t"""yes"" 1>&6
2028    ;;
2029    *)  # invalid for AC_PATH_PROG
2030      echo "$ac_t"""no"" 1>&6
2031      { echo "configure: error: ***
2032        Environment variable OBJCOPY_FOR_TARGET should either
2033        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2034    ;;
2035    esac
2036  fi
2037
2038  # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
2039set dummy "$program_prefix"objcopy; ac_word=$2
2040echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2041echo "configure:2042: checking for $ac_word" >&5
2042if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
2043  echo $ac_n "(cached) $ac_c" 1>&6
2044else
2045  case "$OBJCOPY_FOR_TARGET" in
2046  /*)
2047  ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path.
2048  ;;
2049  ?:/*)                 
2050  ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a dos path.
2051  ;;
2052  *)
2053  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2054  ac_dummy="$PATH"
2055  for ac_dir in $ac_dummy; do
2056    test -z "$ac_dir" && ac_dir=.
2057    if test -f $ac_dir/$ac_word; then
2058      ac_cv_path_OBJCOPY_FOR_TARGET="$ac_dir/$ac_word"
2059      break
2060    fi
2061  done
2062  IFS="$ac_save_ifs"
2063  test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET="no"
2064  ;;
2065esac
2066fi
2067OBJCOPY_FOR_TARGET="$ac_cv_path_OBJCOPY_FOR_TARGET"
2068if test -n "$OBJCOPY_FOR_TARGET"; then
2069  echo "$ac_t""$OBJCOPY_FOR_TARGET" 1>&6
2070else
2071  echo "$ac_t""no" 1>&6
2072fi
2073
2074fi
2075
2076 
2077echo $ac_n "checking target's size""... $ac_c" 1>&6
2078echo "configure:2079: checking target's size" >&5
2079if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
2080  echo $ac_n "(cached) $ac_c" 1>&6
2081else
2082  :
2083fi
2084
2085echo "$ac_t""$ac_cv_path_SIZE_FOR_TARGET" 1>&6
2086
2087if test -n "$ac_cv_path_SIZE_FOR_TARGET"; then
2088    SIZE_FOR_TARGET=$ac_cv_path_SIZE_FOR_TARGET
2089else
2090    if test -z "$SIZE_FOR_TARGET" ; then
2091    if test "$rtems_cv_prog_gcc" = "yes"; then
2092      # We are using gcc, ask it about its tool
2093      # NOTE: Necessary if gcc was configured to use the target's
2094      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2095       case $host_os in
2096  *cygwin*)
2097            SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size | sed -e 's%\\\\%/%g' `
2098    ;;
2099  *)
2100    SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size`
2101    ;;
2102  esac
2103
2104    fi
2105  else
2106    # The user set an environment variable.
2107    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2108    # will override the environment variable, which isn't what the user
2109    # intends
2110    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
2111echo "configure:2112: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
2112    case "$SIZE_FOR_TARGET" in
2113    /*) # valid
2114      echo "$ac_t"""yes"" 1>&6
2115    ;;
2116    *)  # invalid for AC_PATH_PROG
2117      echo "$ac_t"""no"" 1>&6
2118      { echo "configure: error: ***
2119        Environment variable SIZE_FOR_TARGET should either
2120        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2121    ;;
2122    esac
2123  fi
2124
2125  # Extract the first word of ""$program_prefix"size", so it can be a program name with args.
2126set dummy "$program_prefix"size; ac_word=$2
2127echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2128echo "configure:2129: checking for $ac_word" >&5
2129if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
2130  echo $ac_n "(cached) $ac_c" 1>&6
2131else
2132  case "$SIZE_FOR_TARGET" in
2133  /*)
2134  ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a path.
2135  ;;
2136  ?:/*)                 
2137  ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a dos path.
2138  ;;
2139  *)
2140  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2141  ac_dummy="$PATH"
2142  for ac_dir in $ac_dummy; do
2143    test -z "$ac_dir" && ac_dir=.
2144    if test -f $ac_dir/$ac_word; then
2145      ac_cv_path_SIZE_FOR_TARGET="$ac_dir/$ac_word"
2146      break
2147    fi
2148  done
2149  IFS="$ac_save_ifs"
2150  test -z "$ac_cv_path_SIZE_FOR_TARGET" && ac_cv_path_SIZE_FOR_TARGET="no"
2151  ;;
2152esac
2153fi
2154SIZE_FOR_TARGET="$ac_cv_path_SIZE_FOR_TARGET"
2155if test -n "$SIZE_FOR_TARGET"; then
2156  echo "$ac_t""$SIZE_FOR_TARGET" 1>&6
2157else
2158  echo "$ac_t""no" 1>&6
2159fi
2160
2161fi
2162
2163 
2164echo $ac_n "checking target's strip""... $ac_c" 1>&6
2165echo "configure:2166: checking target's strip" >&5
2166if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
2167  echo $ac_n "(cached) $ac_c" 1>&6
2168else
2169  :
2170fi
2171
2172echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
2173
2174if test -n "$ac_cv_path_STRIP_FOR_TARGET"; then
2175    STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
2176else
2177    if test -z "$STRIP_FOR_TARGET" ; then
2178    if test "$rtems_cv_prog_gcc" = "yes"; then
2179      # We are using gcc, ask it about its tool
2180      # NOTE: Necessary if gcc was configured to use the target's
2181      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2182       case $host_os in
2183  *cygwin*)
2184            STRIP_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=strip | sed -e 's%\\\\%/%g' `
2185    ;;
2186  *)
2187    STRIP_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=strip`
2188    ;;
2189  esac
2190
2191    fi
2192  else
2193    # The user set an environment variable.
2194    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2195    # will override the environment variable, which isn't what the user
2196    # intends
2197    echo $ac_n "checking whether environment variable STRIP_FOR_TARGET is an absolute path""... $ac_c" 1>&6
2198echo "configure:2199: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
2199    case "$STRIP_FOR_TARGET" in
2200    /*) # valid
2201      echo "$ac_t"""yes"" 1>&6
2202    ;;
2203    *)  # invalid for AC_PATH_PROG
2204      echo "$ac_t"""no"" 1>&6
2205      { echo "configure: error: ***
2206        Environment variable STRIP_FOR_TARGET should either
2207        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2208    ;;
2209    esac
2210  fi
2211
2212  # Extract the first word of ""$program_prefix"strip", so it can be a program name with args.
2213set dummy "$program_prefix"strip; ac_word=$2
2214echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2215echo "configure:2216: checking for $ac_word" >&5
2216if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
2217  echo $ac_n "(cached) $ac_c" 1>&6
2218else
2219  case "$STRIP_FOR_TARGET" in
2220  /*)
2221  ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
2222  ;;
2223  ?:/*)                 
2224  ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
2225  ;;
2226  *)
2227  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2228  ac_dummy="$PATH"
2229  for ac_dir in $ac_dummy; do
2230    test -z "$ac_dir" && ac_dir=.
2231    if test -f $ac_dir/$ac_word; then
2232      ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
2233      break
2234    fi
2235  done
2236  IFS="$ac_save_ifs"
2237  test -z "$ac_cv_path_STRIP_FOR_TARGET" && ac_cv_path_STRIP_FOR_TARGET="no"
2238  ;;
2239esac
2240fi
2241STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
2242if test -n "$STRIP_FOR_TARGET"; then
2243  echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
2244else
2245  echo "$ac_t""no" 1>&6
2246fi
2247
2248fi
2249
2250
2251
2252 if test "${target_cpu}" = "i386"; then
2253    echo $ac_n "checking for 16 bit mode assembler support""... $ac_c" 1>&6
2254echo "configure:2255: checking for 16 bit mode assembler support" >&5
2255if eval "test \"`echo '$''{'rtems_cv_prog_gas_code16'+set}'`\" = set"; then
2256  echo $ac_n "(cached) $ac_c" 1>&6
2257else
2258  cat > conftest.s << EOF
2259         .code16
2260         data32
2261         addr32
2262         lgdt 0
2263EOF
2264      if { ac_try='$AS_FOR_TARGET -o conftest.o conftest.s'; { (eval echo configure:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2265        rtems_cv_prog_gas_code16=yes
2266      else
2267        rtems_cv_prog_gas_code16=no
2268      fi
2269fi
2270
2271echo "$ac_t""$rtems_cv_prog_gas_code16" 1>&6
2272    RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
2273  fi
2274 
2275
2276
2277# Extract the first word of "gcc", so it can be a program name with args.
2278set dummy gcc; ac_word=$2
2279echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2280echo "configure:2281: checking for $ac_word" >&5
2281if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2282  echo $ac_n "(cached) $ac_c" 1>&6
2283else
2284  if test -n "$CC"; then
2285  ac_cv_prog_CC="$CC" # Let the user override the test.
2286else
2287  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2288  ac_dummy="$PATH"
2289  for ac_dir in $ac_dummy; do
2290    test -z "$ac_dir" && ac_dir=.
2291    if test -f $ac_dir/$ac_word; then
2292      ac_cv_prog_CC="gcc"
2293      break
2294    fi
2295  done
2296  IFS="$ac_save_ifs"
2297fi
2298fi
2299CC="$ac_cv_prog_CC"
2300if test -n "$CC"; then
2301  echo "$ac_t""$CC" 1>&6
2302else
2303  echo "$ac_t""no" 1>&6
2304fi
2305
2306if test -z "$CC"; then
2307  # Extract the first word of "cc", so it can be a program name with args.
2308set dummy cc; ac_word=$2
2309echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2310echo "configure:2311: checking for $ac_word" >&5
2311if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2312  echo $ac_n "(cached) $ac_c" 1>&6
2313else
2314  if test -n "$CC"; then
2315  ac_cv_prog_CC="$CC" # Let the user override the test.
2316else
2317  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2318  ac_prog_rejected=no
2319  ac_dummy="$PATH"
2320  for ac_dir in $ac_dummy; do
2321    test -z "$ac_dir" && ac_dir=.
2322    if test -f $ac_dir/$ac_word; then
2323      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2324        ac_prog_rejected=yes
2325        continue
2326      fi
2327      ac_cv_prog_CC="cc"
2328      break
2329    fi
2330  done
2331  IFS="$ac_save_ifs"
2332if test $ac_prog_rejected = yes; then
2333  # We found a bogon in the path, so make sure we never use it.
2334  set dummy $ac_cv_prog_CC
2335  shift
2336  if test $# -gt 0; then
2337    # We chose a different compiler from the bogus one.
2338    # However, it has the same basename, so the bogon will be chosen
2339    # first if we set CC to just the basename; use the full file name.
2340    shift
2341    set dummy "$ac_dir/$ac_word" "$@"
2342    shift
2343    ac_cv_prog_CC="$@"
2344  fi
2345fi
2346fi
2347fi
2348CC="$ac_cv_prog_CC"
2349if test -n "$CC"; then
2350  echo "$ac_t""$CC" 1>&6
2351else
2352  echo "$ac_t""no" 1>&6
2353fi
2354
2355  if test -z "$CC"; then
2356    case "`uname -s`" in
2357    *win32* | *WIN32*)
2358      # Extract the first word of "cl", so it can be a program name with args.
2359set dummy cl; ac_word=$2
2360echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2361echo "configure:2362: checking for $ac_word" >&5
2362if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2363  echo $ac_n "(cached) $ac_c" 1>&6
2364else
2365  if test -n "$CC"; then
2366  ac_cv_prog_CC="$CC" # Let the user override the test.
2367else
2368  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2369  ac_dummy="$PATH"
2370  for ac_dir in $ac_dummy; do
2371    test -z "$ac_dir" && ac_dir=.
2372    if test -f $ac_dir/$ac_word; then
2373      ac_cv_prog_CC="cl"
2374      break
2375    fi
2376  done
2377  IFS="$ac_save_ifs"
2378fi
2379fi
2380CC="$ac_cv_prog_CC"
2381if test -n "$CC"; then
2382  echo "$ac_t""$CC" 1>&6
2383else
2384  echo "$ac_t""no" 1>&6
2385fi
2386 ;;
2387    esac
2388  fi
2389  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2390fi
2391
2392echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2393echo "configure:2394: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2394
2395ac_ext=c
2396# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2397ac_cpp='$CPP $CPPFLAGS'
2398ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2399ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2400cross_compiling=$ac_cv_prog_cc_cross
2401
2402cat > conftest.$ac_ext << EOF
2403
2404#line 2405 "configure"
2405#include "confdefs.h"
2406
2407main(){return(0);}
2408EOF
2409if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2410  ac_cv_prog_cc_works=yes
2411  # If we can't run a trivial program, we are probably using a cross compiler.
2412  if (./conftest; exit) 2>/dev/null; then
2413    ac_cv_prog_cc_cross=no
2414  else
2415    ac_cv_prog_cc_cross=yes
2416  fi
2417else
2418  echo "configure: failed program was:" >&5
2419  cat conftest.$ac_ext >&5
2420  ac_cv_prog_cc_works=no
2421fi
2422rm -fr conftest*
2423ac_ext=c
2424# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2425ac_cpp='$CPP $CPPFLAGS'
2426ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2427ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2428cross_compiling=$ac_cv_prog_cc_cross
2429
2430echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2431if test $ac_cv_prog_cc_works = no; then
2432  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2433fi
2434echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2435echo "configure:2436: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2436echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2437cross_compiling=$ac_cv_prog_cc_cross
2438
2439echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2440echo "configure:2441: checking whether we are using GNU C" >&5
2441if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2442  echo $ac_n "(cached) $ac_c" 1>&6
2443else
2444  cat > conftest.c <<EOF
2445#ifdef __GNUC__
2446  yes;
2447#endif
2448EOF
2449if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2450  ac_cv_prog_gcc=yes
2451else
2452  ac_cv_prog_gcc=no
2453fi
2454fi
2455
2456echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2457
2458if test $ac_cv_prog_gcc = yes; then
2459  GCC=yes
2460else
2461  GCC=
2462fi
2463
2464ac_test_CFLAGS="${CFLAGS+set}"
2465ac_save_CFLAGS="$CFLAGS"
2466CFLAGS=
2467echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2468echo "configure:2469: checking whether ${CC-cc} accepts -g" >&5
2469if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2470  echo $ac_n "(cached) $ac_c" 1>&6
2471else
2472  echo 'void f(){}' > conftest.c
2473if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2474  ac_cv_prog_cc_g=yes
2475else
2476  ac_cv_prog_cc_g=no
2477fi
2478rm -f conftest*
2479
2480fi
2481
2482echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2483if test "$ac_test_CFLAGS" = set; then
2484  CFLAGS="$ac_save_CFLAGS"
2485elif test $ac_cv_prog_cc_g = yes; then
2486  if test "$GCC" = yes; then
2487    CFLAGS="-g -O2"
2488  else
2489    CFLAGS="-g"
2490  fi
2491else
2492  if test "$GCC" = yes; then
2493    CFLAGS="-O2"
2494  else
2495    CFLAGS=
2496  fi
2497fi
2498
2499
2500if test "$RTEMS_CPU" = "unix" ; then
2501   
2502
2503echo $ac_n "checking whether $RTEMS_HOST supports System V semaphores""... $ac_c" 1>&6
2504echo "configure:2505: checking whether $RTEMS_HOST supports System V semaphores" >&5
2505if eval "test \"`echo '$''{'rtems_cv_sysv_sem'+set}'`\" = set"; then
2506  echo $ac_n "(cached) $ac_c" 1>&6
2507else
2508 
2509if test "$cross_compiling" = yes; then
2510  :
2511else
2512  cat > conftest.$ac_ext <<EOF
2513#line 2514 "configure"
2514#include "confdefs.h"
2515
2516#include <sys/types.h>
2517#include <sys/ipc.h>
2518#include <sys/sem.h>
2519int main () {
2520#if !defined(sun)
2521  union semun arg ;
2522#else
2523  union semun {
2524    int val;
2525    struct semid_ds *buf;
2526    ushort *array;
2527  } arg;
2528#endif
2529  int id=semget(IPC_PRIVATE,1,IPC_CREAT|0400);
2530  if (id == -1)
2531    exit(1);
2532  arg.val = 0; /* avoid implicit type cast to union */
2533  if (semctl(id, 0, IPC_RMID, arg) == -1)
2534    exit(1);
2535  exit(0);
2536}
2537
2538EOF
2539if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2540then
2541  rtems_cv_sysv_sem="yes"
2542else
2543  echo "configure: failed program was:" >&5
2544  cat conftest.$ac_ext >&5
2545  rm -fr conftest*
2546  rtems_cv_sysv_sem="no"
2547fi
2548rm -fr conftest*
2549fi
2550
2551
2552fi
2553
2554echo "$ac_t""$rtems_cv_sysv_sem" 1>&6
2555
2556  if test "$rtems_cv_sysv_sem" != "yes" ; then
2557    { echo "configure: error: System V semaphores don't work, required by simulator" 1>&2; exit 1; }
2558  fi
2559   
2560
2561echo $ac_n "checking whether $RTEMS_HOST supports System V shared memory""... $ac_c" 1>&6
2562echo "configure:2563: checking whether $RTEMS_HOST supports System V shared memory" >&5
2563if eval "test \"`echo '$''{'rtems_cv_sysv_shm'+set}'`\" = set"; then
2564  echo $ac_n "(cached) $ac_c" 1>&6
2565else
2566 
2567if test "$cross_compiling" = yes; then
2568  :
2569else
2570  cat > conftest.$ac_ext <<EOF
2571#line 2572 "configure"
2572#include "confdefs.h"
2573
2574#include <sys/types.h>
2575#include <sys/ipc.h>
2576#include <sys/shm.h>
2577int main () {
2578  int id=shmget(IPC_PRIVATE,1,IPC_CREAT|0400);
2579  if (id == -1)
2580    exit(1);
2581  if (shmctl(id, IPC_RMID, 0) == -1)
2582    exit(1);
2583  exit(0);
2584}
2585
2586EOF
2587if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2588then
2589  rtems_cv_sysv_shm="yes"
2590else
2591  echo "configure: failed program was:" >&5
2592  cat conftest.$ac_ext >&5
2593  rm -fr conftest*
2594  rtems_cv_sysv_shm="no"
2595fi
2596rm -fr conftest*
2597fi
2598
2599
2600fi
2601
2602echo "$ac_t""$rtems_cv_sysv_shm" 1>&6
2603
2604  if test "$rtems_cv_sysv_shm" != "yes" ; then
2605    { echo "configure: error: System V shared memory doesn't work, required by simulator" 1>&2; exit 1; }
2606  fi
2607   
2608
2609echo $ac_n "checking whether $RTEMS_HOST supports System V messages""... $ac_c" 1>&6
2610echo "configure:2611: checking whether $RTEMS_HOST supports System V messages" >&5
2611if eval "test \"`echo '$''{'rtems_cv_sysv_msg'+set}'`\" = set"; then
2612  echo $ac_n "(cached) $ac_c" 1>&6
2613else
2614 
2615if test "$cross_compiling" = yes; then
2616  :
2617else
2618  cat > conftest.$ac_ext <<EOF
2619#line 2620 "configure"
2620#include "confdefs.h"
2621
2622#include <sys/types.h>
2623#include <sys/ipc.h>
2624#include <sys/msg.h>
2625int main () {
2626  int id=msgget(IPC_PRIVATE,IPC_CREAT|0400);
2627  if (id == -1)
2628    exit(1);
2629  if (msgctl(id, IPC_RMID, 0) == -1)
2630    exit(1);
2631  exit(0);
2632}
2633
2634EOF
2635if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2636then
2637  rtems_cv_sysv_msg="yes"
2638else
2639  echo "configure: failed program was:" >&5
2640  cat conftest.$ac_ext >&5
2641  rm -fr conftest*
2642  rtems_cv_sysv_msg="no"
2643fi
2644rm -fr conftest*
2645fi
2646
2647
2648fi
2649
2650echo "$ac_t""$rtems_cv_sysv_msg" 1>&6
2651
2652  if test "$rtems_cv_sysv_msg" != "yes" ; then
2653    { echo "configure: error: System V messages don't work, required by simulator" 1>&2; exit 1; }
2654  fi
2655fi
2656
2657
2658echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
2659echo "configure:2660: checking for make/custom/$RTEMS_BSP.cfg" >&5
2660if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
2661  echo "$ac_t""yes" 1>&6
2662else
2663  { echo "configure: error: no" 1>&2; exit 1; }
2664fi
2665
2666
2667# always build the test tools
2668testtools_cfgdirs="tools/generic"
2669if test "$tests_enabled" = "yes"; then
2670   
2671echo $ac_n "checking for Makefile.in in libtests""... $ac_c" 1>&6
2672echo "configure:2673: checking for Makefile.in in libtests" >&5
2673if test -d $srcdir/libtests; then
2674  rtems_av_save_dir=`pwd`;
2675  cd $srcdir;
2676  rtems_av_tmp=`find libtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2677  makefiles="$makefiles $rtems_av_tmp";
2678  cd $rtems_av_save_dir;
2679  echo "$ac_t""done" 1>&6
2680else
2681  echo "$ac_t""no" 1>&6
2682fi
2683
2684
2685   
2686echo $ac_n "checking for Makefile.in in sptests""... $ac_c" 1>&6
2687echo "configure:2688: checking for Makefile.in in sptests" >&5
2688if test -d $srcdir/sptests; then
2689  rtems_av_save_dir=`pwd`;
2690  cd $srcdir;
2691  rtems_av_tmp=`find sptests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2692  makefiles="$makefiles $rtems_av_tmp";
2693  cd $rtems_av_save_dir;
2694  echo "$ac_t""done" 1>&6
2695else
2696  echo "$ac_t""no" 1>&6
2697fi
2698
2699
2700   
2701echo $ac_n "checking for Makefile.in in tmtests""... $ac_c" 1>&6
2702echo "configure:2703: checking for Makefile.in in tmtests" >&5
2703if test -d $srcdir/tmtests; then
2704  rtems_av_save_dir=`pwd`;
2705  cd $srcdir;
2706  rtems_av_tmp=`find tmtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2707  makefiles="$makefiles $rtems_av_tmp";
2708  cd $rtems_av_save_dir;
2709  echo "$ac_t""done" 1>&6
2710else
2711  echo "$ac_t""no" 1>&6
2712fi
2713
2714
2715   if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
2716       
2717echo $ac_n "checking for Makefile.in in mptests""... $ac_c" 1>&6
2718echo "configure:2719: checking for Makefile.in in mptests" >&5
2719if test -d $srcdir/mptests; then
2720  rtems_av_save_dir=`pwd`;
2721  cd $srcdir;
2722  rtems_av_tmp=`find mptests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2723  makefiles="$makefiles $rtems_av_tmp";
2724  cd $rtems_av_save_dir;
2725  echo "$ac_t""done" 1>&6
2726else
2727  echo "$ac_t""no" 1>&6
2728fi
2729
2730
2731   fi
2732   if test "$RTEMS_HAS_POSIX_API" = "yes"; then
2733     
2734echo $ac_n "checking for Makefile.in in psxtests""... $ac_c" 1>&6
2735echo "configure:2736: checking for Makefile.in in psxtests" >&5
2736if test -d $srcdir/psxtests; then
2737  rtems_av_save_dir=`pwd`;
2738  cd $srcdir;
2739  rtems_av_tmp=`find psxtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2740  makefiles="$makefiles $rtems_av_tmp";
2741  cd $rtems_av_save_dir;
2742  echo "$ac_t""done" 1>&6
2743else
2744  echo "$ac_t""no" 1>&6
2745fi
2746
2747
2748   fi
2749   if test -d "$srcdir/tools/$RTEMS_CPU"; then
2750     testtools_cfgdirs="$testtools_cfgdirs tools/$RTEMS_CPU"
2751   fi
2752fi
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765subdirs="$testtools_cfgdirs"
2766
2767
2768# Try to explicitly list a Makefile here
2769trap '' 1 2 15
2770cat > confcache <<\EOF
2771# This file is a shell script that caches the results of configure
2772# tests run on this system so they can be shared between configure
2773# scripts and configure runs.  It is not useful on other systems.
2774# If it contains results you don't want to keep, you may remove or edit it.
2775#
2776# By default, configure uses ./config.cache as the cache file,
2777# creating it if it does not exist already.  You can give configure
2778# the --cache-file=FILE option to use a different cache file; that is
2779# what configure does when it calls configure scripts in
2780# subdirectories, so they share the cache.
2781# Giving --cache-file=/dev/null disables caching, for debugging configure.
2782# config.status only pays attention to the cache file if you give it the
2783# --recheck option to rerun configure.
2784#
2785EOF
2786# The following way of writing the cache mishandles newlines in values,
2787# but we know of no workaround that is simple, portable, and efficient.
2788# So, don't put newlines in cache variables' values.
2789# Ultrix sh set writes to stderr and can't be redirected directly,
2790# and sets the high bit in the cache file unless we assign to the vars.
2791(set) 2>&1 |
2792  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2793  *ac_space=\ *)
2794    # `set' does not quote correctly, so add quotes (double-quote substitution
2795    # turns \\\\ into \\, and sed turns \\ into \).
2796    sed -n \
2797      -e "s/'/'\\\\''/g" \
2798      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2799    ;;
2800  *)
2801    # `set' quotes correctly as required by POSIX, so do not add quotes.
2802    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2803    ;;
2804  esac >> confcache
2805if cmp -s $cache_file confcache; then
2806  :
2807else
2808  if test -w $cache_file; then
2809    echo "updating cache $cache_file"
2810    cat confcache > $cache_file
2811  else
2812    echo "not updating unwritable cache $cache_file"
2813  fi
2814fi
2815rm -f confcache
2816
2817trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2818
2819test "x$prefix" = xNONE && prefix=$ac_default_prefix
2820# Let make expand exec_prefix.
2821test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2822
2823# Any assignment to VPATH causes Sun make to only execute
2824# the first set of double-colon rules, so remove it if not needed.
2825# If there is a colon in the path, we need to keep it.
2826if test "x$srcdir" = x.; then
2827  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2828fi
2829
2830trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2831
2832# Transform confdefs.h into DEFS.
2833# Protect against shell expansion while executing Makefile rules.
2834# Protect against Makefile macro expansion.
2835cat > conftest.defs <<\EOF
2836s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2837s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2838s%\[%\\&%g
2839s%\]%\\&%g
2840s%\$%$$%g
2841EOF
2842DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2843rm -f conftest.defs
2844
2845
2846# Without the "./", some shells look in PATH for config.status.
2847: ${CONFIG_STATUS=./config.status}
2848
2849echo creating $CONFIG_STATUS
2850rm -f $CONFIG_STATUS
2851cat > $CONFIG_STATUS <<EOF
2852#! /bin/sh
2853# Generated automatically by configure.
2854# Run this file to recreate the current configuration.
2855# This directory was configured as follows,
2856# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2857#
2858# $0 $ac_configure_args
2859#
2860# Compiler output produced by configure, useful for debugging
2861# configure, is in ./config.log if it exists.
2862
2863ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2864for ac_option
2865do
2866  case "\$ac_option" in
2867  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2868    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2869    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2870  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2871    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2872    exit 0 ;;
2873  -help | --help | --hel | --he | --h)
2874    echo "\$ac_cs_usage"; exit 0 ;;
2875  *) echo "\$ac_cs_usage"; exit 1 ;;
2876  esac
2877done
2878
2879ac_given_srcdir=$srcdir
2880ac_given_INSTALL="$INSTALL"
2881
2882trap 'rm -fr `echo "Makefile
2883support/Makefile
2884support/include/Makefile
2885support/stubdr/Makefile
2886support/wrapup/Makefile
2887tools/Makefile
2888samples/Makefile
2889samples/base_mp/Makefile
2890samples/base_mp/node1/Makefile
2891samples/base_mp/node2/Makefile
2892samples/base_sp/Makefile
2893samples/cdtest/Makefile
2894samples/hello/Makefile
2895samples/minimum/Makefile
2896samples/paranoia/Makefile
2897samples/ticker/Makefile
2898samples/unlimited/Makefile
2899$makefiles" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2900EOF
2901cat >> $CONFIG_STATUS <<EOF
2902
2903# Protect against being on the right side of a sed subst in config.status.
2904sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2905 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2906$ac_vpsub
2907$extrasub
2908s%@SHELL@%$SHELL%g
2909s%@CFLAGS@%$CFLAGS%g
2910s%@CPPFLAGS@%$CPPFLAGS%g
2911s%@CXXFLAGS@%$CXXFLAGS%g
2912s%@FFLAGS@%$FFLAGS%g
2913s%@DEFS@%$DEFS%g
2914s%@LDFLAGS@%$LDFLAGS%g
2915s%@LIBS@%$LIBS%g
2916s%@exec_prefix@%$exec_prefix%g
2917s%@prefix@%$prefix%g
2918s%@program_transform_name@%$program_transform_name%g
2919s%@bindir@%$bindir%g
2920s%@sbindir@%$sbindir%g
2921s%@libexecdir@%$libexecdir%g
2922s%@datadir@%$datadir%g
2923s%@sysconfdir@%$sysconfdir%g
2924s%@sharedstatedir@%$sharedstatedir%g
2925s%@localstatedir@%$localstatedir%g
2926s%@libdir@%$libdir%g
2927s%@includedir@%$includedir%g
2928s%@oldincludedir@%$oldincludedir%g
2929s%@infodir@%$infodir%g
2930s%@mandir@%$mandir%g
2931s%@RTEMS_TOPdir@%$RTEMS_TOPdir%g
2932s%@SET_MAKE@%$SET_MAKE%g
2933s%@host@%$host%g
2934s%@host_alias@%$host_alias%g
2935s%@host_cpu@%$host_cpu%g
2936s%@host_vendor@%$host_vendor%g
2937s%@host_os@%$host_os%g
2938s%@target@%$target%g
2939s%@target_alias@%$target_alias%g
2940s%@target_cpu@%$target_cpu%g
2941s%@target_vendor@%$target_vendor%g
2942s%@target_os@%$target_os%g
2943s%@build@%$build%g
2944s%@build_alias@%$build_alias%g
2945s%@build_cpu@%$build_cpu%g
2946s%@build_vendor@%$build_vendor%g
2947s%@build_os@%$build_os%g
2948s%@RTEMS_CPU@%$RTEMS_CPU%g
2949s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
2950s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
2951s%@MAINT@%$MAINT%g
2952s%@RTEMS_HAS_MULTIPROCESSING@%$RTEMS_HAS_MULTIPROCESSING%g
2953s%@RTEMS_HAS_POSIX_API@%$RTEMS_HAS_POSIX_API%g
2954s%@RTEMS_HAS_NETWORKING@%$RTEMS_HAS_NETWORKING%g
2955s%@RTEMS_HAS_RDBG@%$RTEMS_HAS_RDBG%g
2956s%@RTEMS_USE_MACROS@%$RTEMS_USE_MACROS%g
2957s%@RTEMS_LIBC_DIR@%$RTEMS_LIBC_DIR%g
2958s%@RTEMS_BSP@%$RTEMS_BSP%g
2959s%@RM@%$RM%g
2960s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2961s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2962s%@INSTALL_DATA@%$INSTALL_DATA%g
2963s%@RTEMS_HOST@%$RTEMS_HOST%g
2964s%@PROJECT_ROOT@%$PROJECT_ROOT%g
2965s%@RTEMS_ROOT@%$RTEMS_ROOT%g
2966s%@INSTALL_CHANGE@%$INSTALL_CHANGE%g
2967s%@PACKHEX@%$PACKHEX%g
2968s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
2969s%@GCCSED@%$GCCSED%g
2970s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
2971s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
2972s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
2973s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
2974s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
2975s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
2976s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
2977s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
2978s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
2979s%@RTEMS_GAS_CODE16@%$RTEMS_GAS_CODE16%g
2980s%@CC@%$CC%g
2981s%@rtems_cv_prog_cc_cross@%$rtems_cv_prog_cc_cross%g
2982s%@RTEMS_HAS_CPLUSPLUS@%$RTEMS_HAS_CPLUSPLUS%g
2983s%@RTEMS_USE_GCC272@%$RTEMS_USE_GCC272%g
2984s%@BARE_CPU_CFLAGS@%$BARE_CPU_CFLAGS%g
2985s%@BARE_CPU_MODEL@%$BARE_CPU_MODEL%g
2986s%@program_prefix@%$program_prefix%g
2987s%@CC_CFLAGS_DEFAULT@%$CC_CFLAGS_DEFAULT%g
2988s%@CC_CFLAGS_DEBUG_V@%$CC_CFLAGS_DEBUG_V%g
2989s%@CC_CFLAGS_PROFILE_V@%$CC_CFLAGS_PROFILE_V%g
2990s%@CC_LDFLAGS_PROFILE_V@%$CC_LDFLAGS_PROFILE_V%g
2991s%@subdirs@%$subdirs%g
2992
2993CEOF
2994EOF
2995
2996cat >> $CONFIG_STATUS <<\EOF
2997
2998# Split the substitutions into bite-sized pieces for seds with
2999# small command number limits, like on Digital OSF/1 and HP-UX.
3000ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3001ac_file=1 # Number of current file.
3002ac_beg=1 # First line for current file.
3003ac_end=$ac_max_sed_cmds # Line after last line for current file.
3004ac_more_lines=:
3005ac_sed_cmds=""
3006while $ac_more_lines; do
3007  if test $ac_beg -gt 1; then
3008    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3009  else
3010    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3011  fi
3012  if test ! -s conftest.s$ac_file; then
3013    ac_more_lines=false
3014    rm -f conftest.s$ac_file
3015  else
3016    if test -z "$ac_sed_cmds"; then
3017      ac_sed_cmds="sed -f conftest.s$ac_file"
3018    else
3019      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3020    fi
3021    ac_file=`expr $ac_file + 1`
3022    ac_beg=$ac_end
3023    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3024  fi
3025done
3026if test -z "$ac_sed_cmds"; then
3027  ac_sed_cmds=cat
3028fi
3029EOF
3030
3031cat >> $CONFIG_STATUS <<EOF
3032
3033CONFIG_FILES=\${CONFIG_FILES-"Makefile
3034support/Makefile
3035support/include/Makefile
3036support/stubdr/Makefile
3037support/wrapup/Makefile
3038tools/Makefile
3039samples/Makefile
3040samples/base_mp/Makefile
3041samples/base_mp/node1/Makefile
3042samples/base_mp/node2/Makefile
3043samples/base_sp/Makefile
3044samples/cdtest/Makefile
3045samples/hello/Makefile
3046samples/minimum/Makefile
3047samples/paranoia/Makefile
3048samples/ticker/Makefile
3049samples/unlimited/Makefile
3050$makefiles"}
3051EOF
3052cat >> $CONFIG_STATUS <<\EOF
3053for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3054  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3055  case "$ac_file" in
3056  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3057       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3058  *) ac_file_in="${ac_file}.in" ;;
3059  esac
3060
3061  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3062
3063  # Remove last slash and all that follows it.  Not all systems have dirname.
3064  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3065  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3066    # The file is in a subdirectory.
3067    test ! -d "$ac_dir" && mkdir "$ac_dir"
3068    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3069    # A "../" for each directory in $ac_dir_suffix.
3070    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3071  else
3072    ac_dir_suffix= ac_dots=
3073  fi
3074
3075  case "$ac_given_srcdir" in
3076  .)  srcdir=.
3077      if test -z "$ac_dots"; then top_srcdir=.
3078      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3079  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3080  *) # Relative path.
3081    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3082    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3083  esac
3084
3085  case "$ac_given_INSTALL" in
3086  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3087  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3088  esac
3089
3090  echo creating "$ac_file"
3091  rm -f "$ac_file"
3092  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3093  case "$ac_file" in
3094  *Makefile*) ac_comsub="1i\\
3095# $configure_input" ;;
3096  *) ac_comsub= ;;
3097  esac
3098
3099  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3100  sed -e "$ac_comsub
3101s%@configure_input@%$configure_input%g
3102s%@srcdir@%$srcdir%g
3103s%@top_srcdir@%$top_srcdir%g
3104s%@INSTALL@%$INSTALL%g
3105" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3106fi; done
3107rm -f conftest.s*
3108
3109EOF
3110cat >> $CONFIG_STATUS <<EOF
3111
3112EOF
3113cat >> $CONFIG_STATUS <<\EOF
3114
3115exit 0
3116EOF
3117chmod +x $CONFIG_STATUS
3118rm -fr confdefs* $ac_clean_files
3119test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3120
3121if test "$no_recursion" != yes; then
3122
3123  # Remove --cache-file and --srcdir arguments so they do not pile up.
3124  ac_sub_configure_args=
3125  ac_prev=
3126  for ac_arg in $ac_configure_args; do
3127    if test -n "$ac_prev"; then
3128      ac_prev=
3129      continue
3130    fi
3131    case "$ac_arg" in
3132    -cache-file | --cache-file | --cache-fil | --cache-fi \
3133    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3134      ac_prev=cache_file ;;
3135    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3136    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3137      ;;
3138    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3139      ac_prev=srcdir ;;
3140    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3141      ;;
3142    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3143    esac
3144  done
3145
3146  for ac_config_dir in $testtools_cfgdirs; do
3147
3148    # Do not complain, so a configure script can configure whichever
3149    # parts of a large source tree are present.
3150    if test ! -d $srcdir/$ac_config_dir; then
3151      continue
3152    fi
3153
3154    echo configuring in $ac_config_dir
3155
3156    case "$srcdir" in
3157    .) ;;
3158    *)
3159      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3160      else
3161        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3162      fi
3163      ;;
3164    esac
3165
3166    ac_popdir=`pwd`
3167    cd $ac_config_dir
3168
3169      # A "../" for each directory in /$ac_config_dir.
3170      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3171
3172    case "$srcdir" in
3173    .) # No --srcdir option.  We are building in place.
3174      ac_sub_srcdir=$srcdir ;;
3175    /*) # Absolute path.
3176      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3177    *) # Relative path.
3178      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3179    esac
3180
3181    # Check for guested configure; otherwise get Cygnus style configure.
3182    if test -f $ac_sub_srcdir/configure; then
3183      ac_sub_configure=$ac_sub_srcdir/configure
3184    elif test -f $ac_sub_srcdir/configure.in; then
3185      ac_sub_configure=$ac_configure
3186    else
3187      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3188      ac_sub_configure=
3189    fi
3190
3191    # The recursion is here.
3192    if test -n "$ac_sub_configure"; then
3193
3194      # Make the cache file name correct relative to the subdirectory.
3195      case "$cache_file" in
3196      /*) ac_sub_cache_file=$cache_file ;;
3197      *) # Relative path.
3198        ac_sub_cache_file="$ac_dots$cache_file" ;;
3199      esac
3200  case "$ac_given_INSTALL" in
3201        [/$]*) INSTALL="$ac_given_INSTALL" ;;
3202        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3203        esac
3204
3205      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3206      # The eval makes quoting arguments work.
3207      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3208      then :
3209      else
3210        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3211      fi
3212    fi
3213
3214    cd $ac_popdir
3215  done
3216fi
3217
Note: See TracBrowser for help on using the repository browser.