source: rtems/configure @ 11cfb6f7

4.104.114.84.95
Last change on this file since 11cfb6f7 was 11cfb6f7, checked in by Joel Sherrill <joel.sherrill@…>, on 10/14/98 at 20:19:30

Patch from Ralf Corsepius <corsepiu@…>:

  1. Rtems contains some perl scripts that use hard-coded paths to /usr/bin/perl or /usr/local/bin/perl I have already fixed these problems by adding some checks to configure.in. While doing this, I also cleaned up some more autoconf related problems for generating shell scripts. This patch might seem a bit scary to you, but I am quite confident it won't break something (I've been testing it for almost a week now, however it might introduce typos for a limited number configurations I don't have access to - But it shouldn't be a problem for you to test them :-).

I expect to get this finished tonight, hence you will very likely
have the patch when you get up tomorrow.

Changes:

  • Check for PERL and disable all PERL scripts if perl wasn't found.
  • Generate all KSHELL-scripts with autoconf instead of make-script
  • Automatic dependency handling for autoconf generated KSHELL or PERL scripts (make/rtems.cfg)

Notes:

  • this patch contains new files and deletes some other files.
  • The patch is relative to rtems-4.0.0-beta4 with my previous rtems-rc-981014-1.diff patch applied.

Testing:

I tested it with sh-rtems and posix under linux. Now all targets
which are touched by this patch and which are not used while building
for sh-rtems and posix still need to be tested. AFAIS, only the
sparc/erc32 BSP should be affected by this criterion. And if you
like to, you should also consider testing it on a Cygwin32 and a
Solaris host for one arbitrary BSP.

  • Property mode set to 100644
