source: rtems/configure @ 4721cf1

4.104.114.84.95
Last change on this file since 4721cf1 was 4721cf1, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 3, 1998 at 11:54:14 PM

Patch from Emmanuel Raguet <raguet@…> to add remote debug server
and RPC support to RTEMS. Thanks. :) Email follows:

Hello,

For Xmas, here is the Remote Debugger on RTEMS !

Here are 2 patches for the Remote Debugger on RTEMS for pc386 from Linux
host :

  • one for RTEMS it self,
  • one for GDB-4.17.

1/ RTEMS patch
--------------

This patch adds 2 libraries :

  • a simplified SUN RPC library
  • the Remote Debugger library

The configuration command is the following :
../rtems4/configure --target=i386-rtemself --enable-rtemsbsp=pc386
--enable-rdbg

The SUN RPC library is built only if networking is set.
The RDBG library is built if networking and enable-rdbg are set.

The function used to initialize the debugger is :

rtems_rdbg_initialize ();

A special function has been created to force a task to be
in a "debug" state : enterRdbg().
The use of this function is not mandatory.

2/ GDB-4.17 patch
-----------------

This patch create a new RTEMS target for GDB-4.17.

The configuration command is the following :
./configure --enable-shared --target=i386RTEMS

To connect to a target, use :

target rtems [your_site_address]

Then, attach the target using : attach 1

And... Debug ;)

You can obtain the original GDB-4.17 on
ftp://ftp.debian.org/debian/dists/stable/main/source/devel/gdb_4.17.orig.tar.gz

This has been tested from a Debian 2.0.1 linux host.

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