source: rtems/configure @ 09213ec3

4.104.114.84.95
Last change on this file since 09213ec3 was 09213ec3, checked in by Joel Sherrill <joel.sherrill@…>, on 10/05/98 at 13:53:16

Patch from Ralf Corsepius <corsepiu@…>:

As mentioned in other mails before, there is are minor inconsistencies in the
posix custom/*cfg files.

Linux-posix.cfg sets RTEMS_BSP=posix
FreeBSD-posix.cfg sets RTEMS_BSP=posix
Solaris-posix.cfg first sets RTEMS_BSP=posix, later it sets

RTEMS_BSP=solaris2

  1. Setting RTEMS_BSP=posix is redunant to settings in default.cfg
  2. The solaris variant of setting RTEMS_BSP is merely non-functional.

The patch attached to this mail should clean up this issue.

The patch was tested by building the posix bsp under
i686-pc-linux-glibc1/glibc2 and Solaris2.6 (I did not run any
rtems program, however) The HPUX9 and FreeBSD configuration files
were adapted in analogy to the solaris and linux configurations.

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