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

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

Patch from Ralf Corsepius <corsepiu@…>:

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

CHANGES

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

APPLYING THE PATCH:

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

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