source: rtems/c/src/tests/configure @ 1896a650

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

Patch from Ralf Corsepius <corsepiu@…>:

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

CHANGES

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

APPLYING THE PATCH:

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

  • Property mode set to 100644
File size: 95.8 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# Find a good install program.  We prefer a C program (faster),
959# so one script is as good as another.  But avoid the broken or
960# incompatible versions:
961# SysV /etc/install, /usr/sbin/install
962# SunOS /usr/etc/install
963# IRIX /sbin/install
964# AIX /bin/install
965# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
966# AFS /usr/afsws/bin/install, which mishandles nonexistent args
967# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
968# ./install, which can be erroneously created by make from ./install.sh.
969echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
970echo "configure:971: checking for a BSD compatible install" >&5
971if test -z "$INSTALL"; then
972if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
973  echo $ac_n "(cached) $ac_c" 1>&6
974else
975    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
976  for ac_dir in $PATH; do
977    # Account for people who put trailing slashes in PATH elements.
978    case "$ac_dir/" in
979    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
980    *)
981      # OSF1 and SCO ODT 3.0 have their own names for install.
982      # Don't use installbsd from OSF since it installs stuff as root
983      # by default.
984      for ac_prog in ginstall scoinst install; do
985        if test -f $ac_dir/$ac_prog; then
986          if test $ac_prog = install &&
987            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
988            # AIX install.  It has an incompatible calling convention.
989            :
990          else
991            ac_cv_path_install="$ac_dir/$ac_prog -c"
992            break 2
993          fi
994        fi
995      done
996      ;;
997    esac
998  done
999  IFS="$ac_save_IFS"
1000
1001fi
1002  if test "${ac_cv_path_install+set}" = set; then
1003    INSTALL="$ac_cv_path_install"
1004  else
1005    # As a last resort, use the slow shell script.  We don't cache a
1006    # path for INSTALL within a source directory, because that will
1007    # break other packages using the cache if that directory is
1008    # removed, or if the path is relative.
1009    INSTALL="$ac_install_sh"
1010  fi
1011fi
1012echo "$ac_t""$INSTALL" 1>&6
1013
1014# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1015# It thinks the first close brace ends the variable substitution.
1016test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1017
1018test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1019
1020test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1021
1022
1023
1024
1025
1026# Is this a supported CPU?
1027echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
1028echo "configure:1029: checking if cpu $RTEMS_CPU is supported" >&5
1029if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
1030  echo "$ac_t""yes" 1>&6
1031else
1032  { echo "configure: error: no" 1>&2; exit 1; }
1033fi
1034
1035
1036RTEMS_HOST=$host_os
1037case "${target}" in
1038  # hpux unix port should go here
1039  i[3456]86-pc-linux*)         # unix "simulator" port
1040        RTEMS_HOST=Linux
1041        ;;
1042  i[3456]86-*freebsd2*) # unix "simulator" port
1043        RTEMS_HOST=FreeBSD
1044        ;;
1045  sparc-sun-solaris*)             # unix "simulator" port
1046        RTEMS_HOST=Solaris
1047        ;;
1048  *)
1049        ;;
1050esac
1051
1052
1053
1054
1055if test "$TARGET_SUBDIR" = "." ; then
1056PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
1057else
1058PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
1059fi
1060
1061
1062RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
1063
1064
1065INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
1066
1067
1068PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
1069
1070
1071
1072
1073if [ "${program_prefix}" = "NONE" ] ; then
1074  if [ "${target}" = "${host}" ] ; then
1075    program_prefix=
1076  else
1077    program_prefix=${target}-
1078  fi
1079fi
1080
1081
1082
1083
1084for ac_prog in "$program_prefix"gcc "$program_prefix"cc
1085do
1086# Extract the first word of "$ac_prog", so it can be a program name with args.
1087set dummy $ac_prog; ac_word=$2
1088echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1089echo "configure:1090: checking for $ac_word" >&5
1090if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
1091  echo $ac_n "(cached) $ac_c" 1>&6
1092else
1093  case "$CC_FOR_TARGET" in
1094  /*)
1095  ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a path.
1096  ;;
1097  ?:/*)                 
1098  ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a dos path.
1099  ;;
1100  *)
1101  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1102  ac_dummy="$PATH"
1103  for ac_dir in $ac_dummy; do
1104    test -z "$ac_dir" && ac_dir=.
1105    if test -f $ac_dir/$ac_word; then
1106      ac_cv_path_CC_FOR_TARGET="$ac_dir/$ac_word"
1107      break
1108    fi
1109  done
1110  IFS="$ac_save_ifs"
1111  ;;
1112esac
1113fi
1114CC_FOR_TARGET="$ac_cv_path_CC_FOR_TARGET"
1115if test -n "$CC_FOR_TARGET"; then
1116  echo "$ac_t""$CC_FOR_TARGET" 1>&6
1117else
1118  echo "$ac_t""no" 1>&6
1119fi
1120
1121test -n "$CC_FOR_TARGET" && break
1122done
1123
1124test -z "$CC_FOR_TARGET" \
1125  && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1126
1127rtems_save_CC=$CC
1128rtems_save_CFLAGS=$CFLAGS
1129
1130CC=$CC_FOR_TARGET
1131
1132echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1133echo "configure:1134: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1134
1135ac_ext=c
1136# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1137ac_cpp='$CPP $CPPFLAGS'
1138ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1139ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1140cross_compiling=$ac_cv_prog_cc_cross
1141
1142cat > conftest.$ac_ext << EOF
1143
1144#line 1145 "configure"
1145#include "confdefs.h"
1146
1147main(){return(0);}
1148EOF
1149if { (eval echo configure:1150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1150  ac_cv_prog_cc_works=yes
1151  # If we can't run a trivial program, we are probably using a cross compiler.
1152  if (./conftest; exit) 2>/dev/null; then
1153    ac_cv_prog_cc_cross=no
1154  else
1155    ac_cv_prog_cc_cross=yes
1156  fi
1157else
1158  echo "configure: failed program was:" >&5
1159  cat conftest.$ac_ext >&5
1160  ac_cv_prog_cc_works=no
1161fi
1162rm -fr conftest*
1163ac_ext=c
1164# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1165ac_cpp='$CPP $CPPFLAGS'
1166ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1167ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1168cross_compiling=$ac_cv_prog_cc_cross
1169
1170echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1171if test $ac_cv_prog_cc_works = no; then
1172  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1173fi
1174echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1175echo "configure:1176: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1176echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1177cross_compiling=$ac_cv_prog_cc_cross
1178
1179echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1180echo "configure:1181: checking whether we are using GNU C" >&5
1181if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1182  echo $ac_n "(cached) $ac_c" 1>&6
1183else
1184  cat > conftest.c <<EOF
1185#ifdef __GNUC__
1186  yes;
1187#endif
1188EOF
1189if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1190  ac_cv_prog_gcc=yes
1191else
1192  ac_cv_prog_gcc=no
1193fi
1194fi
1195
1196echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1197
1198if test $ac_cv_prog_gcc = yes; then
1199  GCC=yes
1200  ac_test_CFLAGS="${CFLAGS+set}"
1201  ac_save_CFLAGS="$CFLAGS"
1202  CFLAGS=
1203  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1204echo "configure:1205: checking whether ${CC-cc} accepts -g" >&5
1205if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1206  echo $ac_n "(cached) $ac_c" 1>&6
1207else
1208  echo 'void f(){}' > conftest.c
1209if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1210  ac_cv_prog_cc_g=yes
1211else
1212  ac_cv_prog_cc_g=no
1213fi
1214rm -f conftest*
1215
1216fi
1217
1218echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1219  if test "$ac_test_CFLAGS" = set; then
1220    CFLAGS="$ac_save_CFLAGS"
1221  elif test $ac_cv_prog_cc_g = yes; then
1222    CFLAGS="-g -O2"
1223  else
1224    CFLAGS="-O2"
1225  fi
1226else
1227  GCC=
1228  test "${CFLAGS+set}" = set || CFLAGS="-g"
1229fi
1230
1231rtems_cv_prog_gcc=$ac_cv_prog_gcc
1232rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
1233rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
1234rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
1235
1236CC=$rtems_save_CC
1237CFLAGS=$rtems_save_CFLAGS
1238
1239unset ac_cv_prog_gcc
1240unset ac_cv_prog_cc_g
1241unset ac_cv_prog_cc_works
1242unset ac_cv_prog_cc_cross
1243
1244
1245echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
1246echo "configure:1247: checking whether $CC_FOR_TARGET accepts -specs" >&5
1247if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
1248  echo $ac_n "(cached) $ac_c" 1>&6
1249else
1250 
1251rtems_cv_gcc_specs=no
1252if test "$rtems_cv_prog_gcc" = "yes"; then
1253  touch confspec
1254  echo 'void f(){}' >conftest.c
1255  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
1256    rtems_cv_gcc_specs=yes
1257  fi
1258fi
1259rm -f confspec conftest*
1260
1261fi
1262
1263echo "$ac_t""$rtems_cv_gcc_specs" 1>&6
1264 
1265
1266echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
1267echo "configure:1268: checking whether $CC_FOR_TARGET accepts --pipe" >&5
1268if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
1269  echo $ac_n "(cached) $ac_c" 1>&6
1270else
1271 
1272rtems_cv_gcc_pipe=no
1273if test "$rtems_cv_prog_gcc" = "yes"; then
1274case "$host_os" in
1275  cygwin*)
1276    ;;
1277  *)
1278    echo 'void f(){}' >conftest.c
1279    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
1280      rtems_cv_gcc_pipe=yes
1281    fi
1282    rm -f conftest*
1283    ;;
1284esac
1285fi
1286
1287fi
1288
1289echo "$ac_t""$rtems_cv_gcc_pipe" 1>&6
1290
1291if test "$RTEMS_USE_GCC272" != "yes" ; then
1292  if test "$rtems_cv_gcc_specs" = "no"; then
1293    echo "configure: warning: *** disabling --enable-gcc28" 1>&2
1294      RTEMS_USE_GCC272=yes
1295  fi
1296fi
1297test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
1298
1299case $host_os in
1300*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
1301*) ;;
1302esac
1303
1304
1305
1306if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
1307 
1308 
1309
1310for ac_prog in "$program_prefix"g++ "$program_prefix"c++
1311do
1312# Extract the first word of "$ac_prog", so it can be a program name with args.
1313set dummy $ac_prog; ac_word=$2
1314echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1315echo "configure:1316: checking for $ac_word" >&5
1316if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then
1317  echo $ac_n "(cached) $ac_c" 1>&6
1318else
1319  case "$CXX_FOR_TARGET" in
1320  /*)
1321  ac_cv_path_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test with a path.
1322  ;;
1323  ?:/*)                 
1324  ac_cv_path_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test with a dos path.
1325  ;;
1326  *)
1327  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1328  ac_dummy="$PATH"
1329  for ac_dir in $ac_dummy; do
1330    test -z "$ac_dir" && ac_dir=.
1331    if test -f $ac_dir/$ac_word; then
1332      ac_cv_path_CXX_FOR_TARGET="$ac_dir/$ac_word"
1333      break
1334    fi
1335  done
1336  IFS="$ac_save_ifs"
1337  ;;
1338esac
1339fi
1340CXX_FOR_TARGET="$ac_cv_path_CXX_FOR_TARGET"
1341if test -n "$CXX_FOR_TARGET"; then
1342  echo "$ac_t""$CXX_FOR_TARGET" 1>&6
1343else
1344  echo "$ac_t""no" 1>&6
1345fi
1346
1347test -n "$CXX_FOR_TARGET" && break
1348done
1349
1350test -z "$CXX_FOR_TARGET" \
1351  && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1352
1353rtems_save_CXX=$CXX
1354rtems_save_CXXFLAGS=$CXXFLAGS
1355
1356CXX=$CXX_FOR_TARGET
1357
1358echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1359echo "configure:1360: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1360
1361ac_ext=C
1362# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1363ac_cpp='$CXXCPP $CPPFLAGS'
1364ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1365ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1366cross_compiling=$ac_cv_prog_cxx_cross
1367
1368cat > conftest.$ac_ext << EOF
1369
1370#line 1371 "configure"
1371#include "confdefs.h"
1372
1373int main(){return(0);}
1374EOF
1375if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1376  ac_cv_prog_cxx_works=yes
1377  # If we can't run a trivial program, we are probably using a cross compiler.
1378  if (./conftest; exit) 2>/dev/null; then
1379    ac_cv_prog_cxx_cross=no
1380  else
1381    ac_cv_prog_cxx_cross=yes
1382  fi
1383else
1384  echo "configure: failed program was:" >&5
1385  cat conftest.$ac_ext >&5
1386  ac_cv_prog_cxx_works=no
1387fi
1388rm -fr conftest*
1389ac_ext=c
1390# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1391ac_cpp='$CPP $CPPFLAGS'
1392ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1393ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1394cross_compiling=$ac_cv_prog_cc_cross
1395
1396echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1397if test $ac_cv_prog_cxx_works = no; then
1398  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1399fi
1400echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1401echo "configure:1402: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1402echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1403cross_compiling=$ac_cv_prog_cxx_cross
1404
1405echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1406echo "configure:1407: checking whether we are using GNU C++" >&5
1407if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1408  echo $ac_n "(cached) $ac_c" 1>&6
1409else
1410  cat > conftest.C <<EOF
1411#ifdef __GNUC__
1412  yes;
1413#endif
1414EOF
1415if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1416  ac_cv_prog_gxx=yes
1417else
1418  ac_cv_prog_gxx=no
1419fi
1420fi
1421
1422echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1423
1424if test $ac_cv_prog_gxx = yes; then
1425  GXX=yes
1426  ac_test_CXXFLAGS="${CXXFLAGS+set}"
1427  ac_save_CXXFLAGS="$CXXFLAGS"
1428  CXXFLAGS=
1429  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1430echo "configure:1431: checking whether ${CXX-g++} accepts -g" >&5
1431if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1432  echo $ac_n "(cached) $ac_c" 1>&6
1433else
1434  echo 'void f(){}' > conftest.cc
1435if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1436  ac_cv_prog_cxx_g=yes
1437else
1438  ac_cv_prog_cxx_g=no
1439fi
1440rm -f conftest*
1441
1442fi
1443
1444echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1445  if test "$ac_test_CXXFLAGS" = set; then
1446    CXXFLAGS="$ac_save_CXXFLAGS"
1447  elif test $ac_cv_prog_cxx_g = yes; then
1448    CXXFLAGS="-g -O2"
1449  else
1450    CXXFLAGS="-O2"
1451  fi
1452else
1453  GXX=
1454  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1455fi
1456
1457rtems_cv_prog_gxx=$ac_cv_prog_gxx
1458rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g
1459rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works
1460rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross
1461
1462CXX=$rtems_save_CXX
1463CXXFLAGS=$rtems_save_CXXFLAGS
1464
1465unset ac_cv_prog_gxx
1466unset ac_cv_prog_cc_g
1467unset ac_cv_prog_cxx_works
1468unset ac_cv_prog_cxx_cross
1469
1470  if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then
1471    { echo "configure: error: ***
1472     Inconsistency in compiler configuration:
1473     Target C compiler and Target C++ compiler
1474     must both either be cross compilers or native compilers
1475     Hint: If building a posix bsp: LD_LIBRARY_PATH? " 1>&2; exit 1; }
1476  fi
1477
1478fi
1479
1480
1481 
1482echo $ac_n "checking target's ar""... $ac_c" 1>&6
1483echo "configure:1484: checking target's ar" >&5
1484if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1485  echo $ac_n "(cached) $ac_c" 1>&6
1486else
1487  :
1488fi
1489
1490echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
1491
1492if test -n "$ac_cv_path_AR_FOR_TARGET"; then
1493    AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
1494else
1495    if test -z "$AR_FOR_TARGET" ; then
1496    if test "$rtems_cv_prog_gcc" = "yes"; then
1497      # We are using gcc, ask it about its tool
1498      # NOTE: Necessary if gcc was configured to use the target's
1499      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1500       case $host_os in
1501  *cygwin*)
1502            AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar | sed -e 's%\\\\%/%g' `
1503    ;;
1504  *)
1505    AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
1506    ;;
1507  esac
1508
1509    fi
1510  else
1511    # The user set an environment variable.
1512    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1513    # will override the environment variable, which isn't what the user
1514    # intends
1515    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1516echo "configure:1517: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
1517    case "$AR_FOR_TARGET" in
1518    /*) # valid
1519      echo "$ac_t"""yes"" 1>&6
1520    ;;
1521    *)  # invalid for AC_PATH_PROG
1522      echo "$ac_t"""no"" 1>&6
1523      { echo "configure: error: ***
1524        Environment variable AR_FOR_TARGET should either
1525        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1526    ;;
1527    esac
1528  fi
1529
1530  # Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
1531set dummy "$program_prefix"ar; ac_word=$2
1532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1533echo "configure:1534: checking for $ac_word" >&5
1534if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1535  echo $ac_n "(cached) $ac_c" 1>&6
1536else
1537  case "$AR_FOR_TARGET" in
1538  /*)
1539  ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
1540  ;;
1541  ?:/*)                 
1542  ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
1543  ;;
1544  *)
1545  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1546  ac_dummy="$PATH"
1547  for ac_dir in $ac_dummy; do
1548    test -z "$ac_dir" && ac_dir=.
1549    if test -f $ac_dir/$ac_word; then
1550      ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
1551      break
1552    fi
1553  done
1554  IFS="$ac_save_ifs"
1555  test -z "$ac_cv_path_AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET="no"
1556  ;;
1557esac
1558fi
1559AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
1560if test -n "$AR_FOR_TARGET"; then
1561  echo "$ac_t""$AR_FOR_TARGET" 1>&6
1562else
1563  echo "$ac_t""no" 1>&6
1564fi
1565
1566fi
1567
1568 
1569echo $ac_n "checking target's as""... $ac_c" 1>&6
1570echo "configure:1571: checking target's as" >&5
1571if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
1572  echo $ac_n "(cached) $ac_c" 1>&6
1573else
1574  :
1575fi
1576
1577echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
1578
1579if test -n "$ac_cv_path_AS_FOR_TARGET"; then
1580    AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
1581else
1582    if test -z "$AS_FOR_TARGET" ; then
1583    if test "$rtems_cv_prog_gcc" = "yes"; then
1584      # We are using gcc, ask it about its tool
1585      # NOTE: Necessary if gcc was configured to use the target's
1586      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1587       case $host_os in
1588  *cygwin*)
1589            AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as | sed -e 's%\\\\%/%g' `
1590    ;;
1591  *)
1592    AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
1593    ;;
1594  esac
1595
1596    fi
1597  else
1598    # The user set an environment variable.
1599    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1600    # will override the environment variable, which isn't what the user
1601    # intends
1602    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1603echo "configure:1604: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
1604    case "$AS_FOR_TARGET" in
1605    /*) # valid
1606      echo "$ac_t"""yes"" 1>&6
1607    ;;
1608    *)  # invalid for AC_PATH_PROG
1609      echo "$ac_t"""no"" 1>&6
1610      { echo "configure: error: ***
1611        Environment variable AS_FOR_TARGET should either
1612        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1613    ;;
1614    esac
1615  fi
1616
1617  # Extract the first word of ""$program_prefix"as", so it can be a program name with args.
1618set dummy "$program_prefix"as; ac_word=$2
1619echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1620echo "configure:1621: checking for $ac_word" >&5
1621if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
1622  echo $ac_n "(cached) $ac_c" 1>&6
1623else
1624  case "$AS_FOR_TARGET" in
1625  /*)
1626  ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
1627  ;;
1628  ?:/*)                 
1629  ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
1630  ;;
1631  *)
1632  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1633  ac_dummy="$PATH"
1634  for ac_dir in $ac_dummy; do
1635    test -z "$ac_dir" && ac_dir=.
1636    if test -f $ac_dir/$ac_word; then
1637      ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
1638      break
1639    fi
1640  done
1641  IFS="$ac_save_ifs"
1642  test -z "$ac_cv_path_AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET="no"
1643  ;;
1644esac
1645fi
1646AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
1647if test -n "$AS_FOR_TARGET"; then
1648  echo "$ac_t""$AS_FOR_TARGET" 1>&6
1649else
1650  echo "$ac_t""no" 1>&6
1651fi
1652
1653fi
1654
1655 
1656echo $ac_n "checking target's ld""... $ac_c" 1>&6
1657echo "configure:1658: checking target's ld" >&5
1658if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
1659  echo $ac_n "(cached) $ac_c" 1>&6
1660else
1661  :
1662fi
1663
1664echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
1665
1666if test -n "$ac_cv_path_LD_FOR_TARGET"; then
1667    LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
1668else
1669    if test -z "$LD_FOR_TARGET" ; then
1670    if test "$rtems_cv_prog_gcc" = "yes"; then
1671      # We are using gcc, ask it about its tool
1672      # NOTE: Necessary if gcc was configured to use the target's
1673      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1674       case $host_os in
1675  *cygwin*)
1676            LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld | sed -e 's%\\\\%/%g' `
1677    ;;
1678  *)
1679    LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
1680    ;;
1681  esac
1682
1683    fi
1684  else
1685    # The user set an environment variable.
1686    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1687    # will override the environment variable, which isn't what the user
1688    # intends
1689    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1690echo "configure:1691: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
1691    case "$LD_FOR_TARGET" in
1692    /*) # valid
1693      echo "$ac_t"""yes"" 1>&6
1694    ;;
1695    *)  # invalid for AC_PATH_PROG
1696      echo "$ac_t"""no"" 1>&6
1697      { echo "configure: error: ***
1698        Environment variable LD_FOR_TARGET should either
1699        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1700    ;;
1701    esac
1702  fi
1703
1704  # Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
1705set dummy "$program_prefix"ld; ac_word=$2
1706echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1707echo "configure:1708: checking for $ac_word" >&5
1708if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
1709  echo $ac_n "(cached) $ac_c" 1>&6
1710else
1711  case "$LD_FOR_TARGET" in
1712  /*)
1713  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
1714  ;;
1715  ?:/*)                 
1716  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
1717  ;;
1718  *)
1719  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1720  ac_dummy="$PATH"
1721  for ac_dir in $ac_dummy; do
1722    test -z "$ac_dir" && ac_dir=.
1723    if test -f $ac_dir/$ac_word; then
1724      ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
1725      break
1726    fi
1727  done
1728  IFS="$ac_save_ifs"
1729  test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
1730  ;;
1731esac
1732fi
1733LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
1734if test -n "$LD_FOR_TARGET"; then
1735  echo "$ac_t""$LD_FOR_TARGET" 1>&6
1736else
1737  echo "$ac_t""no" 1>&6
1738fi
1739
1740fi
1741
1742 
1743echo $ac_n "checking target's nm""... $ac_c" 1>&6
1744echo "configure:1745: checking target's nm" >&5
1745if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
1746  echo $ac_n "(cached) $ac_c" 1>&6
1747else
1748  :
1749fi
1750
1751echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
1752
1753if test -n "$ac_cv_path_NM_FOR_TARGET"; then
1754    NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
1755else
1756    if test -z "$NM_FOR_TARGET" ; then
1757    if test "$rtems_cv_prog_gcc" = "yes"; then
1758      # We are using gcc, ask it about its tool
1759      # NOTE: Necessary if gcc was configured to use the target's
1760      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1761       case $host_os in
1762  *cygwin*)
1763            NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm | sed -e 's%\\\\%/%g' `
1764    ;;
1765  *)
1766    NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
1767    ;;
1768  esac
1769
1770    fi
1771  else
1772    # The user set an environment variable.
1773    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1774    # will override the environment variable, which isn't what the user
1775    # intends
1776    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1777echo "configure:1778: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
1778    case "$NM_FOR_TARGET" in
1779    /*) # valid
1780      echo "$ac_t"""yes"" 1>&6
1781    ;;
1782    *)  # invalid for AC_PATH_PROG
1783      echo "$ac_t"""no"" 1>&6
1784      { echo "configure: error: ***
1785        Environment variable NM_FOR_TARGET should either
1786        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1787    ;;
1788    esac
1789  fi
1790
1791  # Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
1792set dummy "$program_prefix"nm; ac_word=$2
1793echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1794echo "configure:1795: checking for $ac_word" >&5
1795if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
1796  echo $ac_n "(cached) $ac_c" 1>&6
1797else
1798  case "$NM_FOR_TARGET" in
1799  /*)
1800  ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
1801  ;;
1802  ?:/*)                 
1803  ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
1804  ;;
1805  *)
1806  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1807  ac_dummy="$PATH"
1808  for ac_dir in $ac_dummy; do
1809    test -z "$ac_dir" && ac_dir=.
1810    if test -f $ac_dir/$ac_word; then
1811      ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
1812      break
1813    fi
1814  done
1815  IFS="$ac_save_ifs"
1816  test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no"
1817  ;;
1818esac
1819fi
1820NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
1821if test -n "$NM_FOR_TARGET"; then
1822  echo "$ac_t""$NM_FOR_TARGET" 1>&6
1823else
1824  echo "$ac_t""no" 1>&6
1825fi
1826
1827fi
1828
1829
1830 
1831echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
1832echo "configure:1833: checking target's ranlib" >&5
1833if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
1834  echo $ac_n "(cached) $ac_c" 1>&6
1835else
1836  :
1837fi
1838
1839echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
1840
1841if test -n "$ac_cv_path_RANLIB_FOR_TARGET"; then
1842    RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
1843else
1844    if test -z "$RANLIB_FOR_TARGET" ; then
1845    if test "$rtems_cv_prog_gcc" = "yes"; then
1846      # We are using gcc, ask it about its tool
1847      # NOTE: Necessary if gcc was configured to use the target's
1848      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1849       case $host_os in
1850  *cygwin*)
1851            RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib | sed -e 's%\\\\%/%g' `
1852    ;;
1853  *)
1854    RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
1855    ;;
1856  esac
1857
1858    fi
1859  else
1860    # The user set an environment variable.
1861    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1862    # will override the environment variable, which isn't what the user
1863    # intends
1864    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1865echo "configure:1866: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
1866    case "$RANLIB_FOR_TARGET" in
1867    /*) # valid
1868      echo "$ac_t"""yes"" 1>&6
1869    ;;
1870    *)  # invalid for AC_PATH_PROG
1871      echo "$ac_t"""no"" 1>&6
1872      { echo "configure: error: ***
1873        Environment variable RANLIB_FOR_TARGET should either
1874        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1875    ;;
1876    esac
1877  fi
1878
1879  # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
1880set dummy "$program_prefix"ranlib; ac_word=$2
1881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1882echo "configure:1883: checking for $ac_word" >&5
1883if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
1884  echo $ac_n "(cached) $ac_c" 1>&6
1885else
1886  case "$RANLIB_FOR_TARGET" in
1887  /*)
1888  ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
1889  ;;
1890  ?:/*)                 
1891  ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
1892  ;;
1893  *)
1894  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1895  ac_dummy="$PATH"
1896  for ac_dir in $ac_dummy; do
1897    test -z "$ac_dir" && ac_dir=.
1898    if test -f $ac_dir/$ac_word; then
1899      ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
1900      break
1901    fi
1902  done
1903  IFS="$ac_save_ifs"
1904  test -z "$ac_cv_path_RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET="no"
1905  ;;
1906esac
1907fi
1908RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
1909if test -n "$RANLIB_FOR_TARGET"; then
1910  echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
1911else
1912  echo "$ac_t""no" 1>&6
1913fi
1914
1915fi
1916
1917  if test "$RANLIB_FOR_TARGET" = "no"; then
1918    # ranlib wasn't found; check if ar -s is available
1919   
1920echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
1921echo "configure:1922: checking whether $AR_FOR_TARGET -s works" >&5
1922if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
1923  echo $ac_n "(cached) $ac_c" 1>&6
1924else
1925 
1926cat > conftest.$ac_ext <<EOF
1927int foo( int b )
1928{ return b; }
1929EOF
1930if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
1931  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
1932  && test -s conftest.a ; \
1933then
1934  rtems_cv_AR_FOR_TARGET_S="yes"
1935else
1936  rtems_cv_AR_FOR_TARGET_S="no"
1937fi
1938  rm -f conftest*
1939
1940fi
1941
1942echo "$ac_t""$rtems_cv_AR_FOR_TARGET_S" 1>&6
1943
1944    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
1945            ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
1946      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
1947    else
1948      { echo "configure: error: ***
1949        Can't figure out how to build a library index
1950        Neither ranlib nor ar -s seem to be available " 1>&2; exit 1; }
1951    fi
1952  fi
1953
1954 
1955echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
1956echo "configure:1957: checking target's objcopy" >&5
1957if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
1958  echo $ac_n "(cached) $ac_c" 1>&6
1959else
1960  :
1961fi
1962
1963echo "$ac_t""$ac_cv_path_OBJCOPY_FOR_TARGET" 1>&6
1964
1965if test -n "$ac_cv_path_OBJCOPY_FOR_TARGET"; then
1966    OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
1967else
1968    if test -z "$OBJCOPY_FOR_TARGET" ; then
1969    if test "$rtems_cv_prog_gcc" = "yes"; then
1970      # We are using gcc, ask it about its tool
1971      # NOTE: Necessary if gcc was configured to use the target's
1972      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1973       case $host_os in
1974  *cygwin*)
1975            OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy | sed -e 's%\\\\%/%g' `
1976    ;;
1977  *)
1978    OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy`
1979    ;;
1980  esac
1981
1982    fi
1983  else
1984    # The user set an environment variable.
1985    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1986    # will override the environment variable, which isn't what the user
1987    # intends
1988    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1989echo "configure:1990: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
1990    case "$OBJCOPY_FOR_TARGET" in
1991    /*) # valid
1992      echo "$ac_t"""yes"" 1>&6
1993    ;;
1994    *)  # invalid for AC_PATH_PROG
1995      echo "$ac_t"""no"" 1>&6
1996      { echo "configure: error: ***
1997        Environment variable OBJCOPY_FOR_TARGET should either
1998        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1999    ;;
2000    esac
2001  fi
2002
2003  # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
2004set dummy "$program_prefix"objcopy; ac_word=$2
2005echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2006echo "configure:2007: checking for $ac_word" >&5
2007if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
2008  echo $ac_n "(cached) $ac_c" 1>&6
2009else
2010  case "$OBJCOPY_FOR_TARGET" in
2011  /*)
2012  ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path.
2013  ;;
2014  ?:/*)                 
2015  ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a dos path.
2016  ;;
2017  *)
2018  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2019  ac_dummy="$PATH"
2020  for ac_dir in $ac_dummy; do
2021    test -z "$ac_dir" && ac_dir=.
2022    if test -f $ac_dir/$ac_word; then
2023      ac_cv_path_OBJCOPY_FOR_TARGET="$ac_dir/$ac_word"
2024      break
2025    fi
2026  done
2027  IFS="$ac_save_ifs"
2028  test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET="no"
2029  ;;
2030esac
2031fi
2032OBJCOPY_FOR_TARGET="$ac_cv_path_OBJCOPY_FOR_TARGET"
2033if test -n "$OBJCOPY_FOR_TARGET"; then
2034  echo "$ac_t""$OBJCOPY_FOR_TARGET" 1>&6
2035else
2036  echo "$ac_t""no" 1>&6
2037fi
2038
2039fi
2040
2041 
2042echo $ac_n "checking target's size""... $ac_c" 1>&6
2043echo "configure:2044: checking target's size" >&5
2044if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
2045  echo $ac_n "(cached) $ac_c" 1>&6
2046else
2047  :
2048fi
2049
2050echo "$ac_t""$ac_cv_path_SIZE_FOR_TARGET" 1>&6
2051
2052if test -n "$ac_cv_path_SIZE_FOR_TARGET"; then
2053    SIZE_FOR_TARGET=$ac_cv_path_SIZE_FOR_TARGET
2054else
2055    if test -z "$SIZE_FOR_TARGET" ; then
2056    if test "$rtems_cv_prog_gcc" = "yes"; then
2057      # We are using gcc, ask it about its tool
2058      # NOTE: Necessary if gcc was configured to use the target's
2059      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2060       case $host_os in
2061  *cygwin*)
2062            SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size | sed -e 's%\\\\%/%g' `
2063    ;;
2064  *)
2065    SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size`
2066    ;;
2067  esac
2068
2069    fi
2070  else
2071    # The user set an environment variable.
2072    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2073    # will override the environment variable, which isn't what the user
2074    # intends
2075    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
2076echo "configure:2077: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
2077    case "$SIZE_FOR_TARGET" in
2078    /*) # valid
2079      echo "$ac_t"""yes"" 1>&6
2080    ;;
2081    *)  # invalid for AC_PATH_PROG
2082      echo "$ac_t"""no"" 1>&6
2083      { echo "configure: error: ***
2084        Environment variable SIZE_FOR_TARGET should either
2085        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2086    ;;
2087    esac
2088  fi
2089
2090  # Extract the first word of ""$program_prefix"size", so it can be a program name with args.
2091set dummy "$program_prefix"size; ac_word=$2
2092echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2093echo "configure:2094: checking for $ac_word" >&5
2094if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
2095  echo $ac_n "(cached) $ac_c" 1>&6
2096else
2097  case "$SIZE_FOR_TARGET" in
2098  /*)
2099  ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a path.
2100  ;;
2101  ?:/*)                 
2102  ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a dos path.
2103  ;;
2104  *)
2105  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2106  ac_dummy="$PATH"
2107  for ac_dir in $ac_dummy; do
2108    test -z "$ac_dir" && ac_dir=.
2109    if test -f $ac_dir/$ac_word; then
2110      ac_cv_path_SIZE_FOR_TARGET="$ac_dir/$ac_word"
2111      break
2112    fi
2113  done
2114  IFS="$ac_save_ifs"
2115  test -z "$ac_cv_path_SIZE_FOR_TARGET" && ac_cv_path_SIZE_FOR_TARGET="no"
2116  ;;
2117esac
2118fi
2119SIZE_FOR_TARGET="$ac_cv_path_SIZE_FOR_TARGET"
2120if test -n "$SIZE_FOR_TARGET"; then
2121  echo "$ac_t""$SIZE_FOR_TARGET" 1>&6
2122else
2123  echo "$ac_t""no" 1>&6
2124fi
2125
2126fi
2127
2128 
2129echo $ac_n "checking target's strip""... $ac_c" 1>&6
2130echo "configure:2131: checking target's strip" >&5
2131if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
2132  echo $ac_n "(cached) $ac_c" 1>&6
2133else
2134  :
2135fi
2136
2137echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
2138
2139if test -n "$ac_cv_path_STRIP_FOR_TARGET"; then
2140    STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
2141else
2142    if test -z "$STRIP_FOR_TARGET" ; then
2143    if test "$rtems_cv_prog_gcc" = "yes"; then
2144      # We are using gcc, ask it about its tool
2145      # NOTE: Necessary if gcc was configured to use the target's
2146      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2147       case $host_os in
2148  *cygwin*)
2149            STRIP_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=strip | sed -e 's%\\\\%/%g' `
2150    ;;
2151  *)
2152    STRIP_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=strip`
2153    ;;
2154  esac
2155
2156    fi
2157  else
2158    # The user set an environment variable.
2159    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2160    # will override the environment variable, which isn't what the user
2161    # intends
2162    echo $ac_n "checking whether environment variable STRIP_FOR_TARGET is an absolute path""... $ac_c" 1>&6
2163echo "configure:2164: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
2164    case "$STRIP_FOR_TARGET" in
2165    /*) # valid
2166      echo "$ac_t"""yes"" 1>&6
2167    ;;
2168    *)  # invalid for AC_PATH_PROG
2169      echo "$ac_t"""no"" 1>&6
2170      { echo "configure: error: ***
2171        Environment variable STRIP_FOR_TARGET should either
2172        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2173    ;;
2174    esac
2175  fi
2176
2177  # Extract the first word of ""$program_prefix"strip", so it can be a program name with args.
2178set dummy "$program_prefix"strip; ac_word=$2
2179echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2180echo "configure:2181: checking for $ac_word" >&5
2181if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
2182  echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184  case "$STRIP_FOR_TARGET" in
2185  /*)
2186  ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
2187  ;;
2188  ?:/*)                 
2189  ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
2190  ;;
2191  *)
2192  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2193  ac_dummy="$PATH"
2194  for ac_dir in $ac_dummy; do
2195    test -z "$ac_dir" && ac_dir=.
2196    if test -f $ac_dir/$ac_word; then
2197      ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
2198      break
2199    fi
2200  done
2201  IFS="$ac_save_ifs"
2202  test -z "$ac_cv_path_STRIP_FOR_TARGET" && ac_cv_path_STRIP_FOR_TARGET="no"
2203  ;;
2204esac
2205fi
2206STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
2207if test -n "$STRIP_FOR_TARGET"; then
2208  echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
2209else
2210  echo "$ac_t""no" 1>&6
2211fi
2212
2213fi
2214
2215
2216
2217 if test "${target_cpu}" = "i386"; then
2218    echo $ac_n "checking for 16 bit mode assembler support""... $ac_c" 1>&6
2219echo "configure:2220: checking for 16 bit mode assembler support" >&5
2220if eval "test \"`echo '$''{'rtems_cv_prog_gas_code16'+set}'`\" = set"; then
2221  echo $ac_n "(cached) $ac_c" 1>&6
2222else
2223  cat > conftest.s << EOF
2224         .code16
2225         data32
2226         addr32
2227         lgdt 0
2228EOF
2229      if { ac_try='$AS_FOR_TARGET -o conftest.o conftest.s'; { (eval echo configure:2230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2230        rtems_cv_prog_gas_code16=yes
2231      else
2232        rtems_cv_prog_gas_code16=no
2233      fi
2234fi
2235
2236echo "$ac_t""$rtems_cv_prog_gas_code16" 1>&6
2237    RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
2238  fi
2239 
2240
2241
2242# Extract the first word of "gcc", so it can be a program name with args.
2243set dummy gcc; ac_word=$2
2244echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2245echo "configure:2246: checking for $ac_word" >&5
2246if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2247  echo $ac_n "(cached) $ac_c" 1>&6
2248else
2249  if test -n "$CC"; then
2250  ac_cv_prog_CC="$CC" # Let the user override the test.
2251else
2252  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2253  ac_dummy="$PATH"
2254  for ac_dir in $ac_dummy; do
2255    test -z "$ac_dir" && ac_dir=.
2256    if test -f $ac_dir/$ac_word; then
2257      ac_cv_prog_CC="gcc"
2258      break
2259    fi
2260  done
2261  IFS="$ac_save_ifs"
2262fi
2263fi
2264CC="$ac_cv_prog_CC"
2265if test -n "$CC"; then
2266  echo "$ac_t""$CC" 1>&6
2267else
2268  echo "$ac_t""no" 1>&6
2269fi
2270
2271if test -z "$CC"; then
2272  # Extract the first word of "cc", so it can be a program name with args.
2273set dummy cc; ac_word=$2
2274echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2275echo "configure:2276: checking for $ac_word" >&5
2276if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2277  echo $ac_n "(cached) $ac_c" 1>&6
2278else
2279  if test -n "$CC"; then
2280  ac_cv_prog_CC="$CC" # Let the user override the test.
2281else
2282  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2283  ac_prog_rejected=no
2284  ac_dummy="$PATH"
2285  for ac_dir in $ac_dummy; do
2286    test -z "$ac_dir" && ac_dir=.
2287    if test -f $ac_dir/$ac_word; then
2288      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2289        ac_prog_rejected=yes
2290        continue
2291      fi
2292      ac_cv_prog_CC="cc"
2293      break
2294    fi
2295  done
2296  IFS="$ac_save_ifs"
2297if test $ac_prog_rejected = yes; then
2298  # We found a bogon in the path, so make sure we never use it.
2299  set dummy $ac_cv_prog_CC
2300  shift
2301  if test $# -gt 0; then
2302    # We chose a different compiler from the bogus one.
2303    # However, it has the same basename, so the bogon will be chosen
2304    # first if we set CC to just the basename; use the full file name.
2305    shift
2306    set dummy "$ac_dir/$ac_word" "$@"
2307    shift
2308    ac_cv_prog_CC="$@"
2309  fi
2310fi
2311fi
2312fi
2313CC="$ac_cv_prog_CC"
2314if test -n "$CC"; then
2315  echo "$ac_t""$CC" 1>&6
2316else
2317  echo "$ac_t""no" 1>&6
2318fi
2319
2320  if test -z "$CC"; then
2321    case "`uname -s`" in
2322    *win32* | *WIN32*)
2323      # Extract the first word of "cl", so it can be a program name with args.
2324set dummy cl; ac_word=$2
2325echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2326echo "configure:2327: checking for $ac_word" >&5
2327if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2328  echo $ac_n "(cached) $ac_c" 1>&6
2329else
2330  if test -n "$CC"; then
2331  ac_cv_prog_CC="$CC" # Let the user override the test.
2332else
2333  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2334  ac_dummy="$PATH"
2335  for ac_dir in $ac_dummy; do
2336    test -z "$ac_dir" && ac_dir=.
2337    if test -f $ac_dir/$ac_word; then
2338      ac_cv_prog_CC="cl"
2339      break
2340    fi
2341  done
2342  IFS="$ac_save_ifs"
2343fi
2344fi
2345CC="$ac_cv_prog_CC"
2346if test -n "$CC"; then
2347  echo "$ac_t""$CC" 1>&6
2348else
2349  echo "$ac_t""no" 1>&6
2350fi
2351 ;;
2352    esac
2353  fi
2354  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2355fi
2356
2357echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2358echo "configure:2359: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2359
2360ac_ext=c
2361# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2362ac_cpp='$CPP $CPPFLAGS'
2363ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2364ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2365cross_compiling=$ac_cv_prog_cc_cross
2366
2367cat > conftest.$ac_ext << EOF
2368
2369#line 2370 "configure"
2370#include "confdefs.h"
2371
2372main(){return(0);}
2373EOF
2374if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2375  ac_cv_prog_cc_works=yes
2376  # If we can't run a trivial program, we are probably using a cross compiler.
2377  if (./conftest; exit) 2>/dev/null; then
2378    ac_cv_prog_cc_cross=no
2379  else
2380    ac_cv_prog_cc_cross=yes
2381  fi
2382else
2383  echo "configure: failed program was:" >&5
2384  cat conftest.$ac_ext >&5
2385  ac_cv_prog_cc_works=no
2386fi
2387rm -fr conftest*
2388ac_ext=c
2389# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2390ac_cpp='$CPP $CPPFLAGS'
2391ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2392ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2393cross_compiling=$ac_cv_prog_cc_cross
2394
2395echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2396if test $ac_cv_prog_cc_works = no; then
2397  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2398fi
2399echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2400echo "configure:2401: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2401echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2402cross_compiling=$ac_cv_prog_cc_cross
2403
2404echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2405echo "configure:2406: checking whether we are using GNU C" >&5
2406if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2407  echo $ac_n "(cached) $ac_c" 1>&6
2408else
2409  cat > conftest.c <<EOF
2410#ifdef __GNUC__
2411  yes;
2412#endif
2413EOF
2414if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2415  ac_cv_prog_gcc=yes
2416else
2417  ac_cv_prog_gcc=no
2418fi
2419fi
2420
2421echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2422
2423if test $ac_cv_prog_gcc = yes; then
2424  GCC=yes
2425else
2426  GCC=
2427fi
2428
2429ac_test_CFLAGS="${CFLAGS+set}"
2430ac_save_CFLAGS="$CFLAGS"
2431CFLAGS=
2432echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2433echo "configure:2434: checking whether ${CC-cc} accepts -g" >&5
2434if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2435  echo $ac_n "(cached) $ac_c" 1>&6
2436else
2437  echo 'void f(){}' > conftest.c
2438if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2439  ac_cv_prog_cc_g=yes
2440else
2441  ac_cv_prog_cc_g=no
2442fi
2443rm -f conftest*
2444
2445fi
2446
2447echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2448if test "$ac_test_CFLAGS" = set; then
2449  CFLAGS="$ac_save_CFLAGS"
2450elif test $ac_cv_prog_cc_g = yes; then
2451  if test "$GCC" = yes; then
2452    CFLAGS="-g -O2"
2453  else
2454    CFLAGS="-g"
2455  fi
2456else
2457  if test "$GCC" = yes; then
2458    CFLAGS="-O2"
2459  else
2460    CFLAGS=
2461  fi
2462fi
2463
2464
2465if test "$RTEMS_CPU" = "unix" ; then
2466   
2467
2468echo $ac_n "checking whether $RTEMS_HOST supports System V semaphores""... $ac_c" 1>&6
2469echo "configure:2470: checking whether $RTEMS_HOST supports System V semaphores" >&5
2470if eval "test \"`echo '$''{'rtems_cv_sysv_sem'+set}'`\" = set"; then
2471  echo $ac_n "(cached) $ac_c" 1>&6
2472else
2473 
2474if test "$cross_compiling" = yes; then
2475  :
2476else
2477  cat > conftest.$ac_ext <<EOF
2478#line 2479 "configure"
2479#include "confdefs.h"
2480
2481#include <sys/types.h>
2482#include <sys/ipc.h>
2483#include <sys/sem.h>
2484int main () {
2485#if !defined(sun)
2486  union semun arg ;
2487#else
2488  union semun {
2489    int val;
2490    struct semid_ds *buf;
2491    ushort *array;
2492  } arg;
2493#endif
2494  int id=semget(IPC_PRIVATE,1,IPC_CREAT|0400);
2495  if (id == -1)
2496    exit(1);
2497  arg.val = 0; /* avoid implicit type cast to union */
2498  if (semctl(id, 0, IPC_RMID, arg) == -1)
2499    exit(1);
2500  exit(0);
2501}
2502
2503EOF
2504if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2505then
2506  rtems_cv_sysv_sem="yes"
2507else
2508  echo "configure: failed program was:" >&5
2509  cat conftest.$ac_ext >&5
2510  rm -fr conftest*
2511  rtems_cv_sysv_sem="no"
2512fi
2513rm -fr conftest*
2514fi
2515
2516
2517fi
2518
2519echo "$ac_t""$rtems_cv_sysv_sem" 1>&6
2520
2521  if test "$rtems_cv_sysv_sem" != "yes" ; then
2522    { echo "configure: error: System V semaphores don't work, required by simulator" 1>&2; exit 1; }
2523  fi
2524   
2525
2526echo $ac_n "checking whether $RTEMS_HOST supports System V shared memory""... $ac_c" 1>&6
2527echo "configure:2528: checking whether $RTEMS_HOST supports System V shared memory" >&5
2528if eval "test \"`echo '$''{'rtems_cv_sysv_shm'+set}'`\" = set"; then
2529  echo $ac_n "(cached) $ac_c" 1>&6
2530else
2531 
2532if test "$cross_compiling" = yes; then
2533  :
2534else
2535  cat > conftest.$ac_ext <<EOF
2536#line 2537 "configure"
2537#include "confdefs.h"
2538
2539#include <sys/types.h>
2540#include <sys/ipc.h>
2541#include <sys/shm.h>
2542int main () {
2543  int id=shmget(IPC_PRIVATE,1,IPC_CREAT|0400);
2544  if (id == -1)
2545    exit(1);
2546  if (shmctl(id, IPC_RMID, 0) == -1)
2547    exit(1);
2548  exit(0);
2549}
2550
2551EOF
2552if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2553then
2554  rtems_cv_sysv_shm="yes"
2555else
2556  echo "configure: failed program was:" >&5
2557  cat conftest.$ac_ext >&5
2558  rm -fr conftest*
2559  rtems_cv_sysv_shm="no"
2560fi
2561rm -fr conftest*
2562fi
2563
2564
2565fi
2566
2567echo "$ac_t""$rtems_cv_sysv_shm" 1>&6
2568
2569  if test "$rtems_cv_sysv_shm" != "yes" ; then
2570    { echo "configure: error: System V shared memory doesn't work, required by simulator" 1>&2; exit 1; }
2571  fi
2572   
2573
2574echo $ac_n "checking whether $RTEMS_HOST supports System V messages""... $ac_c" 1>&6
2575echo "configure:2576: checking whether $RTEMS_HOST supports System V messages" >&5
2576if eval "test \"`echo '$''{'rtems_cv_sysv_msg'+set}'`\" = set"; then
2577  echo $ac_n "(cached) $ac_c" 1>&6
2578else
2579 
2580if test "$cross_compiling" = yes; then
2581  :
2582else
2583  cat > conftest.$ac_ext <<EOF
2584#line 2585 "configure"
2585#include "confdefs.h"
2586
2587#include <sys/types.h>
2588#include <sys/ipc.h>
2589#include <sys/msg.h>
2590int main () {
2591  int id=msgget(IPC_PRIVATE,IPC_CREAT|0400);
2592  if (id == -1)
2593    exit(1);
2594  if (msgctl(id, IPC_RMID, 0) == -1)
2595    exit(1);
2596  exit(0);
2597}
2598
2599EOF
2600if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2601then
2602  rtems_cv_sysv_msg="yes"
2603else
2604  echo "configure: failed program was:" >&5
2605  cat conftest.$ac_ext >&5
2606  rm -fr conftest*
2607  rtems_cv_sysv_msg="no"
2608fi
2609rm -fr conftest*
2610fi
2611
2612
2613fi
2614
2615echo "$ac_t""$rtems_cv_sysv_msg" 1>&6
2616
2617  if test "$rtems_cv_sysv_msg" != "yes" ; then
2618    { echo "configure: error: System V messages don't work, required by simulator" 1>&2; exit 1; }
2619  fi
2620fi
2621
2622
2623echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
2624echo "configure:2625: checking for make/custom/$RTEMS_BSP.cfg" >&5
2625if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
2626  echo "$ac_t""yes" 1>&6
2627else
2628  { echo "configure: error: no" 1>&2; exit 1; }
2629fi
2630
2631echo $ac_n "checking whether BSP supports multiprocessing""... $ac_c" 1>&6
2632echo "configure:2633: checking whether BSP supports multiprocessing" >&5
2633if eval "test \"`echo '$''{'rtems_cv_HAS_MP'+set}'`\" = set"; then
2634  echo $ac_n "(cached) $ac_c" 1>&6
2635else
2636      if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP}/shmsupp"; then
2637      if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
2638        rtems_cv_HAS_MP="yes" ;
2639      else
2640        rtems_cv_HAS_MP="disabled";
2641      fi
2642    else
2643      rtems_cv_HAS_MP="no";
2644    fi
2645 
2646fi
2647
2648echo "$ac_t""$rtems_cv_HAS_MP" 1>&6
2649if test "$rtems_cv_HAS_MP" = "yes"; then
2650HAS_MP="yes"
2651else
2652HAS_MP="no"
2653fi
2654
2655
2656
2657# always build the test tools
2658testtools_cfgdirs="tools/generic"
2659
2660if test "$HAS_MP" = "yes"; then
2661    makefiles="$makefiles samples/base_mp/Makefile"
2662    makefiles="$makefiles samples/base_mp/node1/Makefile"
2663    makefiles="$makefiles samples/base_mp/node2/Makefile"
2664    makefiles="$makefiles samples/base_sp/Makefile"
2665fi
2666
2667if test "$tests_enabled" = "yes"; then
2668 
2669echo $ac_n "checking for Makefile.in in libtests""... $ac_c" 1>&6
2670echo "configure:2671: checking for Makefile.in in libtests" >&5
2671if test -d $srcdir/libtests; then
2672  rtems_av_save_dir=`pwd`;
2673  cd $srcdir;
2674  rtems_av_tmp=`find libtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2675  makefiles="$makefiles $rtems_av_tmp";
2676  cd $rtems_av_save_dir;
2677  echo "$ac_t""done" 1>&6
2678else
2679  echo "$ac_t""no" 1>&6
2680fi
2681
2682
2683 
2684echo $ac_n "checking for Makefile.in in sptests""... $ac_c" 1>&6
2685echo "configure:2686: checking for Makefile.in in sptests" >&5
2686if test -d $srcdir/sptests; then
2687  rtems_av_save_dir=`pwd`;
2688  cd $srcdir;
2689  rtems_av_tmp=`find sptests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2690  makefiles="$makefiles $rtems_av_tmp";
2691  cd $rtems_av_save_dir;
2692  echo "$ac_t""done" 1>&6
2693else
2694  echo "$ac_t""no" 1>&6
2695fi
2696
2697
2698 
2699echo $ac_n "checking for Makefile.in in tmtests""... $ac_c" 1>&6
2700echo "configure:2701: checking for Makefile.in in tmtests" >&5
2701if test -d $srcdir/tmtests; then
2702  rtems_av_save_dir=`pwd`;
2703  cd $srcdir;
2704  rtems_av_tmp=`find tmtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2705  makefiles="$makefiles $rtems_av_tmp";
2706  cd $rtems_av_save_dir;
2707  echo "$ac_t""done" 1>&6
2708else
2709  echo "$ac_t""no" 1>&6
2710fi
2711
2712
2713  if test "$HAS_MP" = "yes"; then
2714   
2715echo $ac_n "checking for Makefile.in in mptests""... $ac_c" 1>&6
2716echo "configure:2717: checking for Makefile.in in mptests" >&5
2717if test -d $srcdir/mptests; then
2718  rtems_av_save_dir=`pwd`;
2719  cd $srcdir;
2720  rtems_av_tmp=`find mptests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2721  makefiles="$makefiles $rtems_av_tmp";
2722  cd $rtems_av_save_dir;
2723  echo "$ac_t""done" 1>&6
2724else
2725  echo "$ac_t""no" 1>&6
2726fi
2727
2728
2729  fi
2730  if test "$RTEMS_HAS_POSIX_API" = "yes"; then
2731   
2732echo $ac_n "checking for Makefile.in in psxtests""... $ac_c" 1>&6
2733echo "configure:2734: checking for Makefile.in in psxtests" >&5
2734if test -d $srcdir/psxtests; then
2735  rtems_av_save_dir=`pwd`;
2736  cd $srcdir;
2737  rtems_av_tmp=`find psxtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
2738  makefiles="$makefiles $rtems_av_tmp";
2739  cd $rtems_av_save_dir;
2740  echo "$ac_t""done" 1>&6
2741else
2742  echo "$ac_t""no" 1>&6
2743fi
2744
2745
2746  fi
2747   if test -d "$srcdir/tools/$RTEMS_CPU"; then
2748     testtools_cfgdirs="$testtools_cfgdirs tools/$RTEMS_CPU"
2749   fi
2750fi
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763subdirs="$testtools_cfgdirs"
2764
2765
2766# Try to explicitly list a Makefile here
2767trap '' 1 2 15
2768cat > confcache <<\EOF
2769# This file is a shell script that caches the results of configure
2770# tests run on this system so they can be shared between configure
2771# scripts and configure runs.  It is not useful on other systems.
2772# If it contains results you don't want to keep, you may remove or edit it.
2773#
2774# By default, configure uses ./config.cache as the cache file,
2775# creating it if it does not exist already.  You can give configure
2776# the --cache-file=FILE option to use a different cache file; that is
2777# what configure does when it calls configure scripts in
2778# subdirectories, so they share the cache.
2779# Giving --cache-file=/dev/null disables caching, for debugging configure.
2780# config.status only pays attention to the cache file if you give it the
2781# --recheck option to rerun configure.
2782#
2783EOF
2784# The following way of writing the cache mishandles newlines in values,
2785# but we know of no workaround that is simple, portable, and efficient.
2786# So, don't put newlines in cache variables' values.
2787# Ultrix sh set writes to stderr and can't be redirected directly,
2788# and sets the high bit in the cache file unless we assign to the vars.
2789(set) 2>&1 |
2790  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2791  *ac_space=\ *)
2792    # `set' does not quote correctly, so add quotes (double-quote substitution
2793    # turns \\\\ into \\, and sed turns \\ into \).
2794    sed -n \
2795      -e "s/'/'\\\\''/g" \
2796      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2797    ;;
2798  *)
2799    # `set' quotes correctly as required by POSIX, so do not add quotes.
2800    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2801    ;;
2802  esac >> confcache
2803if cmp -s $cache_file confcache; then
2804  :
2805else
2806  if test -w $cache_file; then
2807    echo "updating cache $cache_file"
2808    cat confcache > $cache_file
2809  else
2810    echo "not updating unwritable cache $cache_file"
2811  fi
2812fi
2813rm -f confcache
2814
2815trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2816
2817test "x$prefix" = xNONE && prefix=$ac_default_prefix
2818# Let make expand exec_prefix.
2819test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2820
2821# Any assignment to VPATH causes Sun make to only execute
2822# the first set of double-colon rules, so remove it if not needed.
2823# If there is a colon in the path, we need to keep it.
2824if test "x$srcdir" = x.; then
2825  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2826fi
2827
2828trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2829
2830# Transform confdefs.h into DEFS.
2831# Protect against shell expansion while executing Makefile rules.
2832# Protect against Makefile macro expansion.
2833cat > conftest.defs <<\EOF
2834s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2835s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2836s%\[%\\&%g
2837s%\]%\\&%g
2838s%\$%$$%g
2839EOF
2840DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2841rm -f conftest.defs
2842
2843
2844# Without the "./", some shells look in PATH for config.status.
2845: ${CONFIG_STATUS=./config.status}
2846
2847echo creating $CONFIG_STATUS
2848rm -f $CONFIG_STATUS
2849cat > $CONFIG_STATUS <<EOF
2850#! /bin/sh
2851# Generated automatically by configure.
2852# Run this file to recreate the current configuration.
2853# This directory was configured as follows,
2854# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2855#
2856# $0 $ac_configure_args
2857#
2858# Compiler output produced by configure, useful for debugging
2859# configure, is in ./config.log if it exists.
2860
2861ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2862for ac_option
2863do
2864  case "\$ac_option" in
2865  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2866    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2867    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2868  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2869    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2870    exit 0 ;;
2871  -help | --help | --hel | --he | --h)
2872    echo "\$ac_cs_usage"; exit 0 ;;
2873  *) echo "\$ac_cs_usage"; exit 1 ;;
2874  esac
2875done
2876
2877ac_given_srcdir=$srcdir
2878ac_given_INSTALL="$INSTALL"
2879
2880trap 'rm -fr `echo "Makefile
2881support/Makefile
2882support/include/Makefile
2883support/stubdr/Makefile
2884support/wrapup/Makefile
2885tools/Makefile
2886samples/Makefile
2887samples/base_sp/Makefile
2888samples/cdtest/Makefile
2889samples/hello/Makefile
2890samples/minimum/Makefile
2891samples/paranoia/Makefile
2892samples/ticker/Makefile
2893samples/unlimited/Makefile
2894$makefiles" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2895EOF
2896cat >> $CONFIG_STATUS <<EOF
2897
2898# Protect against being on the right side of a sed subst in config.status.
2899sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2900 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2901$ac_vpsub
2902$extrasub
2903s%@SHELL@%$SHELL%g
2904s%@CFLAGS@%$CFLAGS%g
2905s%@CPPFLAGS@%$CPPFLAGS%g
2906s%@CXXFLAGS@%$CXXFLAGS%g
2907s%@FFLAGS@%$FFLAGS%g
2908s%@DEFS@%$DEFS%g
2909s%@LDFLAGS@%$LDFLAGS%g
2910s%@LIBS@%$LIBS%g
2911s%@exec_prefix@%$exec_prefix%g
2912s%@prefix@%$prefix%g
2913s%@program_transform_name@%$program_transform_name%g
2914s%@bindir@%$bindir%g
2915s%@sbindir@%$sbindir%g
2916s%@libexecdir@%$libexecdir%g
2917s%@datadir@%$datadir%g
2918s%@sysconfdir@%$sysconfdir%g
2919s%@sharedstatedir@%$sharedstatedir%g
2920s%@localstatedir@%$localstatedir%g
2921s%@libdir@%$libdir%g
2922s%@includedir@%$includedir%g
2923s%@oldincludedir@%$oldincludedir%g
2924s%@infodir@%$infodir%g
2925s%@mandir@%$mandir%g
2926s%@RTEMS_TOPdir@%$RTEMS_TOPdir%g
2927s%@SET_MAKE@%$SET_MAKE%g
2928s%@host@%$host%g
2929s%@host_alias@%$host_alias%g
2930s%@host_cpu@%$host_cpu%g
2931s%@host_vendor@%$host_vendor%g
2932s%@host_os@%$host_os%g
2933s%@target@%$target%g
2934s%@target_alias@%$target_alias%g
2935s%@target_cpu@%$target_cpu%g
2936s%@target_vendor@%$target_vendor%g
2937s%@target_os@%$target_os%g
2938s%@build@%$build%g
2939s%@build_alias@%$build_alias%g
2940s%@build_cpu@%$build_cpu%g
2941s%@build_vendor@%$build_vendor%g
2942s%@build_os@%$build_os%g
2943s%@RTEMS_CPU@%$RTEMS_CPU%g
2944s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
2945s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
2946s%@MAINT@%$MAINT%g
2947s%@RTEMS_HAS_MULTIPROCESSING@%$RTEMS_HAS_MULTIPROCESSING%g
2948s%@RTEMS_HAS_POSIX_API@%$RTEMS_HAS_POSIX_API%g
2949s%@RTEMS_HAS_NETWORKING@%$RTEMS_HAS_NETWORKING%g
2950s%@RTEMS_HAS_RDBG@%$RTEMS_HAS_RDBG%g
2951s%@RTEMS_USE_MACROS@%$RTEMS_USE_MACROS%g
2952s%@RTEMS_LIBC_DIR@%$RTEMS_LIBC_DIR%g
2953s%@RTEMS_BSP@%$RTEMS_BSP%g
2954s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2955s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2956s%@INSTALL_DATA@%$INSTALL_DATA%g
2957s%@RTEMS_HOST@%$RTEMS_HOST%g
2958s%@PROJECT_ROOT@%$PROJECT_ROOT%g
2959s%@RTEMS_ROOT@%$RTEMS_ROOT%g
2960s%@INSTALL_CHANGE@%$INSTALL_CHANGE%g
2961s%@PACKHEX@%$PACKHEX%g
2962s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
2963s%@GCCSED@%$GCCSED%g
2964s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
2965s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
2966s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
2967s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
2968s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
2969s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
2970s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
2971s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
2972s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
2973s%@RTEMS_GAS_CODE16@%$RTEMS_GAS_CODE16%g
2974s%@CC@%$CC%g
2975s%@HAS_MP@%$HAS_MP%g
2976s%@rtems_cv_prog_cc_cross@%$rtems_cv_prog_cc_cross%g
2977s%@RTEMS_HAS_CPLUSPLUS@%$RTEMS_HAS_CPLUSPLUS%g
2978s%@RTEMS_USE_GCC272@%$RTEMS_USE_GCC272%g
2979s%@BARE_CPU_CFLAGS@%$BARE_CPU_CFLAGS%g
2980s%@BARE_CPU_MODEL@%$BARE_CPU_MODEL%g
2981s%@program_prefix@%$program_prefix%g
2982s%@CC_CFLAGS_DEFAULT@%$CC_CFLAGS_DEFAULT%g
2983s%@CC_CFLAGS_DEBUG_V@%$CC_CFLAGS_DEBUG_V%g
2984s%@CC_CFLAGS_PROFILE_V@%$CC_CFLAGS_PROFILE_V%g
2985s%@CC_LDFLAGS_PROFILE_V@%$CC_LDFLAGS_PROFILE_V%g
2986s%@subdirs@%$subdirs%g
2987
2988CEOF
2989EOF
2990
2991cat >> $CONFIG_STATUS <<\EOF
2992
2993# Split the substitutions into bite-sized pieces for seds with
2994# small command number limits, like on Digital OSF/1 and HP-UX.
2995ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2996ac_file=1 # Number of current file.
2997ac_beg=1 # First line for current file.
2998ac_end=$ac_max_sed_cmds # Line after last line for current file.
2999ac_more_lines=:
3000ac_sed_cmds=""
3001while $ac_more_lines; do
3002  if test $ac_beg -gt 1; then
3003    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3004  else
3005    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3006  fi
3007  if test ! -s conftest.s$ac_file; then
3008    ac_more_lines=false
3009    rm -f conftest.s$ac_file
3010  else
3011    if test -z "$ac_sed_cmds"; then
3012      ac_sed_cmds="sed -f conftest.s$ac_file"
3013    else
3014      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3015    fi
3016    ac_file=`expr $ac_file + 1`
3017    ac_beg=$ac_end
3018    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3019  fi
3020done
3021if test -z "$ac_sed_cmds"; then
3022  ac_sed_cmds=cat
3023fi
3024EOF
3025
3026cat >> $CONFIG_STATUS <<EOF
3027
3028CONFIG_FILES=\${CONFIG_FILES-"Makefile
3029support/Makefile
3030support/include/Makefile
3031support/stubdr/Makefile
3032support/wrapup/Makefile
3033tools/Makefile
3034samples/Makefile
3035samples/base_sp/Makefile
3036samples/cdtest/Makefile
3037samples/hello/Makefile
3038samples/minimum/Makefile
3039samples/paranoia/Makefile
3040samples/ticker/Makefile
3041samples/unlimited/Makefile
3042$makefiles"}
3043EOF
3044cat >> $CONFIG_STATUS <<\EOF
3045for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3046  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3047  case "$ac_file" in
3048  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3049       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3050  *) ac_file_in="${ac_file}.in" ;;
3051  esac
3052
3053  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3054
3055  # Remove last slash and all that follows it.  Not all systems have dirname.
3056  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3057  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3058    # The file is in a subdirectory.
3059    test ! -d "$ac_dir" && mkdir "$ac_dir"
3060    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3061    # A "../" for each directory in $ac_dir_suffix.
3062    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3063  else
3064    ac_dir_suffix= ac_dots=
3065  fi
3066
3067  case "$ac_given_srcdir" in
3068  .)  srcdir=.
3069      if test -z "$ac_dots"; then top_srcdir=.
3070      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3071  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3072  *) # Relative path.
3073    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3074    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3075  esac
3076
3077  case "$ac_given_INSTALL" in
3078  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3079  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3080  esac
3081
3082  echo creating "$ac_file"
3083  rm -f "$ac_file"
3084  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3085  case "$ac_file" in
3086  *Makefile*) ac_comsub="1i\\
3087# $configure_input" ;;
3088  *) ac_comsub= ;;
3089  esac
3090
3091  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3092  sed -e "$ac_comsub
3093s%@configure_input@%$configure_input%g
3094s%@srcdir@%$srcdir%g
3095s%@top_srcdir@%$top_srcdir%g
3096s%@INSTALL@%$INSTALL%g
3097" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3098fi; done
3099rm -f conftest.s*
3100
3101EOF
3102cat >> $CONFIG_STATUS <<EOF
3103
3104EOF
3105cat >> $CONFIG_STATUS <<\EOF
3106
3107exit 0
3108EOF
3109chmod +x $CONFIG_STATUS
3110rm -fr confdefs* $ac_clean_files
3111test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3112
3113if test "$no_recursion" != yes; then
3114
3115  # Remove --cache-file and --srcdir arguments so they do not pile up.
3116  ac_sub_configure_args=
3117  ac_prev=
3118  for ac_arg in $ac_configure_args; do
3119    if test -n "$ac_prev"; then
3120      ac_prev=
3121      continue
3122    fi
3123    case "$ac_arg" in
3124    -cache-file | --cache-file | --cache-fil | --cache-fi \
3125    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3126      ac_prev=cache_file ;;
3127    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3128    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3129      ;;
3130    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3131      ac_prev=srcdir ;;
3132    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3133      ;;
3134    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3135    esac
3136  done
3137
3138  for ac_config_dir in $testtools_cfgdirs; do
3139
3140    # Do not complain, so a configure script can configure whichever
3141    # parts of a large source tree are present.
3142    if test ! -d $srcdir/$ac_config_dir; then
3143      continue
3144    fi
3145
3146    echo configuring in $ac_config_dir
3147
3148    case "$srcdir" in
3149    .) ;;
3150    *)
3151      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3152      else
3153        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3154      fi
3155      ;;
3156    esac
3157
3158    ac_popdir=`pwd`
3159    cd $ac_config_dir
3160
3161      # A "../" for each directory in /$ac_config_dir.
3162      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3163
3164    case "$srcdir" in
3165    .) # No --srcdir option.  We are building in place.
3166      ac_sub_srcdir=$srcdir ;;
3167    /*) # Absolute path.
3168      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3169    *) # Relative path.
3170      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3171    esac
3172
3173    # Check for guested configure; otherwise get Cygnus style configure.
3174    if test -f $ac_sub_srcdir/configure; then
3175      ac_sub_configure=$ac_sub_srcdir/configure
3176    elif test -f $ac_sub_srcdir/configure.in; then
3177      ac_sub_configure=$ac_configure
3178    else
3179      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3180      ac_sub_configure=
3181    fi
3182
3183    # The recursion is here.
3184    if test -n "$ac_sub_configure"; then
3185
3186      # Make the cache file name correct relative to the subdirectory.
3187      case "$cache_file" in
3188      /*) ac_sub_cache_file=$cache_file ;;
3189      *) # Relative path.
3190        ac_sub_cache_file="$ac_dots$cache_file" ;;
3191      esac
3192  case "$ac_given_INSTALL" in
3193        [/$]*) INSTALL="$ac_given_INSTALL" ;;
3194        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3195        esac
3196
3197      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3198      # The eval makes quoting arguments work.
3199      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3200      then :
3201      else
3202        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3203      fi
3204    fi
3205
3206    cd $ac_popdir
3207  done
3208fi
3209
Note: See TracBrowser for help on using the repository browser.