File size: 118.5 KB
RevLine 
[254b4450]1#! /bin/sh
2
[2c3840b]3
4
5
6
7# Check to see if we're running under Cygwin32, without using
8# AC_CANONICAL_*.  If so, set output variable CYGWIN32 to "yes".
9# Otherwise set it to "no".
10
11
12
13
14
15# Check to see if we're running under Win32, without using
16# AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
17# Otherwise set it to "".
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[254b4450]37# Guess values for system-dependent variables and create Makefiles.
38# Generated automatically using autoconf version 2.12
39# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
40#
41# This configure script is free software; the Free Software Foundation
42# gives unlimited permission to copy, distribute and modify it.
43
44# Defaults:
45ac_help=
46ac_default_prefix=/usr/local
47# Any additions from configure.in:
48ac_help="$ac_help
49  --with-cross-host=HOST      host (cygnus)"
50ac_help="$ac_help
[91333c2]51\
52  --enable-gmake-print-directory    enable GNU Make's print directory"
53ac_help="$ac_help
[254b4450]54\
[ba1a2af9]55  --enable-posix                    enable posix interface"
[254b4450]56ac_help="$ac_help
[0280cb6]57\
58  --enable-networking                enable TCP/IP stack"
59ac_help="$ac_help
[254b4450]60\
[ba1a2af9]61  --enable-rtems-inlines            enable RTEMS inline functions (use macros)"
[254b4450]62ac_help="$ac_help
[91333c2]63\
[3771cc6e]64  --enable-cxx            enable C++ support, and build the rtems++ library"
[91333c2]65ac_help="$ac_help
[e412bae]66\
67  --enable-gcc28                    enable use of gcc 2.8.x features"
68ac_help="$ac_help
69\
70  --enable-libcdir=directory        set the directory for the C library"
[bd5e4f3b]71ac_help="$ac_help
[550ca7d5]72  --enable-bare-cpu-cflags          \
73         specify a particular cpu cflag (bare bsp specific)"
[bd5e4f3b]74ac_help="$ac_help
[550ca7d5]75  --enable-bare-cpu-model              \
76         specify a particular cpu model (bare bsp specific)"
[e412bae]77ac_help="$ac_help
[254b4450]78\
[b9ca4ba]79    --enable-rtemsbsp=bsp1 bsp2 ..   BSPs to include in build"
[254b4450]80ac_help="$ac_help
[d4cf164]81\
[b9ca4ba]82  --enable-tests                    enable tests"
[d4cf164]83ac_help="$ac_help
[254b4450]84\
[b9ca4ba]85  --enable-hwapi                 enable hardware API library"
[254b4450]86
87# Initialize some variables set by options.
88# The variables have the same names as the options, with
89# dashes changed to underlines.
90build=NONE
91cache_file=./config.cache
92exec_prefix=NONE
93host=NONE
94no_create=
95nonopt=NONE
96no_recursion=
97prefix=NONE
98program_prefix=NONE
99program_suffix=NONE
100program_transform_name=s,x,x,
101silent=
102site=
103srcdir=
104target=NONE
105verbose=
106x_includes=NONE
107x_libraries=NONE
108bindir='${exec_prefix}/bin'
109sbindir='${exec_prefix}/sbin'
110libexecdir='${exec_prefix}/libexec'
111datadir='${prefix}/share'
112sysconfdir='${prefix}/etc'
113sharedstatedir='${prefix}/com'
114localstatedir='${prefix}/var'
115libdir='${exec_prefix}/lib'
116includedir='${prefix}/include'
117oldincludedir='/usr/include'
118infodir='${prefix}/info'
119mandir='${prefix}/man'
120
121# Initialize some other variables.
122subdirs=
123MFLAGS= MAKEFLAGS=
124# Maximum number of lines to put in a shell here document.
125ac_max_here_lines=12
126
127ac_prev=
128for ac_option
129do
130
131  # If the previous option needs an argument, assign it.
132  if test -n "$ac_prev"; then
133    eval "$ac_prev=\$ac_option"
134    ac_prev=
135    continue
136  fi
137
138  case "$ac_option" in
139  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
140  *) ac_optarg= ;;
141  esac
142
143  # Accept the important Cygnus configure options, so we can diagnose typos.
144
145  case "$ac_option" in
146
147  -bindir | --bindir | --bindi | --bind | --bin | --bi)
148    ac_prev=bindir ;;
149  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
150    bindir="$ac_optarg" ;;
151
152  -build | --build | --buil | --bui | --bu)
153    ac_prev=build ;;
154  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
155    build="$ac_optarg" ;;
156
157  -cache-file | --cache-file | --cache-fil | --cache-fi \
158  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
159    ac_prev=cache_file ;;
160  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
161  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
162    cache_file="$ac_optarg" ;;
163
164  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
165    ac_prev=datadir ;;
166  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
167  | --da=*)
168    datadir="$ac_optarg" ;;
169
170  -disable-* | --disable-*)
171    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
172    # Reject names that are not valid shell variable names.
173    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
174      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
175    fi
176    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
177    eval "enable_${ac_feature}=no" ;;
178
179  -enable-* | --enable-*)
180    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
181    # Reject names that are not valid shell variable names.
182    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
183      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184    fi
185    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
186    case "$ac_option" in
187      *=*) ;;
188      *) ac_optarg=yes ;;
189    esac
190    eval "enable_${ac_feature}='$ac_optarg'" ;;
191
192  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
193  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
194  | --exec | --exe | --ex)
195    ac_prev=exec_prefix ;;
196  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
197  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
198  | --exec=* | --exe=* | --ex=*)
199    exec_prefix="$ac_optarg" ;;
200
201  -gas | --gas | --ga | --g)
202    # Obsolete; use --with-gas.
203    with_gas=yes ;;
204
205  -help | --help | --hel | --he)
206    # Omit some internal or obsolete options to make the list less imposing.
207    # This message is too long to be a string in the A/UX 3.1 sh.
208    cat << EOF
209Usage: configure [options] [host]
210Options: [defaults in brackets after descriptions]
211Configuration:
212  --cache-file=FILE       cache test results in FILE
213  --help                  print this message
214  --no-create             do not create output files
215  --quiet, --silent       do not print \`checking...' messages
216  --version               print the version of autoconf that created configure
217Directory and file names:
218  --prefix=PREFIX         install architecture-independent files in PREFIX
219                          [$ac_default_prefix]
220  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
221                          [same as prefix]
222  --bindir=DIR            user executables in DIR [EPREFIX/bin]
223  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
224  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
225  --datadir=DIR           read-only architecture-independent data in DIR
226                          [PREFIX/share]
227  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
228  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
229                          [PREFIX/com]
230  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
231  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
232  --includedir=DIR        C header files in DIR [PREFIX/include]
233  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
234  --infodir=DIR           info documentation in DIR [PREFIX/info]
235  --mandir=DIR            man documentation in DIR [PREFIX/man]
236  --srcdir=DIR            find the sources in DIR [configure dir or ..]
237  --program-prefix=PREFIX prepend PREFIX to installed program names
238  --program-suffix=SUFFIX append SUFFIX to installed program names
239  --program-transform-name=PROGRAM
240                          run sed PROGRAM on installed program names
241EOF
242    cat << EOF
243Host type:
244  --build=BUILD           configure for building on BUILD [BUILD=HOST]
245  --host=HOST             configure for HOST [guessed]
246  --target=TARGET         configure for TARGET [TARGET=HOST]
247Features and packages:
248  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
249  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
250  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
251  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
252  --x-includes=DIR        X include files are in DIR
253  --x-libraries=DIR       X library files are in DIR
254EOF
255    if test -n "$ac_help"; then
256      echo "--enable and --with options recognized:$ac_help"
257    fi
258    exit 0 ;;
259
260  -host | --host | --hos | --ho)
261    ac_prev=host ;;
262  -host=* | --host=* | --hos=* | --ho=*)
263    host="$ac_optarg" ;;
264
265  -includedir | --includedir | --includedi | --included | --include \
266  | --includ | --inclu | --incl | --inc)
267    ac_prev=includedir ;;
268  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
269  | --includ=* | --inclu=* | --incl=* | --inc=*)
270    includedir="$ac_optarg" ;;
271
272  -infodir | --infodir | --infodi | --infod | --info | --inf)
273    ac_prev=infodir ;;
274  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
275    infodir="$ac_optarg" ;;
276
277  -libdir | --libdir | --libdi | --libd)
278    ac_prev=libdir ;;
279  -libdir=* | --libdir=* | --libdi=* | --libd=*)
280    libdir="$ac_optarg" ;;
281
282  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
283  | --libexe | --libex | --libe)
284    ac_prev=libexecdir ;;
285  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
286  | --libexe=* | --libex=* | --libe=*)
287    libexecdir="$ac_optarg" ;;
288
289  -localstatedir | --localstatedir | --localstatedi | --localstated \
290  | --localstate | --localstat | --localsta | --localst \
291  | --locals | --local | --loca | --loc | --lo)
292    ac_prev=localstatedir ;;
293  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
294  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
295  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
296    localstatedir="$ac_optarg" ;;
297
298  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
299    ac_prev=mandir ;;
300  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
301    mandir="$ac_optarg" ;;
302
303  -nfp | --nfp | --nf)
304    # Obsolete; use --without-fp.
305    with_fp=no ;;
306
307  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
308  | --no-cr | --no-c)
309    no_create=yes ;;
310
311  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
312  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313    no_recursion=yes ;;
314
315  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
316  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
317  | --oldin | --oldi | --old | --ol | --o)
318    ac_prev=oldincludedir ;;
319  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
320  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
321  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
322    oldincludedir="$ac_optarg" ;;
323
324  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
325    ac_prev=prefix ;;
326  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327    prefix="$ac_optarg" ;;
328
329  -program-prefix | --program-prefix | --program-prefi | --program-pref \
330  | --program-pre | --program-pr | --program-p)
331    ac_prev=program_prefix ;;
332  -program-prefix=* | --program-prefix=* | --program-prefi=* \
333  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
334    program_prefix="$ac_optarg" ;;
335
336  -program-suffix | --program-suffix | --program-suffi | --program-suff \
337  | --program-suf | --program-su | --program-s)
338    ac_prev=program_suffix ;;
339  -program-suffix=* | --program-suffix=* | --program-suffi=* \
340  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
341    program_suffix="$ac_optarg" ;;
342
343  -program-transform-name | --program-transform-name \
344  | --program-transform-nam | --program-transform-na \
345  | --program-transform-n | --program-transform- \
346  | --program-transform | --program-transfor \
347  | --program-transfo | --program-transf \
348  | --program-trans | --program-tran \
349  | --progr-tra | --program-tr | --program-t)
350    ac_prev=program_transform_name ;;
351  -program-transform-name=* | --program-transform-name=* \
352  | --program-transform-nam=* | --program-transform-na=* \
353  | --program-transform-n=* | --program-transform-=* \
354  | --program-transform=* | --program-transfor=* \
355  | --program-transfo=* | --program-transf=* \
356  | --program-trans=* | --program-tran=* \
357  | --progr-tra=* | --program-tr=* | --program-t=*)
358    program_transform_name="$ac_optarg" ;;
359
360  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
361  | -silent | --silent | --silen | --sile | --sil)
362    silent=yes ;;
363
364  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
365    ac_prev=sbindir ;;
366  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
367  | --sbi=* | --sb=*)
368    sbindir="$ac_optarg" ;;
369
370  -sharedstatedir | --sharedstatedir | --sharedstatedi \
371  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
372  | --sharedst | --shareds | --shared | --share | --shar \
373  | --sha | --sh)
374    ac_prev=sharedstatedir ;;
375  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
376  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
377  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
378  | --sha=* | --sh=*)
379    sharedstatedir="$ac_optarg" ;;
380
381  -site | --site | --sit)
382    ac_prev=site ;;
383  -site=* | --site=* | --sit=*)
384    site="$ac_optarg" ;;
385
386  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
387    ac_prev=srcdir ;;
388  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389    srcdir="$ac_optarg" ;;
390
391  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
392  | --syscon | --sysco | --sysc | --sys | --sy)
393    ac_prev=sysconfdir ;;
394  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
395  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
396    sysconfdir="$ac_optarg" ;;
397
398  -target | --target | --targe | --targ | --tar | --ta | --t)
399    ac_prev=target ;;
400  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
401    target="$ac_optarg" ;;
402
403  -v | -verbose | --verbose | --verbos | --verbo | --verb)
404    verbose=yes ;;
405
406  -version | --version | --versio | --versi | --vers)
407    echo "configure generated by autoconf version 2.12"
408    exit 0 ;;
409
410  -with-* | --with-*)
411    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
412    # Reject names that are not valid shell variable names.
413    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
414      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415    fi
416    ac_package=`echo $ac_package| sed 's/-/_/g'`
417    case "$ac_option" in
418      *=*) ;;
419      *) ac_optarg=yes ;;
420    esac
421    eval "with_${ac_package}='$ac_optarg'" ;;
422
423  -without-* | --without-*)
424    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
425    # Reject names that are not valid shell variable names.
426    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
427      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428    fi
429    ac_package=`echo $ac_package| sed 's/-/_/g'`
430    eval "with_${ac_package}=no" ;;
431
432  --x)
433    # Obsolete; use --with-x.
434    with_x=yes ;;
435
436  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
437  | --x-incl | --x-inc | --x-in | --x-i)
438    ac_prev=x_includes ;;
439  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
440  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
441    x_includes="$ac_optarg" ;;
442
443  -x-libraries | --x-libraries | --x-librarie | --x-librari \
444  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
445    ac_prev=x_libraries ;;
446  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
447  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
448    x_libraries="$ac_optarg" ;;
449
450  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
451    ;;
452
453  *)
454    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
455      echo "configure: warning: $ac_option: invalid host type" 1>&2
456    fi
457    if test "x$nonopt" != xNONE; then
458      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
459    fi
460    nonopt="$ac_option"
461    ;;
462
463  esac
464done
465
466if test -n "$ac_prev"; then
467  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
468fi
469
470trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
471
472# File descriptor usage:
473# 0 standard input
474# 1 file creation
475# 2 errors and warnings
476# 3 some systems may open it to /dev/tty
477# 4 used on the Kubota Titan
478# 6 checking for... messages and results
479# 5 compiler messages saved in config.log
480if test "$silent" = yes; then
481  exec 6>/dev/null
482else
483  exec 6>&1
484fi
485exec 5>./config.log
486
487echo "\
488This file contains any messages produced by compilers while
489running configure, to aid debugging if configure makes a mistake.
490" 1>&5
491
492# Strip out --no-create and --no-recursion so they do not pile up.
493# Also quote any args containing shell metacharacters.
494ac_configure_args=
495for ac_arg
496do
497  case "$ac_arg" in
498  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
499  | --no-cr | --no-c) ;;
500  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
501  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
502  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
503  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
504  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
505  esac
506done
507
508# NLS nuisances.
509# Only set these to C if already set.  These must not be set unconditionally
510# because not all systems understand e.g. LANG=C (notably SCO).
511# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
512# Non-C LC_CTYPE values break the ctype check.
513if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
514if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
515if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
516if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
517
518# confdefs.h avoids OS command line length limits that DEFS can exceed.
519rm -rf conftest* confdefs.h
520# AIX cpp loses on an empty file, so make sure it contains at least a newline.
521echo > confdefs.h
522
523# A filename unique to this package, relative to the directory that
524# configure is in, which we can look for to find out if srcdir is correct.
525ac_unique_file=README
526
527# Find the source files, if location was not specified.
528if test -z "$srcdir"; then
529  ac_srcdir_defaulted=yes
530  # Try the directory containing this script, then its parent.
531  ac_prog=$0
532  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
533  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
534  srcdir=$ac_confdir
535  if test ! -r $srcdir/$ac_unique_file; then
536    srcdir=..
537  fi
538else
539  ac_srcdir_defaulted=no
540fi
541if test ! -r $srcdir/$ac_unique_file; then
542  if test "$ac_srcdir_defaulted" = yes; then
543    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
544  else
545    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
546  fi
547fi
548srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
549
550# Prefer explicitly selected file to automatically selected ones.
551if test -z "$CONFIG_SITE"; then
552  if test "x$prefix" != xNONE; then
553    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
554  else
555    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
556  fi
557fi
558for ac_site_file in $CONFIG_SITE; do
559  if test -r "$ac_site_file"; then
560    echo "loading site script $ac_site_file"
561    . "$ac_site_file"
562  fi
563done
564
565if test -r "$cache_file"; then
566  echo "loading cache $cache_file"
567  . $cache_file
568else
569  echo "creating cache $cache_file"
570  > $cache_file
571fi
572
573ac_ext=c
574# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
575ac_cpp='$CPP $CPPFLAGS'
576ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
577ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
578cross_compiling=$ac_cv_prog_cc_cross
579
580if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
581  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
582  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
583    ac_n= ac_c='
584' ac_t='        '
585  else
586    ac_n=-n ac_c= ac_t=
587  fi
588else
589  ac_n= ac_c='\c' ac_t=
590fi
591
592
593
594echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
[2c3840b]595echo "configure:596: checking whether ${MAKE-make} sets \${MAKE}" >&5
[254b4450]596set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
597if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
598  echo $ac_n "(cached) $ac_c" 1>&6
599else
600  cat > conftestmake <<\EOF
601all:
602        @echo 'ac_maketemp="${MAKE}"'
603EOF
604# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
605eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
606if test -n "$ac_maketemp"; then
607  eval ac_cv_prog_make_${ac_make}_set=yes
608else
609  eval ac_cv_prog_make_${ac_make}_set=no
610fi
611rm -f conftestmake
612fi
613if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
614  echo "$ac_t""yes" 1>&6
615  SET_MAKE=
616else
617  echo "$ac_t""no" 1>&6
618  SET_MAKE="MAKE=${MAKE-make}"
619fi
620
621ac_aux_dir=
622for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
623  if test -f $ac_dir/install-sh; then
624    ac_aux_dir=$ac_dir
625    ac_install_sh="$ac_aux_dir/install-sh -c"
626    break
627  elif test -f $ac_dir/install.sh; then
628    ac_aux_dir=$ac_dir
629    ac_install_sh="$ac_aux_dir/install.sh -c"
630    break
631  fi
632done
633if test -z "$ac_aux_dir"; then
634  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
635fi
636ac_config_guess=$ac_aux_dir/config.guess
637ac_config_sub=$ac_aux_dir/config.sub
638ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
639
640
641# Do some error checking and defaulting for the host and target type.
642# The inputs are:
643#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
644#
645# The rules are:
646# 1. You are not allowed to specify --host, --target, and nonopt at the
647#    same time.
648# 2. Host defaults to nonopt.
649# 3. If nonopt is not specified, then host defaults to the current host,
650#    as determined by config.guess.
651# 4. Target and build default to nonopt.
652# 5. If nonopt is not specified, then target and build default to host.
653
654# The aliases save the names the user supplied, while $host etc.
655# will get canonicalized.
656case $host---$target---$nonopt in
657NONE---*---* | *---NONE---* | *---*---NONE) ;;
658*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
659esac
660
661
662# Make sure we can run config.sub.
663if $ac_config_sub sun4 >/dev/null 2>&1; then :
664else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
665fi
666
667echo $ac_n "checking host system type""... $ac_c" 1>&6
[2c3840b]668echo "configure:669: checking host system type" >&5
[254b4450]669
670host_alias=$host
671case "$host_alias" in
672NONE)
673  case $nonopt in
674  NONE)
675    if host_alias=`$ac_config_guess`; then :
676    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
677    fi ;;
678  *) host_alias=$nonopt ;;
679  esac ;;
680esac
681
682host=`$ac_config_sub $host_alias`
683host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
684host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
685host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
686echo "$ac_t""$host" 1>&6
687
688echo $ac_n "checking target system type""... $ac_c" 1>&6
[2c3840b]689echo "configure:690: checking target system type" >&5
[254b4450]690
691target_alias=$target
692case "$target_alias" in
693NONE)
694  case $nonopt in
695  NONE) target_alias=$host_alias ;;
696  *) target_alias=$nonopt ;;
697  esac ;;
698esac
699
700target=`$ac_config_sub $target_alias`
701target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
702target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
703target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
704echo "$ac_t""$target" 1>&6
705
706echo $ac_n "checking build system type""... $ac_c" 1>&6
[2c3840b]707echo "configure:708: checking build system type" >&5
[254b4450]708
709build_alias=$build
710case "$build_alias" in
711NONE)
712  case $nonopt in
713  NONE) build_alias=$host_alias ;;
714  *) build_alias=$nonopt ;;
715  esac ;;
716esac
717
718build=`$ac_config_sub $build_alias`
719build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
720build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
721build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
722echo "$ac_t""$build" 1>&6
723
724test "$host_alias" != "$target_alias" &&
725  test "$program_prefix$program_suffix$program_transform_name" = \
726    NONENONEs,x,x, &&
727  program_prefix=${target_alias}-
728
729# Check whether --with-cross-host or --without-cross-host was given.
730if test "${with_cross_host+set}" = set; then
731  withval="$with_cross_host"
732  \
733host=$withval
734fi
735
736
[91333c2]737# Check whether --enable-gmake-print-directory or --disable-gmake-print-directory was given.
738if test "${enable_gmake_print_directory+set}" = set; then
739  enableval="$enable_gmake_print_directory"
740  \
741case "${enableval}" in
[39ffc7d]742  yes) RTEMS_USE_OWN_PDIR=no ;;
743  no) RTEMS_USE_OWN_PDIR=yes ;;
[91333c2]744  *)  { echo "configure: error: bad value ${enableval} for gmake-print-directory option" 1>&2; exit 1; } ;;
745esac
746else
747  RTEMS_USE_OWN_PDIR=yes
748fi
749
750
[254b4450]751# Check whether --enable-posix or --disable-posix was given.
752if test "${enable_posix+set}" = set; then
753  enableval="$enable_posix"
754  \
[69df7da]755case "${enableval}" in
756  yes) RTEMS_HAS_POSIX_API=yes ;;
757  no) RTEMS_HAS_POSIX_API=no ;;
[ba1a2af9]758  *)  { echo "configure: error: bad value ${enableval} for enable-posix option" 1>&2; exit 1; } ;;
[69df7da]759esac
[254b4450]760else
761  RTEMS_HAS_POSIX_API=yes
762fi
763
764
[0280cb6]765# Check whether --enable-networking or --disable-networking was given.
766if test "${enable_networking+set}" = set; then
767  enableval="$enable_networking"
768  \
769case "${enableval}" in
770  yes) RTEMS_HAS_NETWORKING=yes ;;
771  no) RTEMS_HAS_NETWORKING=no ;;
772  *)  { echo "configure: error: bad value ${enableval} for enable-networking option" 1>&2; exit 1; } ;;
773esac
774else
775  RTEMS_HAS_NETWORKING=yes
[1f0f3e35]776fi
777
778
[254b4450]779# Check whether --enable-rtems-inlines or --disable-rtems-inlines was given.
780if test "${enable_rtems_inlines+set}" = set; then
781  enableval="$enable_rtems_inlines"
782  \
[69df7da]783case "${enableval}" in
[ba1a2af9]784  yes) RTEMS_USE_MACROS=no ;;
785  no) RTEMS_USE_MACROS=yes ;;
[69df7da]786  *)  { echo "configure: error: bad value ${enableval} for disable-rtems-inlines option" 1>&2; exit 1; } ;;
787esac
[254b4450]788else
789  RTEMS_USE_MACROS=no
790fi
791
792
[3771cc6e]793# Check whether --enable-cxx or --disable-cxx was given.
794if test "${enable_cxx+set}" = set; then
795  enableval="$enable_cxx"
[91333c2]796  \
[3f70e3c]797case "${enableval}" in
798  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
[37717818]799  no) RTEMS_HAS_CPLUSPLUS=no   ;;
[3771cc6e]800  *)  { echo "configure: error: bad value ${enableval} for enable-cxx option" 1>&2; exit 1; } ;;
[3f70e3c]801esac
802else
803  RTEMS_HAS_CPLUSPLUS=no
804fi
805
[91333c2]806
[971cd22]807# Check whether --enable-gcc28 or --disable-gcc28 was given.
808if test "${enable_gcc28+set}" = set; then
809  enableval="$enable_gcc28"
[e412bae]810  \
[69df7da]811case "${enableval}" in
812  yes) RTEMS_USE_GCC272=no ;;
813  no) RTEMS_USE_GCC272=yes ;;
814  *)  { echo "configure: error: bad value ${enableval} for gcc-28 option" 1>&2; exit 1; } ;;
815esac
[e412bae]816else
[fcb114c1]817  RTEMS_USE_GCC272=no
[e412bae]818fi
819
[971cd22]820
[e412bae]821# Check whether --enable-libcdir or --disable-libcdir was given.
822if test "${enable_libcdir+set}" = set; then
823  enableval="$enable_libcdir"
824  \
825 RTEMS_LIBC_DIR="${enableval}" ; \
826test -d ${enableval} || { echo "configure: error: "$enableval is not a directory" " 1>&2; exit 1; } 
827fi
828
829
[550ca7d5]830# Check whether --enable-bare-cpu-cflags or --disable-bare-cpu-cflags was given.
831if test "${enable_bare_cpu_cflags+set}" = set; then
832  enableval="$enable_bare_cpu_cflags"
[bd5e4f3b]833  case "${enableval}" in
[550ca7d5]834  no) BARE_CPU_CFLAGS="" ;;
835  *)    BARE_CPU_CFLAGS="${enableval}" ;;
[bd5e4f3b]836esac
837else
[550ca7d5]838  BARE_CPU_CFLAGS=""
[bd5e4f3b]839fi
840
841
[550ca7d5]842# Check whether --enable-bare-cpu-model or --disable-bare-cpu-model was given.
843if test "${enable_bare_cpu_model+set}" = set; then
844  enableval="$enable_bare_cpu_model"
[bd5e4f3b]845  case "${enableval}" in
[550ca7d5]846  no)   BARE_CPU_MODEL="" ;;
847  *)    BARE_CPU_MODEL="${enableval}" ;;
[bd5e4f3b]848esac
849else
[550ca7d5]850  BARE_CPU_MODEL=""
[bd5e4f3b]851fi
852
853
[254b4450]854RTEMS_PREFIX=${target_cpu}-${target_vendor}
855
[a50148a]856
857# Extract the first word of "cat", so it can be a program name with args.
858set dummy cat; ac_word=$2
859echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[2c3840b]860echo "configure:861: checking for $ac_word" >&5
[a50148a]861if eval "test \"`echo '$''{'ac_cv_path_CAT'+set}'`\" = set"; then
862  echo $ac_n "(cached) $ac_c" 1>&6
863else
864  case "$CAT" in
865  /*)
866  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
867  ;;
868  *)
869  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
870  for ac_dir in $PATH; do
871    test -z "$ac_dir" && ac_dir=.
872    if test -f $ac_dir/$ac_word; then
873      ac_cv_path_CAT="$ac_dir/$ac_word"
874      break
875    fi
876  done
877  IFS="$ac_save_ifs"
878  ;;
879esac
880fi
881CAT="$ac_cv_path_CAT"
882if test -n "$CAT"; then
883  echo "$ac_t""$CAT" 1>&6
884else
885  echo "$ac_t""no" 1>&6
886fi
887
888# Extract the first word of "rm", so it can be a program name with args.
889set dummy rm; ac_word=$2
890echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[2c3840b]891echo "configure:892: checking for $ac_word" >&5
[a50148a]892if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
893  echo $ac_n "(cached) $ac_c" 1>&6
894else
895  case "$RM" in
896  /*)
897  ac_cv_path_RM="$RM" # Let the user override the test with a path.
898  ;;
899  *)
900  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
901  for ac_dir in $PATH; do
902    test -z "$ac_dir" && ac_dir=.
903    if test -f $ac_dir/$ac_word; then
904      ac_cv_path_RM="$ac_dir/$ac_word"
905      break
906    fi
907  done
908  IFS="$ac_save_ifs"
909  ;;
910esac
911fi
912RM="$ac_cv_path_RM"
913if test -n "$RM"; then
914  echo "$ac_t""$RM" 1>&6
915else
916  echo "$ac_t""no" 1>&6
917fi
918
919# Extract the first word of "cp", so it can be a program name with args.
920set dummy cp; ac_word=$2
921echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[2c3840b]922echo "configure:923: checking for $ac_word" >&5
[a50148a]923if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
924  echo $ac_n "(cached) $ac_c" 1>&6
925else
926  case "$CP" in
927  /*)
928  ac_cv_path_CP="$CP" # Let the user override the test with a path.
929  ;;
930  *)
931  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
932  for ac_dir in $PATH; do
933    test -z "$ac_dir" && ac_dir=.
934    if test -f $ac_dir/$ac_word; then
935      ac_cv_path_CP="$ac_dir/$ac_word"
936      break
937    fi
938  done
939  IFS="$ac_save_ifs"
940  ;;
941esac
942fi
943CP="$ac_cv_path_CP"
944if test -n "$CP"; then
945  echo "$ac_t""$CP" 1>&6
946else
947  echo "$ac_t""no" 1>&6
948fi
949
950# Extract the first word of "mv", so it can be a program name with args.
951set dummy mv; ac_word=$2
952echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[2c3840b]953echo "configure:954: checking for $ac_word" >&5
[a50148a]954if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
955  echo $ac_n "(cached) $ac_c" 1>&6
956else
957  case "$MV" in
958  /*)
959  ac_cv_path_MV="$MV" # Let the user override the test with a path.
960  ;;
961  *)
962  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
963  for ac_dir in $PATH; do
964    test -z "$ac_dir" && ac_dir=.
965    if test -f $ac_dir/$ac_word; then
966      ac_cv_path_MV="$ac_dir/$ac_word"
967      break
968    fi
969  done
970  IFS="$ac_save_ifs"
971  ;;
972esac
973fi
974MV="$ac_cv_path_MV"
975if test -n "$MV"; then
976  echo "$ac_t""$MV" 1>&6
977else
978  echo "$ac_t""no" 1>&6
979fi
980
981# Extract the first word of "ln", so it can be a program name with args.
982set dummy ln; ac_word=$2
983echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[2c3840b]984echo "configure:985: checking for $ac_word" >&5
[a50148a]985if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
986  echo $ac_n "(cached) $ac_c" 1>&6
987else
988  case "$LN" in
989  /*)
990  ac_cv_path_LN="$LN" # Let the user override the test with a path.
991  ;;
992  *)
993  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
994  for ac_dir in $PATH; do
995    test -z "$ac_dir" && ac_dir=.
996    if test -f $ac_dir/$ac_word; then
997      ac_cv_path_LN="$ac_dir/$ac_word"
998      break
999    fi
1000  done
1001  IFS="$ac_save_ifs"
1002  ;;
1003esac
1004fi
1005LN="$ac_cv_path_LN"
1006if test -n "$LN"; then
1007  echo "$ac_t""$LN" 1>&6
1008else
1009  echo "$ac_t""no" 1>&6
1010fi
1011
[37717818]1012echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
[2c3840b]1013echo "configure:1014: checking whether ln -s works" >&5
[37717818]1014if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1015  echo $ac_n "(cached) $ac_c" 1>&6
1016else
1017  rm -f conftestdata
1018if ln -s X conftestdata 2>/dev/null
1019then
1020  rm -f conftestdata
1021  ac_cv_prog_LN_S="ln -s"
1022else
1023  ac_cv_prog_LN_S=ln
1024fi
1025fi
1026LN_S="$ac_cv_prog_LN_S"
1027if test "$ac_cv_prog_LN_S" = "ln -s"; then
1028  echo "$ac_t""yes" 1>&6
1029else
1030  echo "$ac_t""no" 1>&6
1031fi
1032
[a50148a]1033# Extract the first word of "chmod", so it can be a program name with args.
1034set dummy chmod; ac_word=$2
1035echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[2c3840b]1036echo "configure:1037: checking for $ac_word" >&5
[a50148a]1037if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
1038  echo $ac_n "(cached) $ac_c" 1>&6
1039else
1040  case "$CHMOD" in
1041  /*)
1042  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
1043  ;;
1044  *)
1045  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1046  for ac_dir in $PATH; do
1047    test -z "$ac_dir" && ac_dir=.
1048    if test -f $ac_dir/$ac_word; then
1049      ac_cv_path_CHMOD="$ac_dir/$ac_word"
1050      break
1051    fi
1052  done
1053  IFS="$ac_save_ifs"
1054  ;;
1055esac
1056fi
1057CHMOD="$ac_cv_path_CHMOD"
1058if test -n "$CHMOD"; then
1059  echo "$ac_t""$CHMOD" 1>&6
1060else
1061  echo "$ac_t""no" 1>&6
1062fi
1063
1064# Extract the first word of "sort", so it can be a program name with args.
1065set dummy sort; ac_word=$2
1066echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[2c3840b]1067echo "configure:1068: checking for $ac_word" >&5
[a50148a]1068if eval "test \"`echo '$''{'ac_cv_path_SORT'+set}'`\" = set"; then
1069  echo $ac_n "(cached) $ac_c" 1>&6
1070else
1071  case "$SORT" in
1072  /*)
1073  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
1074  ;;
1075  *)
1076  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1077  for ac_dir in $PATH; do
1078    test -z "$ac_dir" && ac_dir=.
1079    if test -f $ac_dir/$ac_word; then
1080      ac_cv_path_SORT="$ac_dir/$ac_word"
1081      break
1082    fi
1083  done
1084  IFS="$ac_save_ifs"
1085  ;;
1086esac
1087fi
1088SORT="$ac_cv_path_SORT"
1089if test -n "$SORT"; then
1090  echo "$ac_t""$SORT" 1>&6
1091else
1092  echo "$ac_t""no" 1>&6
1093fi
1094
[4fb08fd]1095# Find a good install program.  We prefer a C program (faster),
1096# so one script is as good as another.  But avoid the broken or
1097# incompatible versions:
1098# SysV /etc/install, /usr/sbin/install
1099# SunOS /usr/etc/install
1100# IRIX /sbin/install
1101# AIX /bin/install
1102# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1103# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1104# ./install, which can be erroneously created by make from ./install.sh.
1105echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
[2c3840b]1106echo "configure:1107: checking for a BSD compatible install" >&5
[4fb08fd]1107if test -z "$INSTALL"; then
1108if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1109  echo $ac_n "(cached) $ac_c" 1>&6
1110else
1111    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1112  for ac_dir in $PATH; do
1113    # Account for people who put trailing slashes in PATH elements.
1114    case "$ac_dir/" in
1115    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1116    *)
1117      # OSF1 and SCO ODT 3.0 have their own names for install.
1118      for ac_prog in ginstall installbsd scoinst install; do
1119        if test -f $ac_dir/$ac_prog; then
1120          if test $ac_prog = install &&
1121            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1122            # AIX install.  It has an incompatible calling convention.
1123            # OSF/1 installbsd also uses dspmsg, but is usable.
1124            :
1125          else
1126            ac_cv_path_install="$ac_dir/$ac_prog -c"
1127            break 2
1128          fi
1129        fi
1130      done
1131      ;;
1132    esac
1133  done
1134  IFS="$ac_save_IFS"
1135
1136fi
1137  if test "${ac_cv_path_install+set}" = set; then
1138    INSTALL="$ac_cv_path_install"
1139  else
1140    # As a last resort, use the slow shell script.  We don't cache a
1141    # path for INSTALL within a source directory, because that will
1142    # break other packages using the cache if that directory is
1143    # removed, or if the path is relative.
1144    INSTALL="$ac_install_sh"
1145  fi
1146fi
1147echo "$ac_t""$INSTALL" 1>&6
1148
1149# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1150# It thinks the first close brace ends the variable substitution.
1151test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1152
1153test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1154
[11cfb6f7]1155# Extract the first word of "perl", so it can be a program name with args.
1156set dummy perl; ac_word=$2
1157echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158echo "configure:1159: checking for $ac_word" >&5
1159if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1160  echo $ac_n "(cached) $ac_c" 1>&6
1161else
1162  case "$PERL" in
1163  /*)
1164  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
1165  ;;
1166  *)
1167  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1168  for ac_dir in $PATH; do
1169    test -z "$ac_dir" && ac_dir=.
1170    if test -f $ac_dir/$ac_word; then
1171      ac_cv_path_PERL="$ac_dir/$ac_word"
1172      break
1173    fi
1174  done
1175  IFS="$ac_save_ifs"
1176  ;;
1177esac
1178fi
1179PERL="$ac_cv_path_PERL"
1180if test -n "$PERL"; then
1181  echo "$ac_t""$PERL" 1>&6
1182else
1183  echo "$ac_t""no" 1>&6
1184fi
1185
1186if test -z "$PERL" ; then
1187echo "configure: warning: ***
1188   perl was not found
1189   Note: Some tools will not be built." 1>&2
1190fi
[a50148a]1191
1192# Extract the first word of "mkdir", so it can be a program name with args.
1193set dummy mkdir; ac_word=$2
1194echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1195echo "configure:1196: checking for $ac_word" >&5
[a50148a]1196if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
1197  echo $ac_n "(cached) $ac_c" 1>&6
1198else
1199  case "$MKDIR" in
1200  /*)
1201  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
1202  ;;
1203  *)
1204  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1205  for ac_dir in $PATH; do
1206    test -z "$ac_dir" && ac_dir=.
1207    if test -f $ac_dir/$ac_word; then
1208      ac_cv_path_MKDIR="$ac_dir/$ac_word"
1209      break
1210    fi
1211  done
1212  IFS="$ac_save_ifs"
1213  ;;
1214esac
1215fi
1216MKDIR="$ac_cv_path_MKDIR"
1217if test -n "$MKDIR"; then
1218  echo "$ac_t""$MKDIR" 1>&6
1219else
1220  echo "$ac_t""no" 1>&6
1221fi
1222
1223
1224
1225
1226echo $ac_n "checking for working $MKDIR -m 0755""... $ac_c" 1>&6
[11cfb6f7]1227echo "configure:1228: checking for working $MKDIR -m 0755" >&5
[a50148a]1228if eval "test \"`echo '$''{'rtems_cv_prog_MKDIR_P'+set}'`\" = set"; then
1229  echo $ac_n "(cached) $ac_c" 1>&6
1230else
1231  rm -rf conftestdata
1232if $MKDIR -m 0775 conftestdata 2>/dev/null; then
1233rtems_cv_prog_MKDIR_M="yes"
1234else
1235rtems_cv_prog_MKDIR_M="no"
1236fi
1237fi
1238rm -rf conftestdata
1239echo "$ac_t""$rtems_cv_prog_MKDIR_M" 1>&6
1240
1241
1242
1243echo $ac_n "checking for working $MKDIR -p""... $ac_c" 1>&6
[11cfb6f7]1244echo "configure:1245: checking for working $MKDIR -p" >&5
[a50148a]1245if eval "test \"`echo '$''{'rtems_cv_prog_mkdir_p'+set}'`\" = set"; then
1246  echo $ac_n "(cached) $ac_c" 1>&6
1247else
1248  rm -rf conftestdata
1249if $MKDIR -p conftestdata 2>/dev/null ;then
1250rtems_cv_prog_MKDIR_P="yes"
1251else
1252rtems_cv_prog_MKDIR_P="no"
1253fi
1254fi
1255rm -rf conftestdata
1256echo "$ac_t""$rtems_cv_prog_MKDIR_P" 1>&6
1257
1258test "$rtems_cv_prog_MKDIR_P" = "yes" && MKDIR="$MKDIR -p"
[f205fe6d]1259#test "$rtems_cv_prog_MKDIR_M" = "yes" && MKDIR="$MKDIR -m 0755"
[a50148a]1260
[3771cc6e]1261# Extract the first word of "touch", so it can be a program name with args.
1262set dummy touch; ac_word=$2
1263echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1264echo "configure:1265: checking for $ac_word" >&5
[3771cc6e]1265if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then
1266  echo $ac_n "(cached) $ac_c" 1>&6
1267else
1268  case "$TOUCH" in
1269  /*)
1270  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
1271  ;;
1272  *)
1273  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1274  for ac_dir in $PATH; do
1275    test -z "$ac_dir" && ac_dir=.
1276    if test -f $ac_dir/$ac_word; then
1277      ac_cv_path_TOUCH="$ac_dir/$ac_word"
1278      break
1279    fi
1280  done
1281  IFS="$ac_save_ifs"
1282  ;;
1283esac
1284fi
1285TOUCH="$ac_cv_path_TOUCH"
1286if test -n "$TOUCH"; then
1287  echo "$ac_t""$TOUCH" 1>&6
1288else
1289  echo "$ac_t""no" 1>&6
1290fi
1291
1292# Extract the first word of "cmp", so it can be a program name with args.
1293set dummy cmp; ac_word=$2
1294echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1295echo "configure:1296: checking for $ac_word" >&5
[3771cc6e]1296if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then
1297  echo $ac_n "(cached) $ac_c" 1>&6
1298else
1299  case "$CMP" in
1300  /*)
1301  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
1302  ;;
1303  *)
1304  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1305  for ac_dir in $PATH; do
1306    test -z "$ac_dir" && ac_dir=.
1307    if test -f $ac_dir/$ac_word; then
1308      ac_cv_path_CMP="$ac_dir/$ac_word"
1309      break
1310    fi
1311  done
1312  IFS="$ac_save_ifs"
1313  ;;
1314esac
1315fi
1316CMP="$ac_cv_path_CMP"
1317if test -n "$CMP"; then
1318  echo "$ac_t""$CMP" 1>&6
1319else
1320  echo "$ac_t""no" 1>&6
1321fi
1322
1323
1324# Extract the first word of "sed", so it can be a program name with args.
1325set dummy sed; ac_word=$2
1326echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1327echo "configure:1328: checking for $ac_word" >&5
[3771cc6e]1328if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
1329  echo $ac_n "(cached) $ac_c" 1>&6
1330else
1331  case "$SED" in
1332  /*)
1333  ac_cv_path_SED="$SED" # Let the user override the test with a path.
1334  ;;
1335  *)
1336  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1337  for ac_dir in $PATH; do
1338    test -z "$ac_dir" && ac_dir=.
1339    if test -f $ac_dir/$ac_word; then
1340      ac_cv_path_SED="$ac_dir/$ac_word"
1341      break
1342    fi
1343  done
1344  IFS="$ac_save_ifs"
1345  ;;
1346esac
1347fi
1348SED="$ac_cv_path_SED"
1349if test -n "$SED"; then
1350  echo "$ac_t""$SED" 1>&6
1351else
1352  echo "$ac_t""no" 1>&6
1353fi
1354
1355for ac_prog in gm4 m4
1356do
1357# Extract the first word of "$ac_prog", so it can be a program name with args.
1358set dummy $ac_prog; ac_word=$2
1359echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1360echo "configure:1361: checking for $ac_word" >&5
[3771cc6e]1361if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
1362  echo $ac_n "(cached) $ac_c" 1>&6
1363else
1364  case "$M4" in
1365  /*)
1366  ac_cv_path_M4="$M4" # Let the user override the test with a path.
1367  ;;
1368  *)
1369  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1370  for ac_dir in $PATH; do
1371    test -z "$ac_dir" && ac_dir=.
1372    if test -f $ac_dir/$ac_word; then
1373      ac_cv_path_M4="$ac_dir/$ac_word"
1374      break
1375    fi
1376  done
1377  IFS="$ac_save_ifs"
1378  ;;
1379esac
1380fi
1381M4="$ac_cv_path_M4"
1382if test -n "$M4"; then
1383  echo "$ac_t""$M4" 1>&6
1384else
1385  echo "$ac_t""no" 1>&6
1386fi
1387
1388test -n "$M4" && break
1389done
1390
1391
1392for ac_prog in bash ksh sh
1393do
1394# Extract the first word of "$ac_prog", so it can be a program name with args.
1395set dummy $ac_prog; ac_word=$2
1396echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1397echo "configure:1398: checking for $ac_word" >&5
[3771cc6e]1398if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
1399  echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401  case "$KSH" in
1402  /*)
1403  ac_cv_path_KSH="$KSH" # Let the user override the test with a path.
1404  ;;
1405  *)
1406  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1407  for ac_dir in $PATH; do
1408    test -z "$ac_dir" && ac_dir=.
1409    if test -f $ac_dir/$ac_word; then
1410      ac_cv_path_KSH="$ac_dir/$ac_word"
1411      break
1412    fi
1413  done
1414  IFS="$ac_save_ifs"
1415  ;;
1416esac
1417fi
1418KSH="$ac_cv_path_KSH"
1419if test -n "$KSH"; then
1420  echo "$ac_t""$KSH" 1>&6
1421else
1422  echo "$ac_t""no" 1>&6
1423fi
1424
1425test -n "$KSH" && break
1426done
1427
1428
1429if test -z "$KSH"; then
1430{ echo "configure: error: ***
1431    Cannot determine a usable shell bash/ksh/sh
1432    Please contact your system administrator " 1>&2; exit 1; };
1433fi
1434
1435
1436
1437
1438RTEMS_HOST=$host_os
1439
1440case "${target}" in
1441  # hpux unix port should go here
1442  i[3456]86-go32-rtems*)
1443        target_cpu=i386
1444        rtems_bsp="go32 go32_p5"
1445        skip_startfiles="yes"
1446        RTEMS_HAS_POSIX_API=no
1447        ;;
1448  i[3456]86-pc-linux*)         # unix "simulator" port
1449        target_cpu=unix
1450        RTEMS_HOST=Linux
[2758c9f2]1451        # override these settings
1452        RTEMS_HAS_POSIX_API=no
[3771cc6e]1453        ;;
[98100d2]1454  i[3456]86-*freebsd2*) # unix "simulator" port
[9a6994b4]1455        target_cpu=unix
1456        RTEMS_HOST=FreeBSD
1457        # override these settings
1458        RTEMS_HAS_POSIX_API=no
1459        ;;
[3771cc6e]1460  no_cpu-*rtems*)
1461        target_cpu=no_cpu
1462        RTEMS_HAS_POSIX_API=no
1463        ;;
[d7c9cbe4]1464  ppc*-*rtems*)
1465        target_cpu=powerpc
[bd5e4f3b]1466        ;;
[3771cc6e]1467  sparc-sun-solaris*)             # unix "simulator" port
1468        target_cpu=unix
1469        RTEMS_HOST=Solaris
[2758c9f2]1470        # override these settings
1471        RTEMS_HAS_POSIX_API=no
[3771cc6e]1472        ;;
1473  *)
1474        echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
[11cfb6f7]1475echo "configure:1476: checking rtems target cpu" >&5
[3771cc6e]1476target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
1477echo "$ac_t""$target_cpu" 1>&6
1478
1479        ;;
1480esac
1481
1482# Override the set of BSPs to be built.
1483# Check whether --enable-rtemsbsp or --disable-rtemsbsp was given.
1484if test "${enable_rtemsbsp+set}" = set; then
1485  enableval="$enable_rtemsbsp"
1486  \
1487      rtems_bsp=$enableval \
1488
1489fi
1490
1491
1492# Is this a supported CPU?
1493echo $ac_n "checking if cpu $target_cpu is supported""... $ac_c" 1>&6
[11cfb6f7]1494echo "configure:1495: checking if cpu $target_cpu is supported" >&5
[3771cc6e]1495if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then
1496  echo "$ac_t""yes" 1>&6
1497  makefiles="$makefiles c/src/exec/score/cpu/$target_cpu/Makefile"
1498else
1499  { echo "configure: error: no" 1>&2; exit 1; }
1500fi
1501
1502
1503if [ "${program_prefix}" = "NONE" ] ; then
1504  if [ "${target}" = "${host}" ] ; then
1505    program_prefix=
1506  else
1507    program_prefix=${target}-
1508  fi
1509fi
1510
1511
1512
[fe2401b2]1513
1514for ac_prog in "$program_prefix"gcc "$program_prefix"cc
1515do
1516# Extract the first word of "$ac_prog", so it can be a program name with args.
1517set dummy $ac_prog; ac_word=$2
[3771cc6e]1518echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1519echo "configure:1520: checking for $ac_word" >&5
[fe2401b2]1520if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
[3771cc6e]1521  echo $ac_n "(cached) $ac_c" 1>&6
1522else
[fe2401b2]1523  case "$CC_FOR_TARGET" in
1524  /*)
1525  ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a path.
1526  ;;
1527  *)
[3771cc6e]1528  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1529  for ac_dir in $PATH; do
1530    test -z "$ac_dir" && ac_dir=.
1531    if test -f $ac_dir/$ac_word; then
[fe2401b2]1532      ac_cv_path_CC_FOR_TARGET="$ac_dir/$ac_word"
[3771cc6e]1533      break
1534    fi
1535  done
1536  IFS="$ac_save_ifs"
[fe2401b2]1537  ;;
1538esac
[3771cc6e]1539fi
[fe2401b2]1540CC_FOR_TARGET="$ac_cv_path_CC_FOR_TARGET"
1541if test -n "$CC_FOR_TARGET"; then
1542  echo "$ac_t""$CC_FOR_TARGET" 1>&6
[3771cc6e]1543else
1544  echo "$ac_t""no" 1>&6
1545fi
1546
[fe2401b2]1547test -n "$CC_FOR_TARGET" && break
1548done
1549
1550test -z "$CC_FOR_TARGET" \
1551  && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
[3771cc6e]1552
[fe2401b2]1553rtems_save_CC=$CC
1554rtems_save_CFLAGS=$CFLAGS
1555
1556CC=$CC_FOR_TARGET
1557
1558echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
[11cfb6f7]1559echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
[3771cc6e]1560
1561ac_ext=c
1562# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1563ac_cpp='$CPP $CPPFLAGS'
1564ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1565ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1566cross_compiling=$ac_cv_prog_cc_cross
1567
1568cat > conftest.$ac_ext <<EOF
[11cfb6f7]1569#line 1570 "configure"
[3771cc6e]1570#include "confdefs.h"
[01518357]1571main(){return(0);}
[3771cc6e]1572EOF
[11cfb6f7]1573if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
[fe2401b2]1574  ac_cv_prog_cc_works=yes
[3771cc6e]1575  # If we can't run a trivial program, we are probably using a cross compiler.
1576  if (./conftest; exit) 2>/dev/null; then
[fe2401b2]1577    ac_cv_prog_cc_cross=no
[3771cc6e]1578  else
[fe2401b2]1579    ac_cv_prog_cc_cross=yes
[3771cc6e]1580  fi
1581else
1582  echo "configure: failed program was:" >&5
1583  cat conftest.$ac_ext >&5
[fe2401b2]1584  ac_cv_prog_cc_works=no
[3771cc6e]1585fi
1586rm -fr conftest*
1587
[fe2401b2]1588echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1589if test $ac_cv_prog_cc_works = no; then
1590  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
[3771cc6e]1591fi
[fe2401b2]1592echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
[11cfb6f7]1593echo "configure:1594: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
[fe2401b2]1594echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1595cross_compiling=$ac_cv_prog_cc_cross
[3771cc6e]1596
1597echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
[11cfb6f7]1598echo "configure:1599: checking whether we are using GNU C" >&5
[3771cc6e]1599if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1600  echo $ac_n "(cached) $ac_c" 1>&6
1601else
1602  cat > conftest.c <<EOF
1603#ifdef __GNUC__
1604  yes;
1605#endif
1606EOF
[11cfb6f7]1607if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
[3771cc6e]1608  ac_cv_prog_gcc=yes
1609else
1610  ac_cv_prog_gcc=no
1611fi
1612fi
1613
1614echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1615
1616if test $ac_cv_prog_gcc = yes; then
1617  GCC=yes
1618  ac_test_CFLAGS="${CFLAGS+set}"
1619  ac_save_CFLAGS="$CFLAGS"
1620  CFLAGS=
1621  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
[11cfb6f7]1622echo "configure:1623: checking whether ${CC-cc} accepts -g" >&5
[3771cc6e]1623if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1624  echo $ac_n "(cached) $ac_c" 1>&6
1625else
1626  echo 'void f(){}' > conftest.c
1627if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1628  ac_cv_prog_cc_g=yes
1629else
1630  ac_cv_prog_cc_g=no
1631fi
1632rm -f conftest*
1633
1634fi
1635
1636echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1637  if test "$ac_test_CFLAGS" = set; then
1638    CFLAGS="$ac_save_CFLAGS"
1639  elif test $ac_cv_prog_cc_g = yes; then
1640    CFLAGS="-g -O2"
1641  else
1642    CFLAGS="-O2"
1643  fi
1644else
1645  GCC=
1646  test "${CFLAGS+set}" = set || CFLAGS="-g"
1647fi
1648
1649rtems_cv_prog_gcc=$ac_cv_prog_gcc
1650rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
[fe2401b2]1651rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
1652rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
1653
1654CC=$rtems_save_CC
1655CFLAGS=$rtems_save_CFLAGS
[3771cc6e]1656
1657unset ac_cv_prog_gcc
1658unset ac_cv_prog_cc_g
[fe2401b2]1659unset ac_cv_prog_cc_works
1660unset ac_cv_prog_cc_cross
[3771cc6e]1661
1662
1663echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
[11cfb6f7]1664echo "configure:1665: checking whether $CC_FOR_TARGET accepts -specs" >&5
[3771cc6e]1665if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
1666  echo $ac_n "(cached) $ac_c" 1>&6
1667else
[98100d2]1668 
1669rtems_cv_gcc_specs=no
1670if test "$rtems_cv_prog_gcc" = "yes"; then
[3771cc6e]1671  touch confspec
[98100d2]1672  echo 'void f(){}' >conftest.c
1673  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
1674    rtems_cv_gcc_specs=yes
1675  fi
[3771cc6e]1676fi
1677rm -f confspec conftest*
1678
1679fi
1680
1681echo "$ac_t""$rtems_cv_gcc_specs" 1>&6
[a7a08713]1682 
[3771cc6e]1683
1684echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
[11cfb6f7]1685echo "configure:1686: checking whether $CC_FOR_TARGET accepts --pipe" >&5
[3771cc6e]1686if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
1687  echo $ac_n "(cached) $ac_c" 1>&6
1688else
1689 
[98100d2]1690rtems_cv_gcc_pipe=no
1691if test "$rtems_cv_prog_gcc" = "yes"; then
[a7a08713]1692case "$host_os" in
1693  cygwin32*)
1694    ;;
1695  *)
1696    echo 'void f(){}' >conftest.c
1697    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
1698      rtems_cv_gcc_pipe=yes
1699    fi
1700    rm -f conftest*
1701    ;;
1702esac
[98100d2]1703fi
[3771cc6e]1704
1705fi
1706
1707echo "$ac_t""$rtems_cv_gcc_pipe" 1>&6
1708
[a7a08713]1709
[0b76723]1710if test "$RTEMS_USE_GCC272" != "yes" ; then
1711  if test "$rtems_cv_gcc_specs" = "no"; then
1712    echo "configure: warning: *** disabling --enable-gcc28" 1>&2
1713     RTEMS_USE_GCC272=yes
1714  fi
1715fi
[fe2401b2]1716test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
[0b76723]1717
[3771cc6e]1718if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
1719 
[fe2401b2]1720
1721for ac_prog in "$program_prefix"g++ "$program_prefix"c++
[3771cc6e]1722do
1723# Extract the first word of "$ac_prog", so it can be a program name with args.
1724set dummy $ac_prog; ac_word=$2
1725echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1726echo "configure:1727: checking for $ac_word" >&5
[fe2401b2]1727if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then
[3771cc6e]1728  echo $ac_n "(cached) $ac_c" 1>&6
1729else
[fe2401b2]1730  case "$CXX_FOR_TARGET" in
1731  /*)
1732  ac_cv_path_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test with a path.
1733  ;;
1734  *)
[3771cc6e]1735  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1736  for ac_dir in $PATH; do
1737    test -z "$ac_dir" && ac_dir=.
1738    if test -f $ac_dir/$ac_word; then
[fe2401b2]1739      ac_cv_path_CXX_FOR_TARGET="$ac_dir/$ac_word"
[3771cc6e]1740      break
1741    fi
1742  done
1743  IFS="$ac_save_ifs"
[fe2401b2]1744  ;;
1745esac
[3771cc6e]1746fi
[fe2401b2]1747CXX_FOR_TARGET="$ac_cv_path_CXX_FOR_TARGET"
1748if test -n "$CXX_FOR_TARGET"; then
1749  echo "$ac_t""$CXX_FOR_TARGET" 1>&6
[3771cc6e]1750else
1751  echo "$ac_t""no" 1>&6
1752fi
1753
[fe2401b2]1754test -n "$CXX_FOR_TARGET" && break
[3771cc6e]1755done
1756
[fe2401b2]1757test -z "$CXX_FOR_TARGET" \
1758  && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1759
1760rtems_save_CXX=$CXX
1761rtems_save_CXXFLAGS=$CXXFLAGS
[3771cc6e]1762
[fe2401b2]1763CXX=$CXX_FOR_TARGET
1764
1765echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
[11cfb6f7]1766echo "configure:1767: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
[3771cc6e]1767
1768ac_ext=C
1769# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1770ac_cpp='$CXXCPP $CPPFLAGS'
1771ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1772ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1773cross_compiling=$ac_cv_prog_cxx_cross
1774
1775cat > conftest.$ac_ext <<EOF
[11cfb6f7]1776#line 1777 "configure"
[3771cc6e]1777#include "confdefs.h"
1778main(){return(0);}
1779EOF
[11cfb6f7]1780if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
[fe2401b2]1781  ac_cv_prog_cxx_works=yes
[3771cc6e]1782  # If we can't run a trivial program, we are probably using a cross compiler.
1783  if (./conftest; exit) 2>/dev/null; then
[fe2401b2]1784    ac_cv_prog_cxx_cross=no
[3771cc6e]1785  else
[fe2401b2]1786    ac_cv_prog_cxx_cross=yes
[3771cc6e]1787  fi
1788else
1789  echo "configure: failed program was:" >&5
1790  cat conftest.$ac_ext >&5
[fe2401b2]1791  ac_cv_prog_cxx_works=no
[3771cc6e]1792fi
1793rm -fr conftest*
1794ac_ext=c
1795# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1796ac_cpp='$CPP $CPPFLAGS'
1797ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1798ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1799cross_compiling=$ac_cv_prog_cc_cross
1800
[fe2401b2]1801echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1802if test $ac_cv_prog_cxx_works = no; then
1803  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
[3771cc6e]1804fi
[fe2401b2]1805echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
[11cfb6f7]1806echo "configure:1807: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
[fe2401b2]1807echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1808cross_compiling=$ac_cv_prog_cxx_cross
[3771cc6e]1809
1810echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
[11cfb6f7]1811echo "configure:1812: checking whether we are using GNU C++" >&5
[3771cc6e]1812if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1813  echo $ac_n "(cached) $ac_c" 1>&6
1814else
1815  cat > conftest.C <<EOF
1816#ifdef __GNUC__
1817  yes;
1818#endif
1819EOF
[11cfb6f7]1820if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
[3771cc6e]1821  ac_cv_prog_gxx=yes
1822else
1823  ac_cv_prog_gxx=no
1824fi
1825fi
1826
1827echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1828
1829if test $ac_cv_prog_gxx = yes; then
1830  GXX=yes
1831  ac_test_CXXFLAGS="${CXXFLAGS+set}"
1832  ac_save_CXXFLAGS="$CXXFLAGS"
1833  CXXFLAGS=
1834  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
[11cfb6f7]1835echo "configure:1836: checking whether ${CXX-g++} accepts -g" >&5
[3771cc6e]1836if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1837  echo $ac_n "(cached) $ac_c" 1>&6
1838else
1839  echo 'void f(){}' > conftest.cc
1840if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1841  ac_cv_prog_cxx_g=yes
1842else
1843  ac_cv_prog_cxx_g=no
1844fi
1845rm -f conftest*
1846
1847fi
1848
1849echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1850  if test "$ac_test_CXXFLAGS" = set; then
1851    CXXFLAGS="$ac_save_CXXFLAGS"
1852  elif test $ac_cv_prog_cxx_g = yes; then
1853    CXXFLAGS="-g -O2"
1854  else
1855    CXXFLAGS="-O2"
1856  fi
1857else
1858  GXX=
1859  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1860fi
1861
[fe2401b2]1862rtems_cv_prog_gxx=$ac_cv_prog_gxx
1863rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g
1864rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works
1865rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross
1866
1867CXX=$rtems_save_CXX
1868CXXFLAGS=$rtems_save_CXXFLAGS
1869
[3771cc6e]1870unset ac_cv_prog_gxx
[fe2401b2]1871unset ac_cv_prog_cc_g
1872unset ac_cv_prog_cxx_works
1873unset ac_cv_prog_cxx_cross
[3771cc6e]1874
[0b76723]1875  if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then
1876    { echo "configure: error: ***
1877     Inconsistency in compiler configuration:
1878     Target C compiler and Target C++ compiler
1879     must both ether be cross compilers or native compilers
[fe2401b2]1880     Hint: If building a posix bsp: LD_LIBRARY_PATH? " 1>&2; exit 1; }
[0b76723]1881  fi
[3771cc6e]1882else
1883  CXX_FOR_TARGET="no"
1884fi
1885
[98100d2]1886
1887 
1888echo $ac_n "checking target's ar""... $ac_c" 1>&6
[11cfb6f7]1889echo "configure:1890: checking target's ar" >&5
[98100d2]1890if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1891  echo $ac_n "(cached) $ac_c" 1>&6
1892else
1893  :
[3771cc6e]1894fi
1895
[98100d2]1896echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
1897
1898if test -n "$ac_cv_path_AR_FOR_TARGET"; then
1899    AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
1900else
1901    if test -z "$AR_FOR_TARGET" ; then
1902    if test "$rtems_cv_prog_gcc" = "yes"; then
1903      # We are using gcc, ask it about its tool
1904      # NOTE: Necessary if gcc was configured to use the target's
1905      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1906       case $host_os in
1907  *cygwin32*)
[32067a30]1908            AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar | sed -e 's%\\\\%/%g' `
[98100d2]1909    ;;
1910  *)
1911    AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
1912    ;;
1913  esac
1914
1915    fi
1916  else
1917    # The user set an environment variable.
1918    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1919    # will override the environment variable, which isn't what the user
1920    # intends
1921    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
[11cfb6f7]1922echo "configure:1923: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
[98100d2]1923    case "$AR_FOR_TARGET" in
1924    /*) # valid
1925      echo "$ac_t"""yes"" 1>&6
1926    ;;
1927    *)  # invalid for AC_PATH_PROG
1928      echo "$ac_t"""no"" 1>&6
1929      { echo "configure: error: ***
1930        Environment variable AR_FOR_TARGET should ether
1931        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1932    ;;
1933    esac
1934  fi
[3771cc6e]1935
[98100d2]1936  # Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
[3771cc6e]1937set dummy "$program_prefix"ar; ac_word=$2
1938echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]1939echo "configure:1940: checking for $ac_word" >&5
[3771cc6e]1940if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1941  echo $ac_n "(cached) $ac_c" 1>&6
1942else
1943  case "$AR_FOR_TARGET" in
1944  /*)
1945  ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
1946  ;;
1947  *)
1948  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1949  for ac_dir in $PATH; do
1950    test -z "$ac_dir" && ac_dir=.
1951    if test -f $ac_dir/$ac_word; then
1952      ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
1953      break
1954    fi
1955  done
1956  IFS="$ac_save_ifs"
1957  test -z "$ac_cv_path_AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET="no"
1958  ;;
1959esac
1960fi
1961AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
1962if test -n "$AR_FOR_TARGET"; then
1963  echo "$ac_t""$AR_FOR_TARGET" 1>&6
1964else
1965  echo "$ac_t""no" 1>&6
1966fi
1967
[98100d2]1968fi
1969
1970 
1971echo $ac_n "checking target's as""... $ac_c" 1>&6
[11cfb6f7]1972echo "configure:1973: checking target's as" >&5
[98100d2]1973if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
1974  echo $ac_n "(cached) $ac_c" 1>&6
1975else
1976  :
1977fi
1978
1979echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
1980
1981if test -n "$ac_cv_path_AS_FOR_TARGET"; then
1982    AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
1983else
1984    if test -z "$AS_FOR_TARGET" ; then
1985    if test "$rtems_cv_prog_gcc" = "yes"; then
1986      # We are using gcc, ask it about its tool
1987      # NOTE: Necessary if gcc was configured to use the target's
1988      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1989       case $host_os in
1990  *cygwin32*)
[32067a30]1991            AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as | sed -e 's%\\\\%/%g' `
[98100d2]1992    ;;
1993  *)
1994    AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
1995    ;;
1996  esac
1997
1998    fi
1999  else
2000    # The user set an environment variable.
2001    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2002    # will override the environment variable, which isn't what the user
2003    # intends
2004    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
[11cfb6f7]2005echo "configure:2006: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
[98100d2]2006    case "$AS_FOR_TARGET" in
2007    /*) # valid
2008      echo "$ac_t"""yes"" 1>&6
2009    ;;
2010    *)  # invalid for AC_PATH_PROG
2011      echo "$ac_t"""no"" 1>&6
2012      { echo "configure: error: ***
2013        Environment variable AS_FOR_TARGET should ether
2014        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2015    ;;
2016    esac
2017  fi
2018
2019  # Extract the first word of ""$program_prefix"as", so it can be a program name with args.
[3771cc6e]2020set dummy "$program_prefix"as; ac_word=$2
2021echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2022echo "configure:2023: checking for $ac_word" >&5
[3771cc6e]2023if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
2024  echo $ac_n "(cached) $ac_c" 1>&6
2025else
2026  case "$AS_FOR_TARGET" in
2027  /*)
2028  ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
2029  ;;
2030  *)
2031  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2032  for ac_dir in $PATH; do
2033    test -z "$ac_dir" && ac_dir=.
2034    if test -f $ac_dir/$ac_word; then
2035      ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
2036      break
2037    fi
2038  done
2039  IFS="$ac_save_ifs"
2040  test -z "$ac_cv_path_AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET="no"
2041  ;;
2042esac
2043fi
2044AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
2045if test -n "$AS_FOR_TARGET"; then
2046  echo "$ac_t""$AS_FOR_TARGET" 1>&6
2047else
2048  echo "$ac_t""no" 1>&6
2049fi
2050
[98100d2]2051fi
2052
2053 
2054echo $ac_n "checking target's ld""... $ac_c" 1>&6
[11cfb6f7]2055echo "configure:2056: checking target's ld" >&5
[98100d2]2056if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
2057  echo $ac_n "(cached) $ac_c" 1>&6
2058else
2059  :
2060fi
2061
2062echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
2063
2064if test -n "$ac_cv_path_LD_FOR_TARGET"; then
2065    LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
2066else
2067    if test -z "$LD_FOR_TARGET" ; then
2068    if test "$rtems_cv_prog_gcc" = "yes"; then
2069      # We are using gcc, ask it about its tool
2070      # NOTE: Necessary if gcc was configured to use the target's
2071      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2072       case $host_os in
2073  *cygwin32*)
[32067a30]2074            LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld | sed -e 's%\\\\%/%g' `
[98100d2]2075    ;;
2076  *)
2077    LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
2078    ;;
2079  esac
2080
2081    fi
2082  else
2083    # The user set an environment variable.
2084    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2085    # will override the environment variable, which isn't what the user
2086    # intends
2087    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
[11cfb6f7]2088echo "configure:2089: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
[98100d2]2089    case "$LD_FOR_TARGET" in
2090    /*) # valid
2091      echo "$ac_t"""yes"" 1>&6
2092    ;;
2093    *)  # invalid for AC_PATH_PROG
2094      echo "$ac_t"""no"" 1>&6
2095      { echo "configure: error: ***
2096        Environment variable LD_FOR_TARGET should ether
2097        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2098    ;;
2099    esac
2100  fi
2101
2102  # Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
2103set dummy "$program_prefix"ld; ac_word=$2
[a50148a]2104echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2105echo "configure:2106: checking for $ac_word" >&5
[98100d2]2106if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
[a50148a]2107  echo $ac_n "(cached) $ac_c" 1>&6
2108else
[98100d2]2109  case "$LD_FOR_TARGET" in
[a50148a]2110  /*)
[98100d2]2111  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
[a50148a]2112  ;;
2113  *)
2114  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2115  for ac_dir in $PATH; do
2116    test -z "$ac_dir" && ac_dir=.
2117    if test -f $ac_dir/$ac_word; then
[98100d2]2118      ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
[a50148a]2119      break
2120    fi
2121  done
2122  IFS="$ac_save_ifs"
[98100d2]2123  test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
[a50148a]2124  ;;
2125esac
2126fi
[98100d2]2127LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
2128if test -n "$LD_FOR_TARGET"; then
2129  echo "$ac_t""$LD_FOR_TARGET" 1>&6
[a50148a]2130else
2131  echo "$ac_t""no" 1>&6
2132fi
2133
[98100d2]2134fi
2135
2136 
2137echo $ac_n "checking target's nm""... $ac_c" 1>&6
[11cfb6f7]2138echo "configure:2139: checking target's nm" >&5
[98100d2]2139if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
2140  echo $ac_n "(cached) $ac_c" 1>&6
2141else
2142  :
2143fi
2144
2145echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
2146
2147if test -n "$ac_cv_path_NM_FOR_TARGET"; then
2148    NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
2149else
2150    if test -z "$NM_FOR_TARGET" ; then
2151    if test "$rtems_cv_prog_gcc" = "yes"; then
2152      # We are using gcc, ask it about its tool
2153      # NOTE: Necessary if gcc was configured to use the target's
2154      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2155       case $host_os in
2156  *cygwin32*)
[32067a30]2157            NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm | sed -e 's%\\\\%/%g' `
[98100d2]2158    ;;
2159  *)
2160    NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
2161    ;;
2162  esac
2163
2164    fi
2165  else
2166    # The user set an environment variable.
2167    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2168    # will override the environment variable, which isn't what the user
2169    # intends
2170    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
[11cfb6f7]2171echo "configure:2172: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
[98100d2]2172    case "$NM_FOR_TARGET" in
2173    /*) # valid
2174      echo "$ac_t"""yes"" 1>&6
2175    ;;
2176    *)  # invalid for AC_PATH_PROG
2177      echo "$ac_t"""no"" 1>&6
2178      { echo "configure: error: ***
2179        Environment variable NM_FOR_TARGET should ether
2180        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2181    ;;
2182    esac
2183  fi
2184
2185  # Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
2186set dummy "$program_prefix"nm; ac_word=$2
[a50148a]2187echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2188echo "configure:2189: checking for $ac_word" >&5
[98100d2]2189if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
[a50148a]2190  echo $ac_n "(cached) $ac_c" 1>&6
2191else
[98100d2]2192  case "$NM_FOR_TARGET" in
[a50148a]2193  /*)
[98100d2]2194  ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
[a50148a]2195  ;;
2196  *)
2197  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2198  for ac_dir in $PATH; do
2199    test -z "$ac_dir" && ac_dir=.
2200    if test -f $ac_dir/$ac_word; then
[98100d2]2201      ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
[a50148a]2202      break
2203    fi
2204  done
2205  IFS="$ac_save_ifs"
[98100d2]2206  test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no"
[a50148a]2207  ;;
2208esac
2209fi
[98100d2]2210NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
2211if test -n "$NM_FOR_TARGET"; then
2212  echo "$ac_t""$NM_FOR_TARGET" 1>&6
[a50148a]2213else
2214  echo "$ac_t""no" 1>&6
2215fi
2216
[98100d2]2217fi
2218
2219
2220 
2221echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
[11cfb6f7]2222echo "configure:2223: checking target's ranlib" >&5
[98100d2]2223if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
2224  echo $ac_n "(cached) $ac_c" 1>&6
2225else
2226  :
2227fi
2228
2229echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
[a50148a]2230
[98100d2]2231if test -n "$ac_cv_path_RANLIB_FOR_TARGET"; then
2232    RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
2233else
2234    if test -z "$RANLIB_FOR_TARGET" ; then
2235    if test "$rtems_cv_prog_gcc" = "yes"; then
2236      # We are using gcc, ask it about its tool
2237      # NOTE: Necessary if gcc was configured to use the target's
2238      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2239       case $host_os in
2240  *cygwin32*)
[32067a30]2241            RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib | sed -e 's%\\\\%/%g' `
[98100d2]2242    ;;
2243  *)
2244    RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
2245    ;;
2246  esac
2247
2248    fi
2249  else
2250    # The user set an environment variable.
2251    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2252    # will override the environment variable, which isn't what the user
2253    # intends
2254    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
[11cfb6f7]2255echo "configure:2256: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
[98100d2]2256    case "$RANLIB_FOR_TARGET" in
2257    /*) # valid
2258      echo "$ac_t"""yes"" 1>&6
2259    ;;
2260    *)  # invalid for AC_PATH_PROG
2261      echo "$ac_t"""no"" 1>&6
2262      { echo "configure: error: ***
2263        Environment variable RANLIB_FOR_TARGET should ether
2264        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2265    ;;
2266    esac
2267  fi
2268
2269  # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
[3771cc6e]2270set dummy "$program_prefix"ranlib; ac_word=$2
[a50148a]2271echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2272echo "configure:2273: checking for $ac_word" >&5
[3771cc6e]2273if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
[a50148a]2274  echo $ac_n "(cached) $ac_c" 1>&6
2275else
[3771cc6e]2276  case "$RANLIB_FOR_TARGET" in
[a50148a]2277  /*)
[3771cc6e]2278  ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
[a50148a]2279  ;;
2280  *)
2281  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2282  for ac_dir in $PATH; do
2283    test -z "$ac_dir" && ac_dir=.
2284    if test -f $ac_dir/$ac_word; then
[3771cc6e]2285      ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
[a50148a]2286      break
2287    fi
2288  done
2289  IFS="$ac_save_ifs"
[3771cc6e]2290  test -z "$ac_cv_path_RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET="no"
[a50148a]2291  ;;
2292esac
2293fi
[3771cc6e]2294RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
2295if test -n "$RANLIB_FOR_TARGET"; then
2296  echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
[a50148a]2297else
2298  echo "$ac_t""no" 1>&6
2299fi
2300
[98100d2]2301fi
2302
2303  if test "$RANLIB_FOR_TARGET" = "no"; then
2304    # ranlib wasn't found; check if ar -s is available
2305   
2306echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
[11cfb6f7]2307echo "configure:2308: checking whether $AR_FOR_TARGET -s works" >&5
[98100d2]2308if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
2309  echo $ac_n "(cached) $ac_c" 1>&6
2310else
2311 
2312cat > conftest.$ac_ext <<EOF
2313int foo( int b )
2314{ return b; }
2315EOF
[11cfb6f7]2316if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
2317  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
[98100d2]2318  && test -s conftest.a ; \
2319then
2320  rtems_cv_AR_FOR_TARGET_S="yes"
2321else
2322  rtems_cv_AR_FOR_TARGET_S="no"
2323fi
2324  rm -f conftest*
2325
2326fi
2327
2328echo "$ac_t""$rtems_cv_AR_FOR_TARGET_S" 1>&6
2329
2330    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
2331            ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
2332      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
2333    else
2334      { echo "configure: error: ***
2335        Can't figure out how to build a library index
2336        Nether ranlib nor ar -s seem to be available " 1>&2; exit 1; }
2337    fi
2338  fi
2339
2340 
2341echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
[11cfb6f7]2342echo "configure:2343: checking target's objcopy" >&5
[98100d2]2343if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
2344  echo $ac_n "(cached) $ac_c" 1>&6
2345else
2346  :
2347fi
2348
2349echo "$ac_t""$ac_cv_path_OBJCOPY_FOR_TARGET" 1>&6
2350
2351if test -n "$ac_cv_path_OBJCOPY_FOR_TARGET"; then
2352    OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
2353else
2354    if test -z "$OBJCOPY_FOR_TARGET" ; then
2355    if test "$rtems_cv_prog_gcc" = "yes"; then
2356      # We are using gcc, ask it about its tool
2357      # NOTE: Necessary if gcc was configured to use the target's
2358      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2359       case $host_os in
2360  *cygwin32*)
[32067a30]2361            OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy | sed -e 's%\\\\%/%g' `
[98100d2]2362    ;;
2363  *)
2364    OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy`
2365    ;;
2366  esac
2367
2368    fi
2369  else
2370    # The user set an environment variable.
2371    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2372    # will override the environment variable, which isn't what the user
2373    # intends
2374    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
[11cfb6f7]2375echo "configure:2376: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
[98100d2]2376    case "$OBJCOPY_FOR_TARGET" in
2377    /*) # valid
2378      echo "$ac_t"""yes"" 1>&6
2379    ;;
2380    *)  # invalid for AC_PATH_PROG
2381      echo "$ac_t"""no"" 1>&6
2382      { echo "configure: error: ***
2383        Environment variable OBJCOPY_FOR_TARGET should ether
2384        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2385    ;;
2386    esac
2387  fi
[3771cc6e]2388
[98100d2]2389  # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
[3771cc6e]2390set dummy "$program_prefix"objcopy; ac_word=$2
[a50148a]2391echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2392echo "configure:2393: checking for $ac_word" >&5
[3771cc6e]2393if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
[a50148a]2394  echo $ac_n "(cached) $ac_c" 1>&6
2395else
[3771cc6e]2396  case "$OBJCOPY_FOR_TARGET" in
[a50148a]2397  /*)
[3771cc6e]2398  ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path.
[a50148a]2399  ;;
2400  *)
2401  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2402  for ac_dir in $PATH; do
2403    test -z "$ac_dir" && ac_dir=.
2404    if test -f $ac_dir/$ac_word; then
[3771cc6e]2405      ac_cv_path_OBJCOPY_FOR_TARGET="$ac_dir/$ac_word"
[a50148a]2406      break
2407    fi
2408  done
2409  IFS="$ac_save_ifs"
[3771cc6e]2410  test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET="no"
[a50148a]2411  ;;
2412esac
2413fi
[3771cc6e]2414OBJCOPY_FOR_TARGET="$ac_cv_path_OBJCOPY_FOR_TARGET"
2415if test -n "$OBJCOPY_FOR_TARGET"; then
2416  echo "$ac_t""$OBJCOPY_FOR_TARGET" 1>&6
[a50148a]2417else
2418  echo "$ac_t""no" 1>&6
2419fi
2420
[98100d2]2421fi
2422
2423 
2424echo $ac_n "checking target's size""... $ac_c" 1>&6
[11cfb6f7]2425echo "configure:2426: checking target's size" >&5
[98100d2]2426if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
2427  echo $ac_n "(cached) $ac_c" 1>&6
2428else
2429  :
2430fi
2431
2432echo "$ac_t""$ac_cv_path_SIZE_FOR_TARGET" 1>&6
2433
2434if test -n "$ac_cv_path_SIZE_FOR_TARGET"; then
2435    SIZE_FOR_TARGET=$ac_cv_path_SIZE_FOR_TARGET
2436else
2437    if test -z "$SIZE_FOR_TARGET" ; then
2438    if test "$rtems_cv_prog_gcc" = "yes"; then
2439      # We are using gcc, ask it about its tool
2440      # NOTE: Necessary if gcc was configured to use the target's
2441      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2442       case $host_os in
2443  *cygwin32*)
[32067a30]2444            SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size | sed -e 's%\\\\%/%g' `
[98100d2]2445    ;;
2446  *)
2447    SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size`
2448    ;;
2449  esac
2450
2451    fi
2452  else
2453    # The user set an environment variable.
2454    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2455    # will override the environment variable, which isn't what the user
2456    # intends
2457    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
[11cfb6f7]2458echo "configure:2459: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
[98100d2]2459    case "$SIZE_FOR_TARGET" in
2460    /*) # valid
2461      echo "$ac_t"""yes"" 1>&6
2462    ;;
2463    *)  # invalid for AC_PATH_PROG
2464      echo "$ac_t"""no"" 1>&6
2465      { echo "configure: error: ***
2466        Environment variable SIZE_FOR_TARGET should ether
2467        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2468    ;;
2469    esac
2470  fi
2471
2472  # Extract the first word of ""$program_prefix"size", so it can be a program name with args.
[3771cc6e]2473set dummy "$program_prefix"size; ac_word=$2
[a50148a]2474echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2475echo "configure:2476: checking for $ac_word" >&5
[3771cc6e]2476if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
[a50148a]2477  echo $ac_n "(cached) $ac_c" 1>&6
2478else
[3771cc6e]2479  case "$SIZE_FOR_TARGET" in
[a50148a]2480  /*)
[3771cc6e]2481  ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a path.
[a50148a]2482  ;;
2483  *)
2484  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2485  for ac_dir in $PATH; do
2486    test -z "$ac_dir" && ac_dir=.
2487    if test -f $ac_dir/$ac_word; then
[3771cc6e]2488      ac_cv_path_SIZE_FOR_TARGET="$ac_dir/$ac_word"
[a50148a]2489      break
2490    fi
2491  done
2492  IFS="$ac_save_ifs"
[3771cc6e]2493  test -z "$ac_cv_path_SIZE_FOR_TARGET" && ac_cv_path_SIZE_FOR_TARGET="no"
[a50148a]2494  ;;
2495esac
2496fi
[3771cc6e]2497SIZE_FOR_TARGET="$ac_cv_path_SIZE_FOR_TARGET"
2498if test -n "$SIZE_FOR_TARGET"; then
2499  echo "$ac_t""$SIZE_FOR_TARGET" 1>&6
[a50148a]2500else
2501  echo "$ac_t""no" 1>&6
2502fi
2503
[98100d2]2504fi
2505
[a50148a]2506
2507
[2c3840b]2508if test "${target_cpu}" = "i386"; then
2509    echo $ac_n "checking for 16 bit mode assembler support""... $ac_c" 1>&6
[11cfb6f7]2510echo "configure:2511: checking for 16 bit mode assembler support" >&5
[2c3840b]2511if eval "test \"`echo '$''{'rtems_cv_prog_gas_code16'+set}'`\" = set"; then
2512  echo $ac_n "(cached) $ac_c" 1>&6
2513else
2514  cat > conftest.s << EOF
2515         .code16
[09213ec3]2516         data32
2517         addr32
2518         lgdt 0
[2c3840b]2519EOF
[11cfb6f7]2520      if { ac_try='$AS_FOR_TARGET -o conftest.o conftest.s'; { (eval echo configure:2521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
[2c3840b]2521        rtems_cv_prog_gas_code16=yes
2522      else
2523        rtems_cv_prog_gas_code16=no
2524      fi
2525fi
2526
2527echo "$ac_t""$rtems_cv_prog_gas_code16" 1>&6
2528    RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
2529  fi
2530
2531
[3771cc6e]2532# Extract the first word of "gcc", so it can be a program name with args.
2533set dummy gcc; ac_word=$2
2534echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2535echo "configure:2536: checking for $ac_word" >&5
[3771cc6e]2536if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2537  echo $ac_n "(cached) $ac_c" 1>&6
2538else
2539  if test -n "$CC"; then
2540  ac_cv_prog_CC="$CC" # Let the user override the test.
2541else
2542  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2543  for ac_dir in $PATH; do
2544    test -z "$ac_dir" && ac_dir=.
2545    if test -f $ac_dir/$ac_word; then
2546      ac_cv_prog_CC="gcc"
2547      break
2548    fi
2549  done
2550  IFS="$ac_save_ifs"
2551fi
2552fi
2553CC="$ac_cv_prog_CC"
2554if test -n "$CC"; then
2555  echo "$ac_t""$CC" 1>&6
2556else
2557  echo "$ac_t""no" 1>&6
[a50148a]2558fi
2559
[3771cc6e]2560if test -z "$CC"; then
2561  # Extract the first word of "cc", so it can be a program name with args.
2562set dummy cc; ac_word=$2
2563echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
[11cfb6f7]2564echo "configure:2565: checking for $ac_word" >&5
[3771cc6e]2565if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2566  echo $ac_n "(cached) $ac_c" 1>&6
2567else
2568  if test -n "$CC"; then
2569  ac_cv_prog_CC="$CC" # Let the user override the test.
2570else
2571  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2572  ac_prog_rejected=no
2573  for ac_dir in $PATH; do
2574    test -z "$ac_dir" && ac_dir=.
2575    if test -f $ac_dir/$ac_word; then
2576      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2577        ac_prog_rejected=yes
2578        continue
2579      fi
2580      ac_cv_prog_CC="cc"
2581      break
2582    fi
2583  done
2584  IFS="$ac_save_ifs"
2585if test $ac_prog_rejected = yes; then
2586  # We found a bogon in the path, so make sure we never use it.
2587  set dummy $ac_cv_prog_CC
2588  shift
2589  if test $# -gt 0; then
2590    # We chose a different compiler from the bogus one.
2591    # However, it has the same basename, so the bogon will be chosen
2592    # first if we set CC to just the basename; use the full file name.
2593    shift
2594    set dummy "$ac_dir/$ac_word" "$@"
2595    shift
2596    ac_cv_prog_CC="$@"
2597  fi
2598fi
2599fi
2600fi
2601CC="$ac_cv_prog_CC"
2602if test -n "$CC"; then
2603  echo "$ac_t""$CC" 1>&6
2604else
2605  echo "$ac_t""no" 1>&6
2606fi
[a50148a]2607
[3771cc6e]2608  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2609fi
[a50148a]2610
[3771cc6e]2611echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
[11cfb6f7]2612echo "configure:2613: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
[1670eede]2613
[3771cc6e]2614ac_ext=c
2615# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2616ac_cpp='$CPP $CPPFLAGS'
2617ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2618ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2619cross_compiling=$ac_cv_prog_cc_cross
[872cc62]2620
[3771cc6e]2621cat > conftest.$ac_ext <<EOF
[11cfb6f7]2622#line 2623 "configure"
[3771cc6e]2623#include "confdefs.h"
2624main(){return(0);}
2625EOF
[11cfb6f7]2626if { (eval echo configure:2627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
[3771cc6e]2627  ac_cv_prog_cc_works=yes
2628  # If we can't run a trivial program, we are probably using a cross compiler.
2629  if (./conftest; exit) 2>/dev/null; then
2630    ac_cv_prog_cc_cross=no
2631  else
2632    ac_cv_prog_cc_cross=yes
2633  fi
2634else
2635  echo "configure: failed program was:" >&5
2636  cat conftest.$ac_ext >&5
2637  ac_cv_prog_cc_works=no
2638fi
2639rm -fr conftest*
[744df795]2640
[3771cc6e]2641echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2642if test $ac_cv_prog_cc_works = no; then
2643  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2644fi
2645echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
[11cfb6f7]2646echo "configure:2647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
[3771cc6e]2647echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2648cross_compiling=$ac_cv_prog_cc_cross
[1670eede]2649
[3771cc6e]2650echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
[11cfb6f7]2651echo "configure:2652: checking whether we are using GNU C" >&5
[3771cc6e]2652if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2653  echo $ac_n "(cached) $ac_c" 1>&6
2654else
2655  cat > conftest.c <<EOF
2656#ifdef __GNUC__
2657  yes;
2658#endif
2659EOF
[11cfb6f7]2660if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
[3771cc6e]2661  ac_cv_prog_gcc=yes
2662else
2663  ac_cv_prog_gcc=no
2664fi
2665fi
[254b4450]2666
[3771cc6e]2667echo "$ac_t""$ac_cv_prog_gcc" 1>&6
[b9ca4ba]2668
[3771cc6e]2669if test $ac_cv_prog_gcc = yes; then
2670  GCC=yes
2671  ac_test_CFLAGS="${CFLAGS+set}"
2672  ac_save_CFLAGS="$CFLAGS"
2673  CFLAGS=
2674  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
[11cfb6f7]2675echo "configure:2676: checking whether ${CC-cc} accepts -g" >&5
[3771cc6e]2676if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2677  echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679  echo 'void f(){}' > conftest.c
2680if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2681  ac_cv_prog_cc_g=yes
2682else
2683  ac_cv_prog_cc_g=no
[b9ca4ba]2684fi
[3771cc6e]2685rm -f conftest*
[b9ca4ba]2686
[3771cc6e]2687fi
[b9ca4ba]2688
[3771cc6e]2689echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2690  if test "$ac_test_CFLAGS" = set; then
2691    CFLAGS="$ac_save_CFLAGS"
2692  elif test $ac_cv_prog_cc_g = yes; then
2693    CFLAGS="-g -O2"
2694  else
2695    CFLAGS="-O2"
2696  fi
2697else
2698  GCC=
2699  test "${CFLAGS+set}" = set || CFLAGS="-g"
2700fi
2701
2702
[98100d2]2703echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
[11cfb6f7]2704echo "configure:2705: checking for Cygwin32 environment" >&5
[98100d2]2705if eval "test \"`echo '$''{'rtems_cv_cygwin32'+set}'`\" = set"; then
2706  echo $ac_n "(cached) $ac_c" 1>&6
2707else
2708  cat > conftest.$ac_ext <<EOF
[11cfb6f7]2709#line 2710 "configure"
[98100d2]2710#include "confdefs.h"
2711
2712int main() {
2713return __CYGWIN32__;
2714; return 0; }
2715EOF
[11cfb6f7]2716if { (eval echo configure:2717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
[98100d2]2717  rm -rf conftest*
2718  rtems_cv_cygwin32=yes
2719else
2720  echo "configure: failed program was:" >&5
2721  cat conftest.$ac_ext >&5
2722  rm -rf conftest*
2723  rtems_cv_cygwin32=no
2724fi
2725rm -f conftest*
2726rm -f conftest*
2727fi
2728
2729echo "$ac_t""$rtems_cv_cygwin32" 1>&6
2730CYGWIN32=
2731test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes
2732
2733echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
[11cfb6f7]2734echo "configure:2735: checking for executable suffix" >&5
[98100d2]2735if eval "test \"`echo '$''{'rtems_cv_exeext'+set}'`\" = set"; then
2736  echo $ac_n "(cached) $ac_c" 1>&6
2737else
2738  if test "$CYGWIN32" = yes; then
2739rtems_cv_exeext=.exe
2740else
2741cat > rtems_c_test.c << 'EOF'
2742int main() {
2743/* Nothing needed here */
2744}
2745EOF
2746${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
2747rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
2748rm -f rtems_c_test*
2749fi
2750
2751test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
2752fi
2753EXEEXT=""
2754test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
2755echo "$ac_t""${rtems_cv_exeext}" 1>&6
2756
2757
2758case $host_os in
2759*cygwin32*)     GCCSED="| sed 's%\\\\%/%g'" ;;
2760*) ;;
2761esac
2762
2763
[946b3cb]2764if test "$ac_cv_prog_gcc" = "yes"; then
2765  CC_CFLAGS_DEFAULT=-Wall
2766  CC_CFLAGS_PROFILE_V=${CC_CFLAGS_PROFILE_V-"-pg"}
2767  CC_LDFLAGS_PROFILE_V=${CC_LDFLAGS_PROFILE_V-$CC_CFLAGS_PROFILE_V}
2768fi
2769
2770test "$ac_cv_prog_cc_g" = "yes" && CC_CFLAGS_DEBUG_V=${CC_CFLAGS_DEBUG_V-"-g"}
[cce81a7]2771
[3771cc6e]2772for ac_func in strerror
2773do
2774echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
[11cfb6f7]2775echo "configure:2776: checking for $ac_func" >&5
[3771cc6e]2776if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2777  echo $ac_n "(cached) $ac_c" 1>&6
2778else
2779  cat > conftest.$ac_ext <<EOF
[11cfb6f7]2780#line 2781 "configure"
[3771cc6e]2781#include "confdefs.h"
2782/* System header to define __stub macros and hopefully few prototypes,
2783    which can conflict with char $ac_func(); below.  */
2784#include <assert.h>
2785/* Override any gcc2 internal prototype to avoid an error.  */
2786/* We use char because int might match the return type of a gcc2
2787    builtin and then its argument prototype would still apply.  */
2788char $ac_func();
2789
2790int main() {
2791
2792/* The GNU C library defines this for functions which it implements
2793    to always fail with ENOSYS.  Some functions are actually named
2794    something starting with __ and the normal name is an alias.  */
2795#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2796choke me
2797#else
2798$ac_func();
2799#endif
2800
2801; return 0; }
2802EOF
[11cfb6f7]2803if { (eval echo configure:2804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
[3771cc6e]2804  rm -rf conftest*
2805  eval "ac_cv_func_$ac_func=yes"
2806else
2807  echo "configure: failed program was:" >&5
2808  cat conftest.$ac_ext >&5
2809  rm -rf conftest*
2810  eval "ac_cv_func_$ac_func=no"
2811fi
2812rm -f conftest*
2813fi
2814
2815if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
[1670eede]2816  echo "$ac_t""yes" 1>&6
[3771cc6e]2817    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2818  cat >> confdefs.h <<EOF
2819#define $ac_tr_func 1
2820EOF
2821 
[1670eede]2822else
[3771cc6e]2823  echo "$ac_t""no" 1>&6
[1670eede]2824fi
[3771cc6e]2825done
2826
[1670eede]2827
[613ab62]2828if test "$target_cpu" = "unix" ; then
2829   
2830
2831echo $ac_n "checking whether $RTEMS_HOST supports System V semaphores""... $ac_c" 1>&6
[11cfb6f7]2832echo "configure:2833: checking whether $RTEMS_HOST supports System V semaphores" >&5
[613ab62]2833if eval "test \"`echo '$''{'rtems_cv_sysv_sem'+set}'`\" = set"; then
2834  echo $ac_n "(cached) $ac_c" 1>&6
2835else
2836 
2837if test "$cross_compiling" = yes; then
2838  :
2839else
2840  cat > conftest.$ac_ext <<EOF
[11cfb6f7]2841#line 2842 "configure"
[613ab62]2842#include "confdefs.h"
2843
2844#include <sys/types.h>
2845#include <sys/ipc.h>
2846#include <sys/sem.h>
2847int main () {
[2d7d605]2848#if !defined(sun)
2849  union semun arg ;
[06fa582]2850#else
2851  union semun {
2852    int val;
2853    struct semid_ds *buf;
2854    ushort *array;
2855  } arg;
2856#endif
[613ab62]2857  int id=semget(IPC_PRIVATE,1,IPC_CREAT|0400);
2858  if (id == -1)
2859    exit(1);
2860  arg.val = 0; /* avoid implicit type cast to union */
2861  if (semctl(id, 0, IPC_RMID, arg) == -1)
2862    exit(1);
2863  exit(0);
2864}
2865
2866EOF
[11cfb6f7]2867if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
[613ab62]2868then
2869  rtems_cv_sysv_sem="yes"
2870else
2871  echo "configure: failed program was:" >&5
2872  cat conftest.$ac_ext >&5
2873  rm -fr conftest*
2874  rtems_cv_sysv_sem="no"
2875fi
2876rm -fr conftest*
2877fi
2878
2879
2880fi
2881
2882echo "$ac_t""$rtems_cv_sysv_sem" 1>&6
2883
2884  if test "$rtems_cv_sysv_sem" != "yes" ; then
2885    { echo "configure: error: System V semaphores don't work, required by simulator" 1>&2; exit 1; }
2886  fi
2887   
2888
2889echo $ac_n "checking whether $RTEMS_HOST supports System V shared memory""... $ac_c" 1>&6
[11cfb6f7]2890echo "configure:2891: checking whether $RTEMS_HOST supports System V shared memory" >&5
[613ab62]2891if eval "test \"`echo '$''{'rtems_cv_sysv_shm'+set}'`\" = set"; then
2892  echo $ac_n "(cached) $ac_c" 1>&6
2893else
2894 
2895if test "$cross_compiling" = yes; then
2896  :
2897else
2898  cat > conftest.$ac_ext <<EOF
[11cfb6f7]2899#line 2900 "configure"
[613ab62]2900#include "confdefs.h"
2901
2902#include <sys/types.h>
2903#include <sys/ipc.h>
2904#include <sys/shm.h>
2905int main () {
2906  int id=shmget(IPC_PRIVATE,1,IPC_CREAT|0400);
2907  if (id == -1)
2908    exit(1);
2909  if (shmctl(id, IPC_RMID, 0) == -1)
2910    exit(1);
2911  exit(0);
2912}
2913
2914EOF
[11cfb6f7]2915if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
[613ab62]2916then
2917  rtems_cv_sysv_shm="yes"
2918else
2919  echo "configure: failed program was:" >&5
2920  cat conftest.$ac_ext >&5
2921  rm -fr conftest*
2922  rtems_cv_sysv_shm="no"
2923fi
2924rm -fr conftest*
2925fi
2926
2927
2928fi
2929
2930echo "$ac_t""$rtems_cv_sysv_shm" 1>&6
2931
2932  if test "$rtems_cv_sysv_shm" != "yes" ; then
2933    { echo "configure: error: System V shared memory doesn't work, required by simulator" 1>&2; exit 1; }
2934  fi
2935   
2936
2937echo $ac_n "checking whether $RTEMS_HOST supports System V messages""... $ac_c" 1>&6
[11cfb6f7]2938echo "configure:2939: checking whether $RTEMS_HOST supports System V messages" >&5
[613ab62]2939if eval "test \"`echo '$''{'rtems_cv_sysv_msg'+set}'`\" = set"; then
2940  echo $ac_n "(cached) $ac_c" 1>&6
2941else
2942 
2943if test "$cross_compiling" = yes; then
2944  :
2945else
2946  cat > conftest.$ac_ext <<EOF
[11cfb6f7]2947#line 2948 "configure"
[613ab62]2948#include "confdefs.h"
2949
2950#include <sys/types.h>
2951#include <sys/ipc.h>
2952#include <sys/msg.h>
2953int main () {
2954  int id=msgget(IPC_PRIVATE,IPC_CREAT|0400);
2955  if (id == -1)
2956    exit(1);
2957  if (msgctl(id, IPC_RMID, 0) == -1)
2958    exit(1);
2959  exit(0);
2960}
2961
2962EOF
[11cfb6f7]2963if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
[613ab62]2964then
2965  rtems_cv_sysv_msg="yes"
2966else
2967  echo "configure: failed program was:" >&5
2968  cat conftest.$ac_ext >&5
2969  rm -fr conftest*
2970  rtems_cv_sysv_msg="no"
2971fi
2972rm -fr conftest*
2973fi
2974
2975
2976fi
2977
2978echo "$ac_t""$rtems_cv_sysv_msg" 1>&6
2979
2980  if test "$rtems_cv_sysv_msg" != "yes" ; then
2981    { echo "configure: error: System V messages don't work, required by simulator" 1>&2; exit 1; }
2982  fi
2983fi
2984
[37717818]2985# find all the Executive Makefiles
[1670eede]2986
[744df795]2987echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6
[11cfb6f7]2988echo "configure:2989: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
[744df795]2989if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then
2990  rtems_av_save_dir=`pwd`;
2991  cd $srcdir;
[6f9c75c3]2992  rtems_av_tmp=`find c/src/exec/score/tools/$target_cpu -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[744df795]2993  makefiles="$makefiles $rtems_av_tmp";
2994  cd $rtems_av_save_dir;
2995  echo "$ac_t""done" 1>&6
2996else
2997  echo "$ac_t""no" 1>&6
2998fi
2999
3000
3001
[37717818]3002echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
[11cfb6f7]3003echo "configure:3004: checking for Makefile.in in c/src/exec/rtems" >&5
[37717818]3004if test -d $srcdir/c/src/exec/rtems; then
3005  rtems_av_save_dir=`pwd`;
3006  cd $srcdir;
[6f9c75c3]3007  rtems_av_tmp=`find c/src/exec/rtems -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3008  makefiles="$makefiles $rtems_av_tmp";
3009  cd $rtems_av_save_dir;
3010  echo "$ac_t""done" 1>&6
3011else
3012  echo "$ac_t""no" 1>&6
3013fi
[1670eede]3014
3015
3016
[37717818]3017echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
[11cfb6f7]3018echo "configure:3019: checking for Makefile.in in c/src/exec/sapi" >&5
[37717818]3019if test -d $srcdir/c/src/exec/sapi; then
3020  rtems_av_save_dir=`pwd`;
3021  cd $srcdir;
[6f9c75c3]3022  rtems_av_tmp=`find c/src/exec/sapi -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3023  makefiles="$makefiles $rtems_av_tmp";
3024  cd $rtems_av_save_dir;
3025  echo "$ac_t""done" 1>&6
[1670eede]3026else
[37717818]3027  echo "$ac_t""no" 1>&6
3028fi
[1670eede]3029
3030
3031
[ba1a2af9]3032if test "$RTEMS_HAS_POSIX_API" = "yes"; then
[b9ca4ba]3033 
3034echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6
[11cfb6f7]3035echo "configure:3036: checking for Makefile.in in c/src/exec/posix" >&5
[b9ca4ba]3036if test -d $srcdir/c/src/exec/posix; then
[37717818]3037  rtems_av_save_dir=`pwd`;
3038  cd $srcdir;
[6f9c75c3]3039  rtems_av_tmp=`find c/src/exec/posix -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3040  makefiles="$makefiles $rtems_av_tmp";
3041  cd $rtems_av_save_dir;
3042  echo "$ac_t""done" 1>&6
[1670eede]3043else
3044  echo "$ac_t""no" 1>&6
3045fi
3046
3047
[ba1a2af9]3048  makefiles="$makefiles c/src/exec/wrapup/posix/Makefile"
[b9ca4ba]3049fi
[1670eede]3050
[37717818]3051# find all the Makefiles for the BSPs
3052if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then
3053  makefiles="$makefiles c/src/lib/libbsp/$target_cpu/Makefile"
3054
3055  if test -z "$rtems_bsp"; then
3056    echo $ac_n "checking for bsps""... $ac_c" 1>&6
[11cfb6f7]3057echo "configure:3058: checking for bsps" >&5
[37717818]3058    files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
3059    for file in $files; do
3060      case $file in
3061        shared*);;
3062        Makefile*);;
3063        READ*);;
3064        CVS*);;
[674c900]3065        pxfl*);;
3066        go32*);;       # so the i386 port can pick up the other Makefiles
3067        # Now account for BSPs with build variants
3068        gen68360)      rtems_bsp="$rtems_bsp gen68360 gen68360_040";;
3069        p4000)         rtems_bsp="$rtems_bsp p4600 p4650";;
3070        mvme162)       rtems_bsp="$rtems_bsp mvme162 mvme162lx";;
[37717818]3071        *) rtems_bsp="$rtems_bsp $file";;
3072      esac;
3073    done
[674c900]3074
[bd5e4f3b]3075    makefiles="$makefiles c/src/lib/libbsp/bare/Makefile"
3076
[300c8a76]3077    echo "$ac_t""$rtems_bsp done" 1>&6
[37717818]3078  fi
[1670eede]3079
[37717818]3080  # collect makefiles for each bsp
3081  for i in $rtems_bsp; do
[b9ca4ba]3082    # make sure there is a make/custom file for the bsp
[6d6f1b34]3083    if test ! -r "$srcdir/make/custom/${i}.cfg"; then
[b9ca4ba]3084      { echo "configure: error: no make/custom/${i}.cfg file for BSP $i" 1>&2; exit 1; }
3085    fi
[674c900]3086 
[b9ca4ba]3087    # account for "aliased" bsps which share source code
3088    case $i in
3089      mvme162lx)    bspdir=mvme162  ;;  # mvme162 board variant
3090      gen68360_040) bspdir=gen68360 ;;  # 68360 in companion mode
3091      go32_p5)      bspdir=go32     ;;  # go32 on Pentium class CPU
3092      p4600)        bspdir=p4000    ;;  # p4000 board with IDT 4600
3093      p4650)        bspdir=p4000    ;;  # p4000 board with IDT 4650
3094      *)            bspdir=$i;;
3095    esac
3096
3097    # Is there code where there should be for this BSP?
[bd5e4f3b]3098    # The bare bsp is a special case as it is not under the target_cpu path
3099    case $i in
[579fc6a3]3100      bare)
3101        bspcpudir=
3102        if test "X${BARE_CPU_CFLAGS}" = "X" ; then
[959d752]3103          { echo "configure: error: --enable-bare-cpu-cflags not specified for bare bsp" 1>&2; exit 1; }
[579fc6a3]3104        fi
3105        if test "X${BARE_CPU_MODEL}" = "X" ; then
3106          { echo "configure: error: --enable-bare-cpu-model not specified for bare bsp" 1>&2; exit 1; }
3107        fi
3108        ;;
3109      *)
3110        bspcpudir=$target_cpu/
3111        ;;
[1388d19]3112    esac
3113     
[a5400c0]3114    if test -d "$srcdir/c/src/lib/libbsp/$bspcpudir$bspdir"; then
[1388d19]3115      RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i"
3116      # make sure the Makefiles in a bsp directory are only done once
3117      echo $bspdirs | grep $bspdir >/dev/null 2>&1
3118      if test $? -ne 0 ; then
3119        bspdirs="$bspdirs $bspdir"
3120       
[a5400c0]3121echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir""... $ac_c" 1>&6
[11cfb6f7]3122echo "configure:3123: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
[a5400c0]3123if test -d $srcdir/c/src/lib/libbsp/$bspcpudir$bspdir; then
[37717818]3124  rtems_av_save_dir=`pwd`;
3125  cd $srcdir;
[a5400c0]3126  rtems_av_tmp=`find c/src/lib/libbsp/$bspcpudir$bspdir -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3127  makefiles="$makefiles $rtems_av_tmp";
3128  cd $rtems_av_save_dir;
3129  echo "$ac_t""done" 1>&6
3130else
3131  echo "$ac_t""no" 1>&6
3132fi
[1670eede]3133
3134
[67a2288]3135       
3136echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared""... $ac_c" 1>&6
[11cfb6f7]3137echo "configure:3138: checking for Makefile.in in c/src/lib/libbsp/${bspcpudir}shared" >&5
[67a2288]3138if test -d $srcdir/c/src/lib/libbsp/${bspcpudir}shared; then
3139  rtems_av_save_dir=`pwd`;
3140  cd $srcdir;
3141  rtems_av_tmp=`find c/src/lib/libbsp/${bspcpudir}shared -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
3142  makefiles="$makefiles $rtems_av_tmp";
3143  cd $rtems_av_save_dir;
3144  echo "$ac_t""done" 1>&6
3145else
3146  echo "$ac_t""no" 1>&6
3147fi
3148
3149
[1388d19]3150      fi
3151    else
3152      { echo "configure: error: unable to find libbsp directory ($bspdir) for  $i" 1>&2; exit 1; }
3153    fi
[1670eede]3154  done
[37717818]3155fi
3156
3157# find all the CPU dependent library Makefiles
3158
3159echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6
[11cfb6f7]3160echo "configure:3161: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
[37717818]3161if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then
3162  rtems_av_save_dir=`pwd`;
3163  cd $srcdir;
[6f9c75c3]3164  rtems_av_tmp=`find c/src/lib/libcpu/$target_cpu -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3165  makefiles="$makefiles $rtems_av_tmp";
3166  cd $rtems_av_save_dir;
3167  echo "$ac_t""done" 1>&6
3168else
3169  echo "$ac_t""no" 1>&6
3170fi
[1670eede]3171
3172
3173
[37717818]3174if test "$skip_startfiles" != "yes"; then
3175 
3176echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6
[11cfb6f7]3177echo "configure:3178: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
[37717818]3178if test -d $srcdir/c/src/lib/start/$target_cpu; then
3179  rtems_av_save_dir=`pwd`;
3180  cd $srcdir;
[6f9c75c3]3181  rtems_av_tmp=`find c/src/lib/start/$target_cpu -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3182  makefiles="$makefiles $rtems_av_tmp";
3183  cd $rtems_av_save_dir;
3184  echo "$ac_t""done" 1>&6
3185else
3186  echo "$ac_t""no" 1>&6
3187fi
[1670eede]3188
3189
[37717818]3190fi
[1670eede]3191
3192
3193
[4a7c0451]3194PROJECT_ROOT=`pwd;`
[254b4450]3195
[566aea7d]3196# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
3197if test "$RTEMS_USE_MACROS" = "yes"; then
3198  inline_dir=macros
3199  if test "$RTEMS_HAS_POSIX_API" = "yes"; then
3200    # The problem is that there is currently no code in posix/macros :)
3201    { echo "configure: error: Macros are not implemented for the POSIX API" 1>&2; exit 1; }
3202  fi
3203else
3204  inline_dir=inline
3205fi
3206
[0280cb6]3207# If the TCP/IP stack is enabled, then find all TCP/IP Makefiles
3208echo $ac_n "checking if networking is enabled? ""... $ac_c" 1>&6
[11cfb6f7]3209echo "configure:3210: checking if networking is enabled? " >&5
[0280cb6]3210echo "$ac_t""$RTEMS_HAS_NETWORKING" 1>&6
3211if test "$RTEMS_HAS_NETWORKING" = "yes"; then
3212 
3213echo $ac_n "checking for Makefile.in in c/src/lib/libnetworking""... $ac_c" 1>&6
[11cfb6f7]3214echo "configure:3215: checking for Makefile.in in c/src/lib/libnetworking" >&5
[0280cb6]3215if test -d $srcdir/c/src/lib/libnetworking; then
3216  rtems_av_save_dir=`pwd`;
3217  cd $srcdir;
3218  rtems_av_tmp=`find c/src/lib/libnetworking -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
3219  makefiles="$makefiles $rtems_av_tmp";
3220  cd $rtems_av_save_dir;
3221  echo "$ac_t""done" 1>&6
3222else
3223  echo "$ac_t""no" 1>&6
3224fi
3225
3226
3227fi
3228
[80a16ec4]3229# If the C++ support is enabled, then include the Makefiles
3230if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
3231  makefiles="$makefiles c/src/lib/librtems++/Makefile"
3232fi
[37717818]3233
3234# If the tests are enabled, then find all the test suite Makefiles
[70dda0ea]3235echo $ac_n "checking if the test suites are enabled? ""... $ac_c" 1>&6
[11cfb6f7]3236echo "configure:3237: checking if the test suites are enabled? " >&5
[b9ca4ba]3237tests_enabled=yes
[254b4450]3238# Check whether --enable-tests or --disable-tests was given.
3239if test "${enable_tests+set}" = set; then
3240  enableval="$enable_tests"
3241  \
[b9ca4ba]3242  case "${enableval}" in
3243    yes) echo "$ac_t""yes" 1>&6 ;;
3244    no)  echo "$ac_t""no" 1>&6 ; tests_enabled=no ;;
3245    *)   { echo "configure: error: bad value ${enableval} for tests option" 1>&2; exit 1; } ;;
3246  esac
[37717818]3247else
[b9ca4ba]3248  echo "$ac_t""yes" 1>&6
3249
3250fi
3251
3252
[41f61bc]3253
[37717818]3254echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
[11cfb6f7]3255echo "configure:3256: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
[37717818]3256if test -d $srcdir/c/src/tests/tools/$target_cpu; then
3257  rtems_av_save_dir=`pwd`;
3258  cd $srcdir;
[6f9c75c3]3259  rtems_av_tmp=`find c/src/tests/tools/$target_cpu -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3260  makefiles="$makefiles $rtems_av_tmp";
3261  cd $rtems_av_save_dir;
3262  echo "$ac_t""done" 1>&6
3263else
3264  echo "$ac_t""no" 1>&6
3265fi
3266
[b9ca4ba]3267
[41f61bc]3268
3269if test "$tests_enabled" = "yes"; then
[b9ca4ba]3270   
[37717818]3271echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
[11cfb6f7]3272echo "configure:3273: checking for Makefile.in in c/src/tests/libtests" >&5
[37717818]3273if test -d $srcdir/c/src/tests/libtests; then
3274  rtems_av_save_dir=`pwd`;
3275  cd $srcdir;
[6f9c75c3]3276  rtems_av_tmp=`find c/src/tests/libtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3277  makefiles="$makefiles $rtems_av_tmp";
3278  cd $rtems_av_save_dir;
3279  echo "$ac_t""done" 1>&6
[254b4450]3280else
[37717818]3281  echo "$ac_t""no" 1>&6
3282fi
3283
[b9ca4ba]3284
3285   
[37717818]3286echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
[11cfb6f7]3287echo "configure:3288: checking for Makefile.in in c/src/tests/sptests" >&5
[37717818]3288if test -d $srcdir/c/src/tests/sptests; then
3289  rtems_av_save_dir=`pwd`;
3290  cd $srcdir;
[6f9c75c3]3291  rtems_av_tmp=`find c/src/tests/sptests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3292  makefiles="$makefiles $rtems_av_tmp";
3293  cd $rtems_av_save_dir;
3294  echo "$ac_t""done" 1>&6
3295else
3296  echo "$ac_t""no" 1>&6
3297fi
3298
[b9ca4ba]3299
3300   
[37717818]3301echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
[11cfb6f7]3302echo "configure:3303: checking for Makefile.in in c/src/tests/tmtests" >&5
[37717818]3303if test -d $srcdir/c/src/tests/tmtests; then
3304  rtems_av_save_dir=`pwd`;
3305  cd $srcdir;
[6f9c75c3]3306  rtems_av_tmp=`find c/src/tests/tmtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3307  makefiles="$makefiles $rtems_av_tmp";
3308  cd $rtems_av_save_dir;
3309  echo "$ac_t""done" 1>&6
3310else
3311  echo "$ac_t""no" 1>&6
3312fi
3313
[b9ca4ba]3314
3315   
[37717818]3316echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
[11cfb6f7]3317echo "configure:3318: checking for Makefile.in in c/src/tests/mptests" >&5
[37717818]3318if test -d $srcdir/c/src/tests/mptests; then
3319  rtems_av_save_dir=`pwd`;
3320  cd $srcdir;
[6f9c75c3]3321  rtems_av_tmp=`find c/src/tests/mptests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3322  makefiles="$makefiles $rtems_av_tmp";
3323  cd $rtems_av_save_dir;
3324  echo "$ac_t""done" 1>&6
3325else
3326  echo "$ac_t""no" 1>&6
[254b4450]3327fi
3328
[b9ca4ba]3329
[9829978]3330   if test "$RTEMS_HAS_POSIX_API" = "yes"; then
[37717818]3331     
3332echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6
[11cfb6f7]3333echo "configure:3334: checking for Makefile.in in c/src/tests/psxtests" >&5
[37717818]3334if test -d $srcdir/c/src/tests/psxtests; then
3335  rtems_av_save_dir=`pwd`;
3336  cd $srcdir;
[6f9c75c3]3337  rtems_av_tmp=`find c/src/tests/psxtests -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3338  makefiles="$makefiles $rtems_av_tmp";
3339  cd $rtems_av_save_dir;
3340  echo "$ac_t""done" 1>&6
3341else
3342  echo "$ac_t""no" 1>&6
3343fi
[254b4450]3344
[37717818]3345
[b9ca4ba]3346   fi
3347fi
[37717818]3348
3349# If the HWAPI is enabled, the find the HWAPI Makefiles
[70dda0ea]3350echo $ac_n "checking if the HWAPI is enabled? ""... $ac_c" 1>&6
[11cfb6f7]3351echo "configure:3352: checking if the HWAPI is enabled? " >&5
[d4cf164]3352# Check whether --enable-hwapi or --disable-hwapi was given.
3353if test "${enable_hwapi+set}" = set; then
3354  enableval="$enable_hwapi"
3355  \
[b9ca4ba]3356  case "${enableval}" in
3357    yes) echo "$ac_t""yes" 1>&6
[80a16ec4]3358         if test -f ${srcdir}/c/src/lib/libhwapi/Makefile.in ; then
3359            makefiles="$makefiles c/src/lib/libhwapi/Makefile"
3360           
3361echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6
[11cfb6f7]3362echo "configure:3363: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
[80a16ec4]3363if test -d $srcdir/c/src/lib/libhwapi/analog; then
3364  rtems_av_save_dir=`pwd`;
3365  cd $srcdir;
[6f9c75c3]3366  rtems_av_tmp=`find c/src/lib/libhwapi/analog -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[80a16ec4]3367  makefiles="$makefiles $rtems_av_tmp";
3368  cd $rtems_av_save_dir;
3369  echo "$ac_t""done" 1>&6
3370else
3371  echo "$ac_t""no" 1>&6
3372fi
3373
3374
3375           
3376echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
[11cfb6f7]3377echo "configure:3378: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
[80a16ec4]3378if test -d $srcdir/c/src/lib/libhwapi/discrete; then
3379  rtems_av_save_dir=`pwd`;
3380  cd $srcdir;
[6f9c75c3]3381  rtems_av_tmp=`find c/src/lib/libhwapi/discrete -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[80a16ec4]3382  makefiles="$makefiles $rtems_av_tmp";
3383  cd $rtems_av_save_dir;
3384  echo "$ac_t""done" 1>&6
3385else
3386  echo "$ac_t""no" 1>&6
3387fi
3388
3389
3390           
3391echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
[11cfb6f7]3392echo "configure:3393: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
[80a16ec4]3393if test -d $srcdir/c/src/lib/libhwapi/drivers; then
3394  rtems_av_save_dir=`pwd`;
3395  cd $srcdir;
[6f9c75c3]3396  rtems_av_tmp=`find c/src/lib/libhwapi/drivers -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[80a16ec4]3397  makefiles="$makefiles $rtems_av_tmp";
3398  cd $rtems_av_save_dir;
3399  echo "$ac_t""done" 1>&6
3400else
3401  echo "$ac_t""no" 1>&6
3402fi
3403
3404
3405           
[6d6f1b34]3406echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
[11cfb6f7]3407echo "configure:3408: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
[6d6f1b34]3408if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then
[37717818]3409  rtems_av_save_dir=`pwd`;
3410  cd $srcdir;
[6d6f1b34]3411  rtems_av_tmp=`find c/src/lib/libhwapi/non_volatile_memory -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3412  makefiles="$makefiles $rtems_av_tmp";
3413  cd $rtems_av_save_dir;
3414  echo "$ac_t""done" 1>&6
[d4cf164]3415else
[37717818]3416  echo "$ac_t""no" 1>&6
3417fi
3418
[80a16ec4]3419
3420           
3421echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
[11cfb6f7]3422echo "configure:3423: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
[80a16ec4]3423if test -d $srcdir/c/src/lib/libhwapi/serial; then
3424  rtems_av_save_dir=`pwd`;
3425  cd $srcdir;
[6f9c75c3]3426  rtems_av_tmp=`find c/src/lib/libhwapi/serial -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[80a16ec4]3427  makefiles="$makefiles $rtems_av_tmp";
3428  cd $rtems_av_save_dir;
3429  echo "$ac_t""done" 1>&6
3430else
3431  echo "$ac_t""no" 1>&6
3432fi
3433
3434
3435           
3436echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
[11cfb6f7]3437echo "configure:3438: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
[80a16ec4]3438if test -d $srcdir/c/src/lib/libhwapi/support; then
3439  rtems_av_save_dir=`pwd`;
3440  cd $srcdir;
[6f9c75c3]3441  rtems_av_tmp=`find c/src/lib/libhwapi/support -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[80a16ec4]3442  makefiles="$makefiles $rtems_av_tmp";
3443  cd $rtems_av_save_dir;
3444  echo "$ac_t""done" 1>&6
3445else
3446  echo "$ac_t""no" 1>&6
3447fi
3448
3449
3450           
3451echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
[11cfb6f7]3452echo "configure:3453: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
[80a16ec4]3453if test -d $srcdir/c/src/lib/libhwapi/wrapup; then
3454  rtems_av_save_dir=`pwd`;
3455  cd $srcdir;
[6f9c75c3]3456  rtems_av_tmp=`find c/src/lib/libhwapi/wrapup -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[80a16ec4]3457  makefiles="$makefiles $rtems_av_tmp";
3458  cd $rtems_av_save_dir;
3459  echo "$ac_t""done" 1>&6
3460else
3461  echo "$ac_t""no" 1>&6
3462fi
3463
3464
3465         else
3466            { echo "configure: error: No source code found for the HWAPI" 1>&2; exit 1; }
3467         fi
3468         ;;
[b9ca4ba]3469    no)  echo "$ac_t""no" 1>&6 ;;
3470    *)  { echo "configure: error: bad value ${enableval} for hwapi option" 1>&2; exit 1; } ;;
3471  esac
[37717818]3472else
[b9ca4ba]3473  echo "$ac_t""no" 1>&6
[37717818]3474
[254b4450]3475fi
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
[e2d79559]3487
[e412bae]3488
[1f0f3e35]3489
[91333c2]3490
[0b76723]3491
[bd5e4f3b]3492
3493
[946b3cb]3494
3495
[cce81a7]3496
[2c3840b]3497
[cce81a7]3498
[37717818]3499# pick up all the Makefiles in required parts of the tree
3500
3501echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6
[11cfb6f7]3502echo "configure:3503: checking for Makefile.in in c/build-tools" >&5
[37717818]3503if test -d $srcdir/c/build-tools; then
3504  rtems_av_save_dir=`pwd`;
3505  cd $srcdir;
[6f9c75c3]3506  rtems_av_tmp=`find c/build-tools -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3507  makefiles="$makefiles $rtems_av_tmp";
3508  cd $rtems_av_save_dir;
3509  echo "$ac_t""done" 1>&6
3510else
3511  echo "$ac_t""no" 1>&6
3512fi
3513
3514
3515
[6d6f1b34]3516echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
[11cfb6f7]3517echo "configure:3518: checking for Makefile.in in make" >&5
[6d6f1b34]3518if test -d $srcdir/make; then
[37717818]3519  rtems_av_save_dir=`pwd`;
3520  cd $srcdir;
[6d6f1b34]3521  rtems_av_tmp=`find make -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3522  makefiles="$makefiles $rtems_av_tmp";
3523  cd $rtems_av_save_dir;
3524  echo "$ac_t""done" 1>&6
3525else
3526  echo "$ac_t""no" 1>&6
3527fi
3528
3529
3530
3531echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
[11cfb6f7]3532echo "configure:3533: checking for Makefile.in in c/src/lib/libmisc" >&5
[37717818]3533if test -d $srcdir/c/src/lib/libmisc; then
3534  rtems_av_save_dir=`pwd`;
3535  cd $srcdir;
[6f9c75c3]3536  rtems_av_tmp=`find c/src/lib/libmisc -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3537  makefiles="$makefiles $rtems_av_tmp";
3538  cd $rtems_av_save_dir;
3539  echo "$ac_t""done" 1>&6
3540else
3541  echo "$ac_t""no" 1>&6
3542fi
3543
3544
[1670eede]3545
[37717818]3546echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
[11cfb6f7]3547echo "configure:3548: checking for Makefile.in in c/src/tests/samples" >&5
[37717818]3548if test -d $srcdir/c/src/tests/samples; then
3549  rtems_av_save_dir=`pwd`;
3550  cd $srcdir;
[6f9c75c3]3551  rtems_av_tmp=`find c/src/tests/samples -name "Makefile.in" -print | sed "s/Makefile\.in/%/" | sort | sed "s/%/Makefile/"`
[37717818]3552  makefiles="$makefiles $rtems_av_tmp";
3553  cd $rtems_av_save_dir;
3554  echo "$ac_t""done" 1>&6
3555else
3556  echo "$ac_t""no" 1>&6
3557fi
3558
3559
3560
[bb9084db]3561
3562
[37717818]3563# try not to explicitly list a Makefile here
[254b4450]3564trap '' 1 2 15
3565cat > confcache <<\EOF
3566# This file is a shell script that caches the results of configure
3567# tests run on this system so they can be shared between configure
3568# scripts and configure runs.  It is not useful on other systems.
3569# If it contains results you don't want to keep, you may remove or edit it.
3570#
3571# By default, configure uses ./config.cache as the cache file,
3572# creating it if it does not exist already.  You can give configure
3573# the --cache-file=FILE option to use a different cache file; that is
3574# what configure does when it calls configure scripts in
3575# subdirectories, so they share the cache.
3576# Giving --cache-file=/dev/null disables caching, for debugging configure.
3577# config.status only pays attention to the cache file if you give it the
3578# --recheck option to rerun configure.
3579#
3580EOF
3581# The following way of writing the cache mishandles newlines in values,
3582# but we know of no workaround that is simple, portable, and efficient.
3583# So, don't put newlines in cache variables' values.
3584# Ultrix sh set writes to stderr and can't be redirected directly,
3585# and sets the high bit in the cache file unless we assign to the vars.
3586(set) 2>&1 |
3587  case `(ac_space=' '; set) 2>&1` in
3588  *ac_space=\ *)
3589    # `set' does not quote correctly, so add quotes (double-quote substitution
3590    # turns \\\\ into \\, and sed turns \\ into \).
3591    sed -n \
3592      -e "s/'/'\\\\''/g" \
3593      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3594    ;;
3595  *)
3596    # `set' quotes correctly as required by POSIX, so do not add quotes.
3597    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3598    ;;
3599  esac >> confcache
3600if cmp -s $cache_file confcache; then
3601  :
3602else
3603  if test -w $cache_file; then
3604    echo "updating cache $cache_file"
3605    cat confcache > $cache_file
3606  else
3607    echo "not updating unwritable cache $cache_file"
3608  fi
3609fi
3610rm -f confcache
3611
3612trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3613
3614test "x$prefix" = xNONE && prefix=$ac_default_prefix
3615# Let make expand exec_prefix.
3616test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3617
3618# Any assignment to VPATH causes Sun make to only execute
3619# the first set of double-colon rules, so remove it if not needed.
3620# If there is a colon in the path, we need to keep it.
3621if test "x$srcdir" = x.; then
3622  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3623fi
3624
3625trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3626
[bb9084db]3627DEFS=-DHAVE_CONFIG_H
[254b4450]3628
3629# Without the "./", some shells look in PATH for config.status.
3630: ${CONFIG_STATUS=./config.status}
3631
3632echo creating $CONFIG_STATUS
3633rm -f $CONFIG_STATUS
3634cat > $CONFIG_STATUS <<EOF
3635#! /bin/sh
3636# Generated automatically by configure.
3637# Run this file to recreate the current configuration.
3638# This directory was configured as follows,
3639# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3640#
3641# $0 $ac_configure_args
3642#
3643# Compiler output produced by configure, useful for debugging
3644# configure, is in ./config.log if it exists.
3645
3646ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3647for ac_option
3648do
3649  case "\$ac_option" in
3650  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3651    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3652    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3653  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3654    echo "$CONFIG_STATUS generated by autoconf version 2.12"
3655    exit 0 ;;
3656  -help | --help | --hel | --he | --h)
3657    echo "\$ac_cs_usage"; exit 0 ;;
3658  *) echo "\$ac_cs_usage"; exit 1 ;;
3659  esac
3660done
3661
3662ac_given_srcdir=$srcdir
[4fb08fd]3663ac_given_INSTALL="$INSTALL"
[254b4450]3664
[a50148a]3665trap 'rm -fr `echo "Makefile
[3771cc6e]3666make/host.cfg
3667make/target.cfg
3668make/Templates/Makefile.inc
[cce81a7]3669make/compilers/gcc.cfg
[a50148a]3670c/Makefile
3671c/src/Makefile
3672c/src/exec/Makefile
3673c/src/exec/score/Makefile
3674c/src/exec/score/cpu/Makefile
3675c/src/exec/score/headers/Makefile
[566aea7d]3676c/src/exec/score/${inline_dir}/Makefile
[a50148a]3677c/src/exec/score/src/Makefile
3678c/src/exec/score/tools/Makefile
3679c/src/exec/score/tools/generic/Makefile
[b9ca4ba]3680c/src/exec/wrapup/Makefile
3681c/src/exec/wrapup/rtems/Makefile
[a50148a]3682c/src/lib/Makefile
3683c/src/lib/include/Makefile
3684c/src/lib/libbsp/Makefile
3685c/src/lib/libbsp/shmdr/Makefile
3686c/src/lib/libc/Makefile
3687c/src/lib/libcpu/Makefile
3688c/src/lib/start/Makefile
3689c/src/lib/wrapup/Makefile
3690c/src/tests/Makefile
3691c/src/tests/support/Makefile
3692c/src/tests/support/include/Makefile
3693c/src/tests/support/stubdr/Makefile
3694c/src/tests/support/wrapup/Makefile
3695c/src/tests/tools/Makefile
3696c/src/tests/tools/generic/Makefile
3697$makefiles
[bb9084db]3698c/update-tools/Makefile c/build-tools/src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
[254b4450]3699EOF
3700cat >> $CONFIG_STATUS <<EOF
3701
3702# Protect against being on the right side of a sed subst in config.status.
3703sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3704 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3705$ac_vpsub
3706$extrasub
3707s%@CFLAGS@%$CFLAGS%g
3708s%@CPPFLAGS@%$CPPFLAGS%g
3709s%@CXXFLAGS@%$CXXFLAGS%g
3710s%@DEFS@%$DEFS%g
3711s%@LDFLAGS@%$LDFLAGS%g
3712s%@LIBS@%$LIBS%g
3713s%@exec_prefix@%$exec_prefix%g
3714s%@prefix@%$prefix%g
3715s%@program_transform_name@%$program_transform_name%g
3716s%@bindir@%$bindir%g
3717s%@sbindir@%$sbindir%g
3718s%@libexecdir@%$libexecdir%g
3719s%@datadir@%$datadir%g
3720s%@sysconfdir@%$sysconfdir%g
3721s%@sharedstatedir@%$sharedstatedir%g
3722s%@localstatedir@%$localstatedir%g
3723s%@libdir@%$libdir%g
3724s%@includedir@%$includedir%g
3725s%@oldincludedir@%$oldincludedir%g
3726s%@infodir@%$infodir%g
3727s%@mandir@%$mandir%g
3728s%@SET_MAKE@%$SET_MAKE%g
3729s%@host@%$host%g
3730s%@host_alias@%$host_alias%g
3731s%@host_cpu@%$host_cpu%g
3732s%@host_vendor@%$host_vendor%g
3733s%@host_os@%$host_os%g
3734s%@target@%$target%g
3735s%@target_alias@%$target_alias%g
3736s%@target_cpu@%$target_cpu%g
3737s%@target_vendor@%$target_vendor%g
3738s%@target_os@%$target_os%g
3739s%@build@%$build%g
3740s%@build_alias@%$build_alias%g
3741s%@build_cpu@%$build_cpu%g
3742s%@build_vendor@%$build_vendor%g
3743s%@build_os@%$build_os%g
[a50148a]3744s%@CAT@%$CAT%g
3745s%@RM@%$RM%g
3746s%@CP@%$CP%g
3747s%@MV@%$MV%g
3748s%@LN@%$LN%g
[37717818]3749s%@LN_S@%$LN_S%g
[a50148a]3750s%@CHMOD@%$CHMOD%g
3751s%@SORT@%$SORT%g
[4fb08fd]3752s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3753s%@INSTALL_DATA@%$INSTALL_DATA%g
[11cfb6f7]3754s%@PERL@%$PERL%g
[a50148a]3755s%@MKDIR@%$MKDIR%g
3756s%@TOUCH@%$TOUCH%g
3757s%@CMP@%$CMP%g
3758s%@SED@%$SED%g
3759s%@M4@%$M4%g
3760s%@KSH@%$KSH%g
[3771cc6e]3761s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
[fe2401b2]3762s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
[3771cc6e]3763s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
3764s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
3765s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
[98100d2]3766s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
[3771cc6e]3767s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
3768s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
3769s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
[fe2401b2]3770s%@CC@%$CC%g
[98100d2]3771s%@EXEEXT@%$EXEEXT%g
3772s%@GCCSED@%$GCCSED%g
[2c3840b]3773s%@RTEMS_GAS_CODE16@%$RTEMS_GAS_CODE16%g
[0b76723]3774s%@rtems_cv_prog_cc_cross@%$rtems_cv_prog_cc_cross%g
[87cec48]3775s%@RTEMS_BSP_LIST@%$RTEMS_BSP_LIST%g
[254b4450]3776s%@RTEMS_HOST@%$RTEMS_HOST%g
3777s%@RTEMS_LIBC_DIR@%$RTEMS_LIBC_DIR%g
[91333c2]3778s%@RTEMS_USE_OWN_PDIR@%$RTEMS_USE_OWN_PDIR%g
[254b4450]3779s%@RTEMS_HAS_POSIX_API@%$RTEMS_HAS_POSIX_API%g
[0280cb6]3780s%@RTEMS_HAS_NETWORKING@%$RTEMS_HAS_NETWORKING%g
[254b4450]3781s%@RTEMS_USE_MACROS@%$RTEMS_USE_MACROS%g
[91333c2]3782s%@RTEMS_HAS_CPLUSPLUS@%$RTEMS_HAS_CPLUSPLUS%g
[e412bae]3783s%@RTEMS_USE_GCC272@%$RTEMS_USE_GCC272%g
[550ca7d5]3784s%@BARE_CPU_CFLAGS@%$BARE_CPU_CFLAGS%g
3785s%@BARE_CPU_MODEL@%$BARE_CPU_MODEL%g
[254b4450]3786s%@PROJECT_ROOT@%$PROJECT_ROOT%g
3787s%@program_prefix@%$program_prefix%g
[cce81a7]3788s%@CC_CFLAGS_DEFAULT@%$CC_CFLAGS_DEFAULT%g
3789s%@CC_CFLAGS_DEBUG_V@%$CC_CFLAGS_DEBUG_V%g
[946b3cb]3790s%@CC_CFLAGS_PROFILE_V@%$CC_CFLAGS_PROFILE_V%g
3791s%@CC_LDFLAGS_PROFILE_V@%$CC_LDFLAGS_PROFILE_V%g
[254b4450]3792
3793CEOF
3794EOF
3795
3796cat >> $CONFIG_STATUS <<\EOF
3797
3798# Split the substitutions into bite-sized pieces for seds with
3799# small command number limits, like on Digital OSF/1 and HP-UX.
3800ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3801ac_file=1 # Number of current file.
3802ac_beg=1 # First line for current file.
3803ac_end=$ac_max_sed_cmds # Line after last line for current file.
3804ac_more_lines=:
3805ac_sed_cmds=""
3806while $ac_more_lines; do
3807  if test $ac_beg -gt 1; then
3808    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3809  else
3810    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3811  fi
3812  if test ! -s conftest.s$ac_file; then
3813    ac_more_lines=false
3814    rm -f conftest.s$ac_file
3815  else
3816    if test -z "$ac_sed_cmds"; then
3817      ac_sed_cmds="sed -f conftest.s$ac_file"
3818    else
3819      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3820    fi
3821    ac_file=`expr $ac_file + 1`
3822    ac_beg=$ac_end
3823    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3824  fi
3825done
3826if test -z "$ac_sed_cmds"; then
3827  ac_sed_cmds=cat
3828fi
3829EOF
3830
3831cat >> $CONFIG_STATUS <<EOF
3832
[a50148a]3833CONFIG_FILES=\${CONFIG_FILES-"Makefile
[3771cc6e]3834make/host.cfg
3835make/target.cfg
3836make/Templates/Makefile.inc
[cce81a7]3837make/compilers/gcc.cfg
[a50148a]3838c/Makefile
3839c/src/Makefile
3840c/src/exec/Makefile
3841c/src/exec/score/Makefile
3842c/src/exec/score/cpu/Makefile
3843c/src/exec/score/headers/Makefile
[566aea7d]3844c/src/exec/score/${inline_dir}/Makefile
[a50148a]3845c/src/exec/score/src/Makefile
3846c/src/exec/score/tools/Makefile
3847c/src/exec/score/tools/generic/Makefile
[b9ca4ba]3848c/src/exec/wrapup/Makefile
3849c/src/exec/wrapup/rtems/Makefile
[a50148a]3850c/src/lib/Makefile
3851c/src/lib/include/Makefile
3852c/src/lib/libbsp/Makefile
3853c/src/lib/libbsp/shmdr/Makefile
3854c/src/lib/libc/Makefile
3855c/src/lib/libcpu/Makefile
3856c/src/lib/start/Makefile
3857c/src/lib/wrapup/Makefile
3858c/src/tests/Makefile
3859c/src/tests/support/Makefile
3860c/src/tests/support/include/Makefile
3861c/src/tests/support/stubdr/Makefile
3862c/src/tests/support/wrapup/Makefile
3863c/src/tests/tools/Makefile
3864c/src/tests/tools/generic/Makefile
3865$makefiles
[1670eede]3866c/update-tools/Makefile"}
[254b4450]3867EOF
3868cat >> $CONFIG_STATUS <<\EOF
3869for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3870  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3871  case "$ac_file" in
3872  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3873       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3874  *) ac_file_in="${ac_file}.in" ;;
3875  esac
3876
3877  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3878
3879  # Remove last slash and all that follows it.  Not all systems have dirname.
3880  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3881  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3882    # The file is in a subdirectory.
3883    test ! -d "$ac_dir" && mkdir "$ac_dir"
3884    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3885    # A "../" for each directory in $ac_dir_suffix.
3886    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3887  else
3888    ac_dir_suffix= ac_dots=
3889  fi
3890
3891  case "$ac_given_srcdir" in
3892  .)  srcdir=.
3893      if test -z "$ac_dots"; then top_srcdir=.
3894      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3895  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3896  *) # Relative path.
3897    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3898    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3899  esac
3900
[4fb08fd]3901  case "$ac_given_INSTALL" in
3902  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3903  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3904  esac
[254b4450]3905
3906  echo creating "$ac_file"
3907  rm -f "$ac_file"
3908  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3909  case "$ac_file" in
3910  *Makefile*) ac_comsub="1i\\
3911# $configure_input" ;;
3912  *) ac_comsub= ;;
3913  esac
3914
3915  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3916  sed -e "$ac_comsub
3917s%@configure_input@%$configure_input%g
3918s%@srcdir@%$srcdir%g
3919s%@top_srcdir@%$top_srcdir%g
[4fb08fd]3920s%@INSTALL@%$INSTALL%g
[254b4450]3921" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3922fi; done
3923rm -f conftest.s*
3924
[bb9084db]3925# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3926# NAME is the cpp macro being defined and VALUE is the value it is being given.
3927#
3928# ac_d sets the value in "#define NAME VALUE" lines.
3929ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3930ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3931ac_dC='\3'
3932ac_dD='%g'
3933# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3934ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3935ac_uB='\([      ]\)%\1#\2define\3'
3936ac_uC=' '
3937ac_uD='\4%g'
3938# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3939ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3940ac_eB='$%\1#\2define\3'
3941ac_eC=' '
3942ac_eD='%g'
3943
3944if test "${CONFIG_HEADERS+set}" != set; then
3945EOF
3946cat >> $CONFIG_STATUS <<EOF
3947  CONFIG_HEADERS="c/build-tools/src/config.h"
3948EOF
3949cat >> $CONFIG_STATUS <<\EOF
3950fi
3951for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3952  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3953  case "$ac_file" in
3954  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3955       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3956  *) ac_file_in="${ac_file}.in" ;;
3957  esac
3958
3959  echo creating $ac_file
3960
3961  rm -f conftest.frag conftest.in conftest.out
3962  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3963  cat $ac_file_inputs > conftest.in
3964
3965EOF
3966
3967# Transform confdefs.h into a sed script conftest.vals that substitutes
3968# the proper values into config.h.in to produce config.h.  And first:
3969# Protect against being on the right side of a sed subst in config.status.
3970# Protect against being in an unquoted here document in config.status.
3971rm -f conftest.vals
3972cat > conftest.hdr <<\EOF
3973s/[\\&%]/\\&/g
3974s%[\\$`]%\\&%g
3975s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3976s%ac_d%ac_u%gp
3977s%ac_u%ac_e%gp
3978EOF
3979sed -n -f conftest.hdr confdefs.h > conftest.vals
3980rm -f conftest.hdr
3981
3982# This sed command replaces #undef with comments.  This is necessary, for
3983# example, in the case of _POSIX_SOURCE, which is predefined and required
3984# on some systems where configure will not decide to define it.
3985cat >> conftest.vals <<\EOF
3986s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3987EOF
3988
3989# Break up conftest.vals because some shells have a limit on
3990# the size of here documents, and old seds have small limits too.
3991
3992rm -f conftest.tail
3993while :
3994do
3995  ac_lines=`grep -c . conftest.vals`
3996  # grep -c gives empty output for an empty file on some AIX systems.
3997  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3998  # Write a limited-size here document to conftest.frag.
3999  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4000  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4001  echo 'CEOF
4002  sed -f conftest.frag conftest.in > conftest.out
4003  rm -f conftest.in
4004  mv conftest.out conftest.in
4005' >> $CONFIG_STATUS
4006  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4007  rm -f conftest.vals
4008  mv conftest.tail conftest.vals
4009done
4010rm -f conftest.vals
4011
4012cat >> $CONFIG_STATUS <<\EOF
4013  rm -f conftest.frag conftest.h
4014  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4015  cat conftest.in >> conftest.h
4016  rm -f conftest.in
4017  if cmp -s $ac_file conftest.h 2>/dev/null; then
4018    echo "$ac_file is unchanged"
4019    rm -f conftest.h
4020  else
4021    # Remove last slash and all that follows it.  Not all systems have dirname.
4022      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4023      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4024      # The file is in a subdirectory.
4025      test ! -d "$ac_dir" && mkdir "$ac_dir"
4026    fi
4027    rm -f $ac_file
4028    mv conftest.h $ac_file
4029  fi
4030fi; done
4031
[254b4450]4032EOF
4033cat >> $CONFIG_STATUS <<EOF
4034
4035EOF
4036cat >> $CONFIG_STATUS <<\EOF
4037
4038exit 0
4039EOF
4040chmod +x $CONFIG_STATUS
4041rm -fr confdefs* $ac_clean_files
4042test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4043
4044
4045echo
4046echo target architecture: $target_cpu.
4047echo available BSPs: $rtems_bsp.
[87cec48]4048echo \'make all\' will build the following BSPs: $RTEMS_BSP_LIST.
4049echo other BSPs can be built with \'make RTEMS_BSP=\"bsp1 bsp2 ...\"\'
[254b4450]4050echo
Note: See TracBrowser for help on using the repository browser.