source: rtems/configure @ 21bfd93

4.104.114.84.95
Last change on this file since 21bfd93 was cce81a7, checked in by Joel Sherrill <joel.sherrill@…>, on 08/21/98 at 17:43:22

A patch from Ralf Corsepius <corsepiu@…>:

Here is another patch to hopefully enhance rtems' configuration.

Motivation: Try to support other c-compilers besides gcc (I tried to
build rtems under Solaris using sun's WSPro c-compiler).

Here is a couple of small patches concerning the host compiler
configuration, which fix/work-around the worst problems when using sun's
WSPro c-compiler.

Changes:

  • Replaced make/compilers/gcc.cfg with make/compilers/gcc.cfg.in, ie. gcc.cfg is generated by configure now.
  • Removed a line containing a hard-coded "gcc" from gcc.cfg (BUG-fix).
  • Add -g to host compiler flags only if configure reported -g to work
  • Add -Wall to host compiler flags only if configure reported that the host compiler is gcc (WSPro's cc chokes on -Wall).
  • Some modifications to make/Makefile.in
  • Adapted make/custom/default.cfg to the new location of gcc.cfg

BTW, gcc.cfg/gcc.cfg.in seems to be full of unused code (DEBUG-VARIANTS
etc.) which deserves to be cleaned up, IMO.

IMO, a similar patch should be applied to gcc-target-default.cfg

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