source: rtems/c/src/exec/configure @ 936f288

4.104.114.84.95
Last change on this file since 936f288 was 473b4e5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/04/99 at 13:30:15

Regenerated.

  • Property mode set to 100644
File size: 83.3 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-rtems-inlines               enable RTEMS inline functions
25                                       (default:enabled, disable to use macros)"
26ac_help="$ac_help
27  --enable-gcc28                       enable use of gcc 2.8.x features"
28ac_help="$ac_help
29  --enable-libcdir=directory           set the directory for the C library"
30
31# Initialize some variables set by options.
32# The variables have the same names as the options, with
33# dashes changed to underlines.
34build=NONE
35cache_file=./config.cache
36exec_prefix=NONE
37host=NONE
38no_create=
39nonopt=NONE
40no_recursion=
41prefix=NONE
42program_prefix=NONE
43program_suffix=NONE
44program_transform_name=s,x,x,
45silent=
46site=
47srcdir=
48target=NONE
49verbose=
50x_includes=NONE
51x_libraries=NONE
52bindir='${exec_prefix}/bin'
53sbindir='${exec_prefix}/sbin'
54libexecdir='${exec_prefix}/libexec'
55datadir='${prefix}/share'
56sysconfdir='${prefix}/etc'
57sharedstatedir='${prefix}/com'
58localstatedir='${prefix}/var'
59libdir='${exec_prefix}/lib'
60includedir='${prefix}/include'
61oldincludedir='/usr/include'
62infodir='${prefix}/info'
63mandir='${prefix}/man'
64
65# Initialize some other variables.
66subdirs=
67MFLAGS= MAKEFLAGS=
68SHELL=${CONFIG_SHELL-/bin/sh}
69# Maximum number of lines to put in a shell here document.
70ac_max_here_lines=12
71
72ac_prev=
73for ac_option
74do
75
76  # If the previous option needs an argument, assign it.
77  if test -n "$ac_prev"; then
78    eval "$ac_prev=\$ac_option"
79    ac_prev=
80    continue
81  fi
82
83  case "$ac_option" in
84  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
85  *) ac_optarg= ;;
86  esac
87
88  # Accept the important Cygnus configure options, so we can diagnose typos.
89
90  case "$ac_option" in
91
92  -bindir | --bindir | --bindi | --bind | --bin | --bi)
93    ac_prev=bindir ;;
94  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
95    bindir="$ac_optarg" ;;
96
97  -build | --build | --buil | --bui | --bu)
98    ac_prev=build ;;
99  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
100    build="$ac_optarg" ;;
101
102  -cache-file | --cache-file | --cache-fil | --cache-fi \
103  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
104    ac_prev=cache_file ;;
105  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
106  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
107    cache_file="$ac_optarg" ;;
108
109  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
110    ac_prev=datadir ;;
111  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
112  | --da=*)
113    datadir="$ac_optarg" ;;
114
115  -disable-* | --disable-*)
116    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
117    # Reject names that are not valid shell variable names.
118    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
119      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120    fi
121    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122    eval "enable_${ac_feature}=no" ;;
123
124  -enable-* | --enable-*)
125    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
126    # Reject names that are not valid shell variable names.
127    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
128      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129    fi
130    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131    case "$ac_option" in
132      *=*) ;;
133      *) ac_optarg=yes ;;
134    esac
135    eval "enable_${ac_feature}='$ac_optarg'" ;;
136
137  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
138  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
139  | --exec | --exe | --ex)
140    ac_prev=exec_prefix ;;
141  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
142  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
143  | --exec=* | --exe=* | --ex=*)
144    exec_prefix="$ac_optarg" ;;
145
146  -gas | --gas | --ga | --g)
147    # Obsolete; use --with-gas.
148    with_gas=yes ;;
149
150  -help | --help | --hel | --he)
151    # Omit some internal or obsolete options to make the list less imposing.
152    # This message is too long to be a string in the A/UX 3.1 sh.
153    cat << EOF
154Usage: configure [options] [host]
155Options: [defaults in brackets after descriptions]
156Configuration:
157  --cache-file=FILE       cache test results in FILE
158  --help                  print this message
159  --no-create             do not create output files
160  --quiet, --silent       do not print \`checking...' messages
161  --version               print the version of autoconf that created configure
162Directory and file names:
163  --prefix=PREFIX         install architecture-independent files in PREFIX
164                          [$ac_default_prefix]
165  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
166                          [same as prefix]
167  --bindir=DIR            user executables in DIR [EPREFIX/bin]
168  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
169  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
170  --datadir=DIR           read-only architecture-independent data in DIR
171                          [PREFIX/share]
172  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
173  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
174                          [PREFIX/com]
175  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
176  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
177  --includedir=DIR        C header files in DIR [PREFIX/include]
178  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
179  --infodir=DIR           info documentation in DIR [PREFIX/info]
180  --mandir=DIR            man documentation in DIR [PREFIX/man]
181  --srcdir=DIR            find the sources in DIR [configure dir or ..]
182  --program-prefix=PREFIX prepend PREFIX to installed program names
183  --program-suffix=SUFFIX append SUFFIX to installed program names
184  --program-transform-name=PROGRAM
185                          run sed PROGRAM on installed program names
186EOF
187    cat << EOF
188Host type:
189  --build=BUILD           configure for building on BUILD [BUILD=HOST]
190  --host=HOST             configure for HOST [guessed]
191  --target=TARGET         configure for TARGET [TARGET=HOST]
192Features and packages:
193  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
194  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
195  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
196  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
197  --x-includes=DIR        X include files are in DIR
198  --x-libraries=DIR       X library files are in DIR
199EOF
200    if test -n "$ac_help"; then
201      echo "--enable and --with options recognized:$ac_help"
202    fi
203    exit 0 ;;
204
205  -host | --host | --hos | --ho)
206    ac_prev=host ;;
207  -host=* | --host=* | --hos=* | --ho=*)
208    host="$ac_optarg" ;;
209
210  -includedir | --includedir | --includedi | --included | --include \
211  | --includ | --inclu | --incl | --inc)
212    ac_prev=includedir ;;
213  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
214  | --includ=* | --inclu=* | --incl=* | --inc=*)
215    includedir="$ac_optarg" ;;
216
217  -infodir | --infodir | --infodi | --infod | --info | --inf)
218    ac_prev=infodir ;;
219  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
220    infodir="$ac_optarg" ;;
221
222  -libdir | --libdir | --libdi | --libd)
223    ac_prev=libdir ;;
224  -libdir=* | --libdir=* | --libdi=* | --libd=*)
225    libdir="$ac_optarg" ;;
226
227  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
228  | --libexe | --libex | --libe)
229    ac_prev=libexecdir ;;
230  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
231  | --libexe=* | --libex=* | --libe=*)
232    libexecdir="$ac_optarg" ;;
233
234  -localstatedir | --localstatedir | --localstatedi | --localstated \
235  | --localstate | --localstat | --localsta | --localst \
236  | --locals | --local | --loca | --loc | --lo)
237    ac_prev=localstatedir ;;
238  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
239  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
240  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
241    localstatedir="$ac_optarg" ;;
242
243  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
244    ac_prev=mandir ;;
245  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
246    mandir="$ac_optarg" ;;
247
248  -nfp | --nfp | --nf)
249    # Obsolete; use --without-fp.
250    with_fp=no ;;
251
252  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
253  | --no-cr | --no-c)
254    no_create=yes ;;
255
256  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
257  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
258    no_recursion=yes ;;
259
260  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
261  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
262  | --oldin | --oldi | --old | --ol | --o)
263    ac_prev=oldincludedir ;;
264  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
265  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
266  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
267    oldincludedir="$ac_optarg" ;;
268
269  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
270    ac_prev=prefix ;;
271  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
272    prefix="$ac_optarg" ;;
273
274  -program-prefix | --program-prefix | --program-prefi | --program-pref \
275  | --program-pre | --program-pr | --program-p)
276    ac_prev=program_prefix ;;
277  -program-prefix=* | --program-prefix=* | --program-prefi=* \
278  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
279    program_prefix="$ac_optarg" ;;
280
281  -program-suffix | --program-suffix | --program-suffi | --program-suff \
282  | --program-suf | --program-su | --program-s)
283    ac_prev=program_suffix ;;
284  -program-suffix=* | --program-suffix=* | --program-suffi=* \
285  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
286    program_suffix="$ac_optarg" ;;
287
288  -program-transform-name | --program-transform-name \
289  | --program-transform-nam | --program-transform-na \
290  | --program-transform-n | --program-transform- \
291  | --program-transform | --program-transfor \
292  | --program-transfo | --program-transf \
293  | --program-trans | --program-tran \
294  | --progr-tra | --program-tr | --program-t)
295    ac_prev=program_transform_name ;;
296  -program-transform-name=* | --program-transform-name=* \
297  | --program-transform-nam=* | --program-transform-na=* \
298  | --program-transform-n=* | --program-transform-=* \
299  | --program-transform=* | --program-transfor=* \
300  | --program-transfo=* | --program-transf=* \
301  | --program-trans=* | --program-tran=* \
302  | --progr-tra=* | --program-tr=* | --program-t=*)
303    program_transform_name="$ac_optarg" ;;
304
305  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
306  | -silent | --silent | --silen | --sile | --sil)
307    silent=yes ;;
308
309  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
310    ac_prev=sbindir ;;
311  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
312  | --sbi=* | --sb=*)
313    sbindir="$ac_optarg" ;;
314
315  -sharedstatedir | --sharedstatedir | --sharedstatedi \
316  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
317  | --sharedst | --shareds | --shared | --share | --shar \
318  | --sha | --sh)
319    ac_prev=sharedstatedir ;;
320  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
321  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
322  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
323  | --sha=* | --sh=*)
324    sharedstatedir="$ac_optarg" ;;
325
326  -site | --site | --sit)
327    ac_prev=site ;;
328  -site=* | --site=* | --sit=*)
329    site="$ac_optarg" ;;
330
331  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
332    ac_prev=srcdir ;;
333  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
334    srcdir="$ac_optarg" ;;
335
336  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
337  | --syscon | --sysco | --sysc | --sys | --sy)
338    ac_prev=sysconfdir ;;
339  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
340  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
341    sysconfdir="$ac_optarg" ;;
342
343  -target | --target | --targe | --targ | --tar | --ta | --t)
344    ac_prev=target ;;
345  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
346    target="$ac_optarg" ;;
347
348  -v | -verbose | --verbose | --verbos | --verbo | --verb)
349    verbose=yes ;;
350
351  -version | --version | --versio | --versi | --vers)
352    echo "configure generated by autoconf version 2.13"
353    exit 0 ;;
354
355  -with-* | --with-*)
356    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
357    # Reject names that are not valid shell variable names.
358    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
359      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360    fi
361    ac_package=`echo $ac_package| sed 's/-/_/g'`
362    case "$ac_option" in
363      *=*) ;;
364      *) ac_optarg=yes ;;
365    esac
366    eval "with_${ac_package}='$ac_optarg'" ;;
367
368  -without-* | --without-*)
369    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
370    # Reject names that are not valid shell variable names.
371    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
372      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373    fi
374    ac_package=`echo $ac_package| sed 's/-/_/g'`
375    eval "with_${ac_package}=no" ;;
376
377  --x)
378    # Obsolete; use --with-x.
379    with_x=yes ;;
380
381  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
382  | --x-incl | --x-inc | --x-in | --x-i)
383    ac_prev=x_includes ;;
384  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
385  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
386    x_includes="$ac_optarg" ;;
387
388  -x-libraries | --x-libraries | --x-librarie | --x-librari \
389  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
390    ac_prev=x_libraries ;;
391  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
392  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
393    x_libraries="$ac_optarg" ;;
394
395  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
396    ;;
397
398  *)
399    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
400      echo "configure: warning: $ac_option: invalid host type" 1>&2
401    fi
402    if test "x$nonopt" != xNONE; then
403      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
404    fi
405    nonopt="$ac_option"
406    ;;
407
408  esac
409done
410
411if test -n "$ac_prev"; then
412  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
413fi
414
415trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
416
417# File descriptor usage:
418# 0 standard input
419# 1 file creation
420# 2 errors and warnings
421# 3 some systems may open it to /dev/tty
422# 4 used on the Kubota Titan
423# 6 checking for... messages and results
424# 5 compiler messages saved in config.log
425if test "$silent" = yes; then
426  exec 6>/dev/null
427else
428  exec 6>&1
429fi
430exec 5>./config.log
431
432echo "\
433This file contains any messages produced by compilers while
434running configure, to aid debugging if configure makes a mistake.
435" 1>&5
436
437# Strip out --no-create and --no-recursion so they do not pile up.
438# Also quote any args containing shell metacharacters.
439ac_configure_args=
440for ac_arg
441do
442  case "$ac_arg" in
443  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
444  | --no-cr | --no-c) ;;
445  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
446  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
447  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
448  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
449  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450  esac
451done
452
453# NLS nuisances.
454# Only set these to C if already set.  These must not be set unconditionally
455# because not all systems understand e.g. LANG=C (notably SCO).
456# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
457# Non-C LC_CTYPE values break the ctype check.
458if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
459if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
460if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
461if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
462
463# confdefs.h avoids OS command line length limits that DEFS can exceed.
464rm -rf conftest* confdefs.h
465# AIX cpp loses on an empty file, so make sure it contains at least a newline.
466echo > confdefs.h
467
468# A filename unique to this package, relative to the directory that
469# configure is in, which we can look for to find out if srcdir is correct.
470ac_unique_file=score
471
472# Find the source files, if location was not specified.
473if test -z "$srcdir"; then
474  ac_srcdir_defaulted=yes
475  # Try the directory containing this script, then its parent.
476  ac_prog=$0
477  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
478  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
479  srcdir=$ac_confdir
480  if test ! -r $srcdir/$ac_unique_file; then
481    srcdir=..
482  fi
483else
484  ac_srcdir_defaulted=no
485fi
486if test ! -r $srcdir/$ac_unique_file; then
487  if test "$ac_srcdir_defaulted" = yes; then
488    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
489  else
490    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
491  fi
492fi
493srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
494
495# Prefer explicitly selected file to automatically selected ones.
496if test -z "$CONFIG_SITE"; then
497  if test "x$prefix" != xNONE; then
498    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
499  else
500    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
501  fi
502fi
503for ac_site_file in $CONFIG_SITE; do
504  if test -r "$ac_site_file"; then
505    echo "loading site script $ac_site_file"
506    . "$ac_site_file"
507  fi
508done
509
510if test -r "$cache_file"; then
511  echo "loading cache $cache_file"
512  . $cache_file
513else
514  echo "creating cache $cache_file"
515  > $cache_file
516fi
517
518ac_ext=c
519# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
520ac_cpp='$CPP $CPPFLAGS'
521ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
522ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
523cross_compiling=$ac_cv_prog_cc_cross
524
525ac_exeext=
526ac_objext=o
527if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
528  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
529  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
530    ac_n= ac_c='
531' ac_t='        '
532  else
533    ac_n=-n ac_c= ac_t=
534  fi
535else
536  ac_n= ac_c='\c' ac_t=
537fi
538
539
540# Check whether --with-target-subdir or --without-target-subdir was given.
541if test "${with_target_subdir+set}" = set; then
542  withval="$with_target_subdir"
543  TARGET_SUBDIR="$withval"
544else
545  TARGET_SUBDIR="."
546fi
547
548
549RTEMS_TOPdir="../../..";
550
551
552echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6
553echo "configure:554: checking for RTEMS Version" >&5
554if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
555RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
556sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
557else
558{ echo "configure: error: Unable to find ${RTEMS_TOPdir}/VERSION" 1>&2; exit 1; }
559fi
560if test -z "$RTEMS_VERSION"; then
561{ echo "configure: error: Unable to determine version" 1>&2; exit 1; }
562fi
563echo "$ac_t""$RTEMS_VERSION" 1>&6
564
565ac_aux_dir=
566for ac_dir in ../../.. $srcdir/../../..; do
567  if test -f $ac_dir/install-sh; then
568    ac_aux_dir=$ac_dir
569    ac_install_sh="$ac_aux_dir/install-sh -c"
570    break
571  elif test -f $ac_dir/install.sh; then
572    ac_aux_dir=$ac_dir
573    ac_install_sh="$ac_aux_dir/install.sh -c"
574    break
575  fi
576done
577if test -z "$ac_aux_dir"; then
578  { echo "configure: error: can not find install-sh or install.sh in ../../.. $srcdir/../../.." 1>&2; exit 1; }
579fi
580ac_config_guess=$ac_aux_dir/config.guess
581ac_config_sub=$ac_aux_dir/config.sub
582ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
583
584
585
586
587# Do some error checking and defaulting for the host and target type.
588# The inputs are:
589#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
590#
591# The rules are:
592# 1. You are not allowed to specify --host, --target, and nonopt at the
593#    same time.
594# 2. Host defaults to nonopt.
595# 3. If nonopt is not specified, then host defaults to the current host,
596#    as determined by config.guess.
597# 4. Target and build default to nonopt.
598# 5. If nonopt is not specified, then target and build default to host.
599
600# The aliases save the names the user supplied, while $host etc.
601# will get canonicalized.
602case $host---$target---$nonopt in
603NONE---*---* | *---NONE---* | *---*---NONE) ;;
604*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
605esac
606
607
608# Make sure we can run config.sub.
609if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
610else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
611fi
612
613echo $ac_n "checking host system type""... $ac_c" 1>&6
614echo "configure:615: checking host system type" >&5
615
616host_alias=$host
617case "$host_alias" in
618NONE)
619  case $nonopt in
620  NONE)
621    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
622    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
623    fi ;;
624  *) host_alias=$nonopt ;;
625  esac ;;
626esac
627
628host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
629host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
630host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
631host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
632echo "$ac_t""$host" 1>&6
633
634echo $ac_n "checking target system type""... $ac_c" 1>&6
635echo "configure:636: checking target system type" >&5
636
637target_alias=$target
638case "$target_alias" in
639NONE)
640  case $nonopt in
641  NONE) target_alias=$host_alias ;;
642  *) target_alias=$nonopt ;;
643  esac ;;
644esac
645
646target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
647target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
648target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
649target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
650echo "$ac_t""$target" 1>&6
651
652echo $ac_n "checking build system type""... $ac_c" 1>&6
653echo "configure:654: checking build system type" >&5
654
655build_alias=$build
656case "$build_alias" in
657NONE)
658  case $nonopt in
659  NONE) build_alias=$host_alias ;;
660  *) build_alias=$nonopt ;;
661  esac ;;
662esac
663
664build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
665build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
666build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
667build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
668echo "$ac_t""$build" 1>&6
669
670test "$host_alias" != "$target_alias" &&
671  test "$program_prefix$program_suffix$program_transform_name" = \
672    NONENONEs,x,x, &&
673  program_prefix=${target_alias}-
674
675echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
676echo "configure:677: checking rtems target cpu" >&5
677case "${target}" in
678  # hpux unix port should go here
679  i[3456]86-go32-rtems*)
680        RTEMS_CPU=i386
681        ;;
682  i[3456]86-pc-linux*)          # unix "simulator" port
683        RTEMS_CPU=unix
684        ;;
685  i[3456]86-*freebsd2*)         # unix "simulator" port
686        RTEMS_CPU=unix
687        ;;
688  no_cpu-*rtems*)
689        RTEMS_CPU=no_cpu
690        ;;
691  sparc-sun-solaris*)           # unix "simulator" port
692        RTEMS_CPU=unix
693        ;;
694  *)
695        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
696        ;;
697esac
698
699echo "$ac_t""$RTEMS_CPU" 1>&6
700
701
702# Find a good install program.  We prefer a C program (faster),
703# so one script is as good as another.  But avoid the broken or
704# incompatible versions:
705# SysV /etc/install, /usr/sbin/install
706# SunOS /usr/etc/install
707# IRIX /sbin/install
708# AIX /bin/install
709# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
710# AFS /usr/afsws/bin/install, which mishandles nonexistent args
711# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
712# ./install, which can be erroneously created by make from ./install.sh.
713echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
714echo "configure:715: checking for a BSD compatible install" >&5
715if test -z "$INSTALL"; then
716if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
717  echo $ac_n "(cached) $ac_c" 1>&6
718else
719    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
720  for ac_dir in $PATH; do
721    # Account for people who put trailing slashes in PATH elements.
722    case "$ac_dir/" in
723    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
724    *)
725      # OSF1 and SCO ODT 3.0 have their own names for install.
726      # Don't use installbsd from OSF since it installs stuff as root
727      # by default.
728      for ac_prog in ginstall scoinst install; do
729        if test -f $ac_dir/$ac_prog; then
730          if test $ac_prog = install &&
731            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
732            # AIX install.  It has an incompatible calling convention.
733            :
734          else
735            ac_cv_path_install="$ac_dir/$ac_prog -c"
736            break 2
737          fi
738        fi
739      done
740      ;;
741    esac
742  done
743  IFS="$ac_save_IFS"
744
745fi
746  if test "${ac_cv_path_install+set}" = set; then
747    INSTALL="$ac_cv_path_install"
748  else
749    # As a last resort, use the slow shell script.  We don't cache a
750    # path for INSTALL within a source directory, because that will
751    # break other packages using the cache if that directory is
752    # removed, or if the path is relative.
753    INSTALL="$ac_install_sh"
754  fi
755fi
756echo "$ac_t""$INSTALL" 1>&6
757
758# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
759# It thinks the first close brace ends the variable substitution.
760test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
761
762test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
763
764test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
765
766echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
767echo "configure:768: checking whether build environment is sane" >&5
768# Just in case
769sleep 1
770echo timestamp > conftestfile
771# Do `set' in a subshell so we don't clobber the current shell's
772# arguments.  Must try -L first in case configure is actually a
773# symlink; some systems play weird games with the mod time of symlinks
774# (eg FreeBSD returns the mod time of the symlink's containing
775# directory).
776if (
777   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
778   if test "$*" = "X"; then
779      # -L didn't work.
780      set X `ls -t $srcdir/configure conftestfile`
781   fi
782   if test "$*" != "X $srcdir/configure conftestfile" \
783      && test "$*" != "X conftestfile $srcdir/configure"; then
784
785      # If neither matched, then we have a broken ls.  This can happen
786      # if, for instance, CONFIG_SHELL is bash and it inherits a
787      # broken ls alias from the environment.  This has actually
788      # happened.  Such a system could not be considered "sane".
789      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
790alias in your environment" 1>&2; exit 1; }
791   fi
792
793   test "$2" = conftestfile
794   )
795then
796   # Ok.
797   :
798else
799   { echo "configure: error: newly created file is older than distributed files!
800Check your system clock" 1>&2; exit 1; }
801fi
802rm -f conftest*
803echo "$ac_t""yes" 1>&6
804if test "$program_transform_name" = s,x,x,; then
805  program_transform_name=
806else
807  # Double any \ or $.  echo might interpret backslashes.
808  cat <<\EOF_SED > conftestsed
809s,\\,\\\\,g; s,\$,$$,g
810EOF_SED
811  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
812  rm -f conftestsed
813fi
814test "$program_prefix" != NONE &&
815  program_transform_name="s,^,${program_prefix},; $program_transform_name"
816# Use a double $ so make ignores it.
817test "$program_suffix" != NONE &&
818  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
819
820# sed with no file args requires a program.
821test "$program_transform_name" = "" && program_transform_name="s,x,x,"
822
823echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
824echo "configure:825: checking whether ${MAKE-make} sets \${MAKE}" >&5
825set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
826if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
827  echo $ac_n "(cached) $ac_c" 1>&6
828else
829  cat > conftestmake <<\EOF
830all:
831        @echo 'ac_maketemp="${MAKE}"'
832EOF
833# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
834eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
835if test -n "$ac_maketemp"; then
836  eval ac_cv_prog_make_${ac_make}_set=yes
837else
838  eval ac_cv_prog_make_${ac_make}_set=no
839fi
840rm -f conftestmake
841fi
842if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
843  echo "$ac_t""yes" 1>&6
844  SET_MAKE=
845else
846  echo "$ac_t""no" 1>&6
847  SET_MAKE="MAKE=${MAKE-make}"
848fi
849
850
851
852PACKAGE=rtems-c-src-exec
853
854VERSION=$RTEMS_VERSION
855
856if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
857  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
858fi
859
860
861
862missing_dir=`cd $ac_aux_dir && pwd`
863echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
864echo "configure:865: checking for working aclocal" >&5
865# Run test in a subshell; some versions of sh will print an error if
866# an executable is not found, even if stderr is redirected.
867# Redirect stdin to placate older versions of autoconf.  Sigh.
868if (aclocal --version) < /dev/null > /dev/null 2>&1; then
869   ACLOCAL=aclocal
870   echo "$ac_t""found" 1>&6
871else
872   ACLOCAL="$missing_dir/missing aclocal"
873   echo "$ac_t""missing" 1>&6
874fi
875
876echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
877echo "configure:878: checking for working autoconf" >&5
878# Run test in a subshell; some versions of sh will print an error if
879# an executable is not found, even if stderr is redirected.
880# Redirect stdin to placate older versions of autoconf.  Sigh.
881if (autoconf --version) < /dev/null > /dev/null 2>&1; then
882   AUTOCONF=autoconf
883   echo "$ac_t""found" 1>&6
884else
885   AUTOCONF="$missing_dir/missing autoconf"
886   echo "$ac_t""missing" 1>&6
887fi
888
889echo $ac_n "checking for working automake""... $ac_c" 1>&6
890echo "configure:891: checking for working automake" >&5
891# Run test in a subshell; some versions of sh will print an error if
892# an executable is not found, even if stderr is redirected.
893# Redirect stdin to placate older versions of autoconf.  Sigh.
894if (automake --version) < /dev/null > /dev/null 2>&1; then
895   AUTOMAKE=automake
896   echo "$ac_t""found" 1>&6
897else
898   AUTOMAKE="$missing_dir/missing automake"
899   echo "$ac_t""missing" 1>&6
900fi
901
902echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
903echo "configure:904: checking for working autoheader" >&5
904# Run test in a subshell; some versions of sh will print an error if
905# an executable is not found, even if stderr is redirected.
906# Redirect stdin to placate older versions of autoconf.  Sigh.
907if (autoheader --version) < /dev/null > /dev/null 2>&1; then
908   AUTOHEADER=autoheader
909   echo "$ac_t""found" 1>&6
910else
911   AUTOHEADER="$missing_dir/missing autoheader"
912   echo "$ac_t""missing" 1>&6
913fi
914
915echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
916echo "configure:917: checking for working makeinfo" >&5
917# Run test in a subshell; some versions of sh will print an error if
918# an executable is not found, even if stderr is redirected.
919# Redirect stdin to placate older versions of autoconf.  Sigh.
920if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
921   MAKEINFO=makeinfo
922   echo "$ac_t""found" 1>&6
923else
924   MAKEINFO="$missing_dir/missing makeinfo"
925   echo "$ac_t""missing" 1>&6
926fi
927
928
929echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
930echo "configure:931: checking whether to enable maintainer-specific portions of Makefiles" >&5
931    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
932if test "${enable_maintainer_mode+set}" = set; then
933  enableval="$enable_maintainer_mode"
934  USE_MAINTAINER_MODE=$enableval
935else
936  USE_MAINTAINER_MODE=no
937fi
938
939  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
940 
941
942if test $USE_MAINTAINER_MODE = yes; then
943  MAINTAINER_MODE_TRUE=
944  MAINTAINER_MODE_FALSE='#'
945else
946  MAINTAINER_MODE_TRUE='#'
947  MAINTAINER_MODE_FALSE=
948fi
949  MAINT=$MAINTAINER_MODE_TRUE
950 
951
952
953# Check whether --enable-multiprocessing or --disable-multiprocessing was given.
954if test "${enable_multiprocessing+set}" = set; then
955  enableval="$enable_multiprocessing"
956  case "${enableval}" in
957  yes) RTEMS_HAS_MULTIPROCESSING=yes ;;
958  no) RTEMS_HAS_MULTIPROCESSING=no ;;
959  *)  { echo "configure: error: bad value ${enableval} for enable-multiprocessing option" 1>&2; exit 1; } ;;
960esac
961else
962  RTEMS_HAS_MULTIPROCESSING=no
963fi
964
965
966
967# Check whether --enable-posix or --disable-posix was given.
968if test "${enable_posix+set}" = set; then
969  enableval="$enable_posix"
970  case "${enableval}" in
971  yes) RTEMS_HAS_POSIX_API=yes ;;
972  no) RTEMS_HAS_POSIX_API=no ;;
973  *)  { echo "configure: error: bad value ${enableval} for enable-posix option" 1>&2; exit 1; } ;;
974esac
975else
976  RTEMS_HAS_POSIX_API=yes
977fi
978 
979
980
981case "${target}" in
982  # hpux unix port should go here
983  i[3456]86-go32-rtems*)
984        RTEMS_HAS_POSIX_API=no
985        ;;
986  i[3456]86-pc-linux*)         # unix "simulator" port
987        RTEMS_HAS_POSIX_API=no
988        ;;
989  i[3456]86-*freebsd2*) # unix "simulator" port
990        RTEMS_HAS_POSIX_API=no
991        ;;
992  no_cpu-*rtems*)
993        RTEMS_HAS_POSIX_API=no
994        ;;
995  sparc-sun-solaris*)             # unix "simulator" port
996        RTEMS_HAS_POSIX_API=no
997        ;;
998  *)
999        ;;
1000esac
1001
1002
1003# Check whether --enable-rtems-inlines or --disable-rtems-inlines was given.
1004if test "${enable_rtems_inlines+set}" = set; then
1005  enableval="$enable_rtems_inlines"
1006  case "${enableval}" in
1007  yes) RTEMS_USE_MACROS=no ;;
1008  no) RTEMS_USE_MACROS=yes ;;
1009  *)  { echo "configure: error: bad value ${enableval} for disable-rtems-inlines option" 1>&2; exit 1; } ;;
1010esac
1011else
1012  RTEMS_USE_MACROS=no
1013fi
1014
1015
1016
1017# Check whether --enable-gcc28 or --disable-gcc28 was given.
1018if test "${enable_gcc28+set}" = set; then
1019  enableval="$enable_gcc28"
1020  case "${enableval}" in
1021  yes) RTEMS_USE_GCC272=no ;;
1022  no) RTEMS_USE_GCC272=yes ;;
1023  *)  { echo "configure: error: bad value ${enableval} for gcc-28 option" 1>&2; exit 1; } ;;
1024esac
1025else
1026  RTEMS_USE_GCC272=no
1027fi
1028
1029
1030
1031# Check whether --enable-libcdir or --disable-libcdir was given.
1032if test "${enable_libcdir+set}" = set; then
1033  enableval="$enable_libcdir"
1034   RTEMS_LIBC_DIR="${enableval}" ; \
1035test -d ${enableval} || { echo "configure: error: "$enableval is not a directory" " 1>&2; exit 1; } 
1036fi
1037
1038
1039
1040echo $ac_n "checking for RTEMS_BSP""... $ac_c" 1>&6
1041echo "configure:1042: checking for RTEMS_BSP" >&5
1042if eval "test \"`echo '$''{'rtems_cv_RTEMS_BSP'+set}'`\" = set"; then
1043  echo $ac_n "(cached) $ac_c" 1>&6
1044else
1045    test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
1046
1047fi
1048if test -z "$rtems_cv_RTEMS_BSP"; then
1049  { echo "configure: error: Missing RTEMS_BSP" 1>&2; exit 1; }
1050fi
1051RTEMS_BSP="$rtems_cv_RTEMS_BSP"
1052echo "$ac_t""${RTEMS_BSP}" 1>&6
1053
1054
1055
1056
1057
1058# Is this a supported CPU?
1059echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
1060echo "configure:1061: checking if cpu $RTEMS_CPU is supported" >&5
1061if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
1062  echo "$ac_t""yes" 1>&6
1063else
1064  { echo "configure: error: no" 1>&2; exit 1; }
1065fi
1066
1067
1068RTEMS_HOST=$host_os
1069case "${target}" in
1070  # hpux unix port should go here
1071  i[3456]86-pc-linux*)         # unix "simulator" port
1072        RTEMS_HOST=Linux
1073        ;;
1074  i[3456]86-*freebsd2*) # unix "simulator" port
1075        RTEMS_HOST=FreeBSD
1076        ;;
1077  sparc-sun-solaris*)             # unix "simulator" port
1078        RTEMS_HOST=Solaris
1079        ;;
1080  *)
1081        ;;
1082esac
1083
1084
1085
1086
1087if test "$TARGET_SUBDIR" = "." ; then
1088PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
1089else
1090PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
1091fi
1092
1093
1094RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
1095
1096
1097INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
1098
1099
1100PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
1101
1102
1103
1104
1105if [ "${program_prefix}" = "NONE" ] ; then
1106  if [ "${target}" = "${host}" ] ; then
1107    program_prefix=
1108  else
1109    program_prefix=${target}-
1110  fi
1111fi
1112
1113
1114
1115
1116for ac_prog in "$program_prefix"gcc "$program_prefix"cc
1117do
1118# Extract the first word of "$ac_prog", so it can be a program name with args.
1119set dummy $ac_prog; ac_word=$2
1120echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1121echo "configure:1122: checking for $ac_word" >&5
1122if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
1123  echo $ac_n "(cached) $ac_c" 1>&6
1124else
1125  case "$CC_FOR_TARGET" in
1126  /*)
1127  ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a path.
1128  ;;
1129  ?:/*)                 
1130  ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a dos path.
1131  ;;
1132  *)
1133  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1134  ac_dummy="$PATH"
1135  for ac_dir in $ac_dummy; do
1136    test -z "$ac_dir" && ac_dir=.
1137    if test -f $ac_dir/$ac_word; then
1138      ac_cv_path_CC_FOR_TARGET="$ac_dir/$ac_word"
1139      break
1140    fi
1141  done
1142  IFS="$ac_save_ifs"
1143  ;;
1144esac
1145fi
1146CC_FOR_TARGET="$ac_cv_path_CC_FOR_TARGET"
1147if test -n "$CC_FOR_TARGET"; then
1148  echo "$ac_t""$CC_FOR_TARGET" 1>&6
1149else
1150  echo "$ac_t""no" 1>&6
1151fi
1152
1153test -n "$CC_FOR_TARGET" && break
1154done
1155
1156test -z "$CC_FOR_TARGET" \
1157  && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1158
1159rtems_save_CC=$CC
1160rtems_save_CFLAGS=$CFLAGS
1161
1162CC=$CC_FOR_TARGET
1163
1164echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1165echo "configure:1166: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1166
1167ac_ext=c
1168# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1169ac_cpp='$CPP $CPPFLAGS'
1170ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1171ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1172cross_compiling=$ac_cv_prog_cc_cross
1173
1174cat > conftest.$ac_ext << EOF
1175
1176#line 1177 "configure"
1177#include "confdefs.h"
1178
1179main(){return(0);}
1180EOF
1181if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1182  ac_cv_prog_cc_works=yes
1183  # If we can't run a trivial program, we are probably using a cross compiler.
1184  if (./conftest; exit) 2>/dev/null; then
1185    ac_cv_prog_cc_cross=no
1186  else
1187    ac_cv_prog_cc_cross=yes
1188  fi
1189else
1190  echo "configure: failed program was:" >&5
1191  cat conftest.$ac_ext >&5
1192  ac_cv_prog_cc_works=no
1193fi
1194rm -fr conftest*
1195ac_ext=c
1196# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1197ac_cpp='$CPP $CPPFLAGS'
1198ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1199ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1200cross_compiling=$ac_cv_prog_cc_cross
1201
1202echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1203if test $ac_cv_prog_cc_works = no; then
1204  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1205fi
1206echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1207echo "configure:1208: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1208echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1209cross_compiling=$ac_cv_prog_cc_cross
1210
1211echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1212echo "configure:1213: checking whether we are using GNU C" >&5
1213if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1214  echo $ac_n "(cached) $ac_c" 1>&6
1215else
1216  cat > conftest.c <<EOF
1217#ifdef __GNUC__
1218  yes;
1219#endif
1220EOF
1221if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1222  ac_cv_prog_gcc=yes
1223else
1224  ac_cv_prog_gcc=no
1225fi
1226fi
1227
1228echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1229
1230if test $ac_cv_prog_gcc = yes; then
1231  GCC=yes
1232  ac_test_CFLAGS="${CFLAGS+set}"
1233  ac_save_CFLAGS="$CFLAGS"
1234  CFLAGS=
1235  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1236echo "configure:1237: checking whether ${CC-cc} accepts -g" >&5
1237if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1238  echo $ac_n "(cached) $ac_c" 1>&6
1239else
1240  echo 'void f(){}' > conftest.c
1241if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1242  ac_cv_prog_cc_g=yes
1243else
1244  ac_cv_prog_cc_g=no
1245fi
1246rm -f conftest*
1247
1248fi
1249
1250echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1251  if test "$ac_test_CFLAGS" = set; then
1252    CFLAGS="$ac_save_CFLAGS"
1253  elif test $ac_cv_prog_cc_g = yes; then
1254    CFLAGS="-g -O2"
1255  else
1256    CFLAGS="-O2"
1257  fi
1258else
1259  GCC=
1260  test "${CFLAGS+set}" = set || CFLAGS="-g"
1261fi
1262
1263rtems_cv_prog_gcc=$ac_cv_prog_gcc
1264rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
1265rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
1266rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
1267
1268CC=$rtems_save_CC
1269CFLAGS=$rtems_save_CFLAGS
1270
1271unset ac_cv_prog_gcc
1272unset ac_cv_prog_cc_g
1273unset ac_cv_prog_cc_works
1274unset ac_cv_prog_cc_cross
1275
1276
1277echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
1278echo "configure:1279: checking whether $CC_FOR_TARGET accepts -specs" >&5
1279if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
1280  echo $ac_n "(cached) $ac_c" 1>&6
1281else
1282 
1283rtems_cv_gcc_specs=no
1284if test "$rtems_cv_prog_gcc" = "yes"; then
1285  touch confspec
1286  echo 'void f(){}' >conftest.c
1287  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
1288    rtems_cv_gcc_specs=yes
1289  fi
1290fi
1291rm -f confspec conftest*
1292
1293fi
1294
1295echo "$ac_t""$rtems_cv_gcc_specs" 1>&6
1296 
1297
1298echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
1299echo "configure:1300: checking whether $CC_FOR_TARGET accepts --pipe" >&5
1300if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
1301  echo $ac_n "(cached) $ac_c" 1>&6
1302else
1303 
1304rtems_cv_gcc_pipe=no
1305if test "$rtems_cv_prog_gcc" = "yes"; then
1306case "$host_os" in
1307  cygwin*)
1308    ;;
1309  *)
1310    echo 'void f(){}' >conftest.c
1311    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
1312      rtems_cv_gcc_pipe=yes
1313    fi
1314    rm -f conftest*
1315    ;;
1316esac
1317fi
1318
1319fi
1320
1321echo "$ac_t""$rtems_cv_gcc_pipe" 1>&6
1322
1323if test "$RTEMS_USE_GCC272" != "yes" ; then
1324  if test "$rtems_cv_gcc_specs" = "no"; then
1325    echo "configure: warning: *** disabling --enable-gcc28" 1>&2
1326      RTEMS_USE_GCC272=yes
1327  fi
1328fi
1329test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
1330
1331case $host_os in
1332*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
1333*) ;;
1334esac
1335
1336
1337
1338 
1339echo $ac_n "checking target's ar""... $ac_c" 1>&6
1340echo "configure:1341: checking target's ar" >&5
1341if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1342  echo $ac_n "(cached) $ac_c" 1>&6
1343else
1344  :
1345fi
1346
1347echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
1348
1349if test -n "$ac_cv_path_AR_FOR_TARGET"; then
1350    AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
1351else
1352    if test -z "$AR_FOR_TARGET" ; then
1353    if test "$rtems_cv_prog_gcc" = "yes"; then
1354      # We are using gcc, ask it about its tool
1355      # NOTE: Necessary if gcc was configured to use the target's
1356      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1357       case $host_os in
1358  *cygwin*)
1359            AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar | sed -e 's%\\\\%/%g' `
1360    ;;
1361  *)
1362    AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
1363    ;;
1364  esac
1365
1366    fi
1367  else
1368    # The user set an environment variable.
1369    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1370    # will override the environment variable, which isn't what the user
1371    # intends
1372    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1373echo "configure:1374: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
1374    case "$AR_FOR_TARGET" in
1375    /*) # valid
1376      echo "$ac_t"""yes"" 1>&6
1377    ;;
1378    *)  # invalid for AC_PATH_PROG
1379      echo "$ac_t"""no"" 1>&6
1380      { echo "configure: error: ***
1381        Environment variable AR_FOR_TARGET should either
1382        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1383    ;;
1384    esac
1385  fi
1386
1387  # Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
1388set dummy "$program_prefix"ar; ac_word=$2
1389echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1390echo "configure:1391: checking for $ac_word" >&5
1391if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
1392  echo $ac_n "(cached) $ac_c" 1>&6
1393else
1394  case "$AR_FOR_TARGET" in
1395  /*)
1396  ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
1397  ;;
1398  ?:/*)                 
1399  ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
1400  ;;
1401  *)
1402  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1403  ac_dummy="$PATH"
1404  for ac_dir in $ac_dummy; do
1405    test -z "$ac_dir" && ac_dir=.
1406    if test -f $ac_dir/$ac_word; then
1407      ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
1408      break
1409    fi
1410  done
1411  IFS="$ac_save_ifs"
1412  test -z "$ac_cv_path_AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET="no"
1413  ;;
1414esac
1415fi
1416AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
1417if test -n "$AR_FOR_TARGET"; then
1418  echo "$ac_t""$AR_FOR_TARGET" 1>&6
1419else
1420  echo "$ac_t""no" 1>&6
1421fi
1422
1423fi
1424
1425 
1426echo $ac_n "checking target's as""... $ac_c" 1>&6
1427echo "configure:1428: checking target's as" >&5
1428if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
1429  echo $ac_n "(cached) $ac_c" 1>&6
1430else
1431  :
1432fi
1433
1434echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
1435
1436if test -n "$ac_cv_path_AS_FOR_TARGET"; then
1437    AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
1438else
1439    if test -z "$AS_FOR_TARGET" ; then
1440    if test "$rtems_cv_prog_gcc" = "yes"; then
1441      # We are using gcc, ask it about its tool
1442      # NOTE: Necessary if gcc was configured to use the target's
1443      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1444       case $host_os in
1445  *cygwin*)
1446            AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as | sed -e 's%\\\\%/%g' `
1447    ;;
1448  *)
1449    AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
1450    ;;
1451  esac
1452
1453    fi
1454  else
1455    # The user set an environment variable.
1456    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1457    # will override the environment variable, which isn't what the user
1458    # intends
1459    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1460echo "configure:1461: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
1461    case "$AS_FOR_TARGET" in
1462    /*) # valid
1463      echo "$ac_t"""yes"" 1>&6
1464    ;;
1465    *)  # invalid for AC_PATH_PROG
1466      echo "$ac_t"""no"" 1>&6
1467      { echo "configure: error: ***
1468        Environment variable AS_FOR_TARGET should either
1469        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1470    ;;
1471    esac
1472  fi
1473
1474  # Extract the first word of ""$program_prefix"as", so it can be a program name with args.
1475set dummy "$program_prefix"as; ac_word=$2
1476echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1477echo "configure:1478: checking for $ac_word" >&5
1478if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
1479  echo $ac_n "(cached) $ac_c" 1>&6
1480else
1481  case "$AS_FOR_TARGET" in
1482  /*)
1483  ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
1484  ;;
1485  ?:/*)                 
1486  ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
1487  ;;
1488  *)
1489  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1490  ac_dummy="$PATH"
1491  for ac_dir in $ac_dummy; do
1492    test -z "$ac_dir" && ac_dir=.
1493    if test -f $ac_dir/$ac_word; then
1494      ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
1495      break
1496    fi
1497  done
1498  IFS="$ac_save_ifs"
1499  test -z "$ac_cv_path_AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET="no"
1500  ;;
1501esac
1502fi
1503AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
1504if test -n "$AS_FOR_TARGET"; then
1505  echo "$ac_t""$AS_FOR_TARGET" 1>&6
1506else
1507  echo "$ac_t""no" 1>&6
1508fi
1509
1510fi
1511
1512 
1513echo $ac_n "checking target's ld""... $ac_c" 1>&6
1514echo "configure:1515: checking target's ld" >&5
1515if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
1516  echo $ac_n "(cached) $ac_c" 1>&6
1517else
1518  :
1519fi
1520
1521echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
1522
1523if test -n "$ac_cv_path_LD_FOR_TARGET"; then
1524    LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
1525else
1526    if test -z "$LD_FOR_TARGET" ; then
1527    if test "$rtems_cv_prog_gcc" = "yes"; then
1528      # We are using gcc, ask it about its tool
1529      # NOTE: Necessary if gcc was configured to use the target's
1530      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1531       case $host_os in
1532  *cygwin*)
1533            LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld | sed -e 's%\\\\%/%g' `
1534    ;;
1535  *)
1536    LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
1537    ;;
1538  esac
1539
1540    fi
1541  else
1542    # The user set an environment variable.
1543    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1544    # will override the environment variable, which isn't what the user
1545    # intends
1546    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1547echo "configure:1548: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
1548    case "$LD_FOR_TARGET" in
1549    /*) # valid
1550      echo "$ac_t"""yes"" 1>&6
1551    ;;
1552    *)  # invalid for AC_PATH_PROG
1553      echo "$ac_t"""no"" 1>&6
1554      { echo "configure: error: ***
1555        Environment variable LD_FOR_TARGET should either
1556        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1557    ;;
1558    esac
1559  fi
1560
1561  # Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
1562set dummy "$program_prefix"ld; ac_word=$2
1563echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1564echo "configure:1565: checking for $ac_word" >&5
1565if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
1566  echo $ac_n "(cached) $ac_c" 1>&6
1567else
1568  case "$LD_FOR_TARGET" in
1569  /*)
1570  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
1571  ;;
1572  ?:/*)                 
1573  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
1574  ;;
1575  *)
1576  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1577  ac_dummy="$PATH"
1578  for ac_dir in $ac_dummy; do
1579    test -z "$ac_dir" && ac_dir=.
1580    if test -f $ac_dir/$ac_word; then
1581      ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
1582      break
1583    fi
1584  done
1585  IFS="$ac_save_ifs"
1586  test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
1587  ;;
1588esac
1589fi
1590LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
1591if test -n "$LD_FOR_TARGET"; then
1592  echo "$ac_t""$LD_FOR_TARGET" 1>&6
1593else
1594  echo "$ac_t""no" 1>&6
1595fi
1596
1597fi
1598
1599 
1600echo $ac_n "checking target's nm""... $ac_c" 1>&6
1601echo "configure:1602: checking target's nm" >&5
1602if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
1603  echo $ac_n "(cached) $ac_c" 1>&6
1604else
1605  :
1606fi
1607
1608echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
1609
1610if test -n "$ac_cv_path_NM_FOR_TARGET"; then
1611    NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
1612else
1613    if test -z "$NM_FOR_TARGET" ; then
1614    if test "$rtems_cv_prog_gcc" = "yes"; then
1615      # We are using gcc, ask it about its tool
1616      # NOTE: Necessary if gcc was configured to use the target's
1617      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1618       case $host_os in
1619  *cygwin*)
1620            NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm | sed -e 's%\\\\%/%g' `
1621    ;;
1622  *)
1623    NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
1624    ;;
1625  esac
1626
1627    fi
1628  else
1629    # The user set an environment variable.
1630    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1631    # will override the environment variable, which isn't what the user
1632    # intends
1633    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1634echo "configure:1635: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
1635    case "$NM_FOR_TARGET" in
1636    /*) # valid
1637      echo "$ac_t"""yes"" 1>&6
1638    ;;
1639    *)  # invalid for AC_PATH_PROG
1640      echo "$ac_t"""no"" 1>&6
1641      { echo "configure: error: ***
1642        Environment variable NM_FOR_TARGET should either
1643        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1644    ;;
1645    esac
1646  fi
1647
1648  # Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
1649set dummy "$program_prefix"nm; ac_word=$2
1650echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1651echo "configure:1652: checking for $ac_word" >&5
1652if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
1653  echo $ac_n "(cached) $ac_c" 1>&6
1654else
1655  case "$NM_FOR_TARGET" in
1656  /*)
1657  ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
1658  ;;
1659  ?:/*)                 
1660  ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
1661  ;;
1662  *)
1663  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1664  ac_dummy="$PATH"
1665  for ac_dir in $ac_dummy; do
1666    test -z "$ac_dir" && ac_dir=.
1667    if test -f $ac_dir/$ac_word; then
1668      ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
1669      break
1670    fi
1671  done
1672  IFS="$ac_save_ifs"
1673  test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no"
1674  ;;
1675esac
1676fi
1677NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
1678if test -n "$NM_FOR_TARGET"; then
1679  echo "$ac_t""$NM_FOR_TARGET" 1>&6
1680else
1681  echo "$ac_t""no" 1>&6
1682fi
1683
1684fi
1685
1686
1687 
1688echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
1689echo "configure:1690: checking target's ranlib" >&5
1690if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
1691  echo $ac_n "(cached) $ac_c" 1>&6
1692else
1693  :
1694fi
1695
1696echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
1697
1698if test -n "$ac_cv_path_RANLIB_FOR_TARGET"; then
1699    RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
1700else
1701    if test -z "$RANLIB_FOR_TARGET" ; then
1702    if test "$rtems_cv_prog_gcc" = "yes"; then
1703      # We are using gcc, ask it about its tool
1704      # NOTE: Necessary if gcc was configured to use the target's
1705      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1706       case $host_os in
1707  *cygwin*)
1708            RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib | sed -e 's%\\\\%/%g' `
1709    ;;
1710  *)
1711    RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
1712    ;;
1713  esac
1714
1715    fi
1716  else
1717    # The user set an environment variable.
1718    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1719    # will override the environment variable, which isn't what the user
1720    # intends
1721    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1722echo "configure:1723: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
1723    case "$RANLIB_FOR_TARGET" in
1724    /*) # valid
1725      echo "$ac_t"""yes"" 1>&6
1726    ;;
1727    *)  # invalid for AC_PATH_PROG
1728      echo "$ac_t"""no"" 1>&6
1729      { echo "configure: error: ***
1730        Environment variable RANLIB_FOR_TARGET should either
1731        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1732    ;;
1733    esac
1734  fi
1735
1736  # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
1737set dummy "$program_prefix"ranlib; ac_word=$2
1738echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1739echo "configure:1740: checking for $ac_word" >&5
1740if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
1741  echo $ac_n "(cached) $ac_c" 1>&6
1742else
1743  case "$RANLIB_FOR_TARGET" in
1744  /*)
1745  ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
1746  ;;
1747  ?:/*)                 
1748  ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
1749  ;;
1750  *)
1751  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1752  ac_dummy="$PATH"
1753  for ac_dir in $ac_dummy; do
1754    test -z "$ac_dir" && ac_dir=.
1755    if test -f $ac_dir/$ac_word; then
1756      ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
1757      break
1758    fi
1759  done
1760  IFS="$ac_save_ifs"
1761  test -z "$ac_cv_path_RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET="no"
1762  ;;
1763esac
1764fi
1765RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
1766if test -n "$RANLIB_FOR_TARGET"; then
1767  echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
1768else
1769  echo "$ac_t""no" 1>&6
1770fi
1771
1772fi
1773
1774  if test "$RANLIB_FOR_TARGET" = "no"; then
1775    # ranlib wasn't found; check if ar -s is available
1776   
1777echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
1778echo "configure:1779: checking whether $AR_FOR_TARGET -s works" >&5
1779if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
1780  echo $ac_n "(cached) $ac_c" 1>&6
1781else
1782 
1783cat > conftest.$ac_ext <<EOF
1784int foo( int b )
1785{ return b; }
1786EOF
1787if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
1788  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
1789  && test -s conftest.a ; \
1790then
1791  rtems_cv_AR_FOR_TARGET_S="yes"
1792else
1793  rtems_cv_AR_FOR_TARGET_S="no"
1794fi
1795  rm -f conftest*
1796
1797fi
1798
1799echo "$ac_t""$rtems_cv_AR_FOR_TARGET_S" 1>&6
1800
1801    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
1802            ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
1803      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
1804    else
1805      { echo "configure: error: ***
1806        Can't figure out how to build a library index
1807        Neither ranlib nor ar -s seem to be available " 1>&2; exit 1; }
1808    fi
1809  fi
1810
1811 
1812echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
1813echo "configure:1814: checking target's objcopy" >&5
1814if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
1815  echo $ac_n "(cached) $ac_c" 1>&6
1816else
1817  :
1818fi
1819
1820echo "$ac_t""$ac_cv_path_OBJCOPY_FOR_TARGET" 1>&6
1821
1822if test -n "$ac_cv_path_OBJCOPY_FOR_TARGET"; then
1823    OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
1824else
1825    if test -z "$OBJCOPY_FOR_TARGET" ; then
1826    if test "$rtems_cv_prog_gcc" = "yes"; then
1827      # We are using gcc, ask it about its tool
1828      # NOTE: Necessary if gcc was configured to use the target's
1829      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1830       case $host_os in
1831  *cygwin*)
1832            OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy | sed -e 's%\\\\%/%g' `
1833    ;;
1834  *)
1835    OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy`
1836    ;;
1837  esac
1838
1839    fi
1840  else
1841    # The user set an environment variable.
1842    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1843    # will override the environment variable, which isn't what the user
1844    # intends
1845    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1846echo "configure:1847: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
1847    case "$OBJCOPY_FOR_TARGET" in
1848    /*) # valid
1849      echo "$ac_t"""yes"" 1>&6
1850    ;;
1851    *)  # invalid for AC_PATH_PROG
1852      echo "$ac_t"""no"" 1>&6
1853      { echo "configure: error: ***
1854        Environment variable OBJCOPY_FOR_TARGET should either
1855        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1856    ;;
1857    esac
1858  fi
1859
1860  # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
1861set dummy "$program_prefix"objcopy; ac_word=$2
1862echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1863echo "configure:1864: checking for $ac_word" >&5
1864if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
1865  echo $ac_n "(cached) $ac_c" 1>&6
1866else
1867  case "$OBJCOPY_FOR_TARGET" in
1868  /*)
1869  ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path.
1870  ;;
1871  ?:/*)                 
1872  ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a dos path.
1873  ;;
1874  *)
1875  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1876  ac_dummy="$PATH"
1877  for ac_dir in $ac_dummy; do
1878    test -z "$ac_dir" && ac_dir=.
1879    if test -f $ac_dir/$ac_word; then
1880      ac_cv_path_OBJCOPY_FOR_TARGET="$ac_dir/$ac_word"
1881      break
1882    fi
1883  done
1884  IFS="$ac_save_ifs"
1885  test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET="no"
1886  ;;
1887esac
1888fi
1889OBJCOPY_FOR_TARGET="$ac_cv_path_OBJCOPY_FOR_TARGET"
1890if test -n "$OBJCOPY_FOR_TARGET"; then
1891  echo "$ac_t""$OBJCOPY_FOR_TARGET" 1>&6
1892else
1893  echo "$ac_t""no" 1>&6
1894fi
1895
1896fi
1897
1898 
1899echo $ac_n "checking target's size""... $ac_c" 1>&6
1900echo "configure:1901: checking target's size" >&5
1901if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
1902  echo $ac_n "(cached) $ac_c" 1>&6
1903else
1904  :
1905fi
1906
1907echo "$ac_t""$ac_cv_path_SIZE_FOR_TARGET" 1>&6
1908
1909if test -n "$ac_cv_path_SIZE_FOR_TARGET"; then
1910    SIZE_FOR_TARGET=$ac_cv_path_SIZE_FOR_TARGET
1911else
1912    if test -z "$SIZE_FOR_TARGET" ; then
1913    if test "$rtems_cv_prog_gcc" = "yes"; then
1914      # We are using gcc, ask it about its tool
1915      # NOTE: Necessary if gcc was configured to use the target's
1916      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
1917       case $host_os in
1918  *cygwin*)
1919            SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size | sed -e 's%\\\\%/%g' `
1920    ;;
1921  *)
1922    SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size`
1923    ;;
1924  esac
1925
1926    fi
1927  else
1928    # The user set an environment variable.
1929    # Check whether it is an absolute path, otherwise AC_PATH_PROG
1930    # will override the environment variable, which isn't what the user
1931    # intends
1932    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
1933echo "configure:1934: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
1934    case "$SIZE_FOR_TARGET" in
1935    /*) # valid
1936      echo "$ac_t"""yes"" 1>&6
1937    ;;
1938    *)  # invalid for AC_PATH_PROG
1939      echo "$ac_t"""no"" 1>&6
1940      { echo "configure: error: ***
1941        Environment variable SIZE_FOR_TARGET should either
1942        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
1943    ;;
1944    esac
1945  fi
1946
1947  # Extract the first word of ""$program_prefix"size", so it can be a program name with args.
1948set dummy "$program_prefix"size; ac_word=$2
1949echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1950echo "configure:1951: checking for $ac_word" >&5
1951if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
1952  echo $ac_n "(cached) $ac_c" 1>&6
1953else
1954  case "$SIZE_FOR_TARGET" in
1955  /*)
1956  ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a path.
1957  ;;
1958  ?:/*)                 
1959  ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a dos path.
1960  ;;
1961  *)
1962  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1963  ac_dummy="$PATH"
1964  for ac_dir in $ac_dummy; do
1965    test -z "$ac_dir" && ac_dir=.
1966    if test -f $ac_dir/$ac_word; then
1967      ac_cv_path_SIZE_FOR_TARGET="$ac_dir/$ac_word"
1968      break
1969    fi
1970  done
1971  IFS="$ac_save_ifs"
1972  test -z "$ac_cv_path_SIZE_FOR_TARGET" && ac_cv_path_SIZE_FOR_TARGET="no"
1973  ;;
1974esac
1975fi
1976SIZE_FOR_TARGET="$ac_cv_path_SIZE_FOR_TARGET"
1977if test -n "$SIZE_FOR_TARGET"; then
1978  echo "$ac_t""$SIZE_FOR_TARGET" 1>&6
1979else
1980  echo "$ac_t""no" 1>&6
1981fi
1982
1983fi
1984
1985 
1986echo $ac_n "checking target's strip""... $ac_c" 1>&6
1987echo "configure:1988: checking target's strip" >&5
1988if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
1989  echo $ac_n "(cached) $ac_c" 1>&6
1990else
1991  :
1992fi
1993
1994echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
1995
1996if test -n "$ac_cv_path_STRIP_FOR_TARGET"; then
1997    STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
1998else
1999    if test -z "$STRIP_FOR_TARGET" ; then
2000    if test "$rtems_cv_prog_gcc" = "yes"; then
2001      # We are using gcc, ask it about its tool
2002      # NOTE: Necessary if gcc was configured to use the target's
2003      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
2004       case $host_os in
2005  *cygwin*)
2006            STRIP_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=strip | sed -e 's%\\\\%/%g' `
2007    ;;
2008  *)
2009    STRIP_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=strip`
2010    ;;
2011  esac
2012
2013    fi
2014  else
2015    # The user set an environment variable.
2016    # Check whether it is an absolute path, otherwise AC_PATH_PROG
2017    # will override the environment variable, which isn't what the user
2018    # intends
2019    echo $ac_n "checking whether environment variable STRIP_FOR_TARGET is an absolute path""... $ac_c" 1>&6
2020echo "configure:2021: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
2021    case "$STRIP_FOR_TARGET" in
2022    /*) # valid
2023      echo "$ac_t"""yes"" 1>&6
2024    ;;
2025    *)  # invalid for AC_PATH_PROG
2026      echo "$ac_t"""no"" 1>&6
2027      { echo "configure: error: ***
2028        Environment variable STRIP_FOR_TARGET should either
2029        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
2030    ;;
2031    esac
2032  fi
2033
2034  # Extract the first word of ""$program_prefix"strip", so it can be a program name with args.
2035set dummy "$program_prefix"strip; ac_word=$2
2036echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2037echo "configure:2038: checking for $ac_word" >&5
2038if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
2039  echo $ac_n "(cached) $ac_c" 1>&6
2040else
2041  case "$STRIP_FOR_TARGET" in
2042  /*)
2043  ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
2044  ;;
2045  ?:/*)                 
2046  ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
2047  ;;
2048  *)
2049  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2050  ac_dummy="$PATH"
2051  for ac_dir in $ac_dummy; do
2052    test -z "$ac_dir" && ac_dir=.
2053    if test -f $ac_dir/$ac_word; then
2054      ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
2055      break
2056    fi
2057  done
2058  IFS="$ac_save_ifs"
2059  test -z "$ac_cv_path_STRIP_FOR_TARGET" && ac_cv_path_STRIP_FOR_TARGET="no"
2060  ;;
2061esac
2062fi
2063STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
2064if test -n "$STRIP_FOR_TARGET"; then
2065  echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
2066else
2067  echo "$ac_t""no" 1>&6
2068fi
2069
2070fi
2071
2072
2073
2074echo $ac_n "checking for newlib""... $ac_c" 1>&6
2075echo "configure:2076: checking for newlib" >&5
2076if eval "test \"`echo '$''{'rtems_cv_use_newlib'+set}'`\" = set"; then
2077  echo $ac_n "(cached) $ac_c" 1>&6
2078else
2079 
2080    rtems_save_CC=$CC
2081    CC=$CC_FOR_TARGET
2082
2083    cat > conftest.$ac_ext <<EOF
2084#line 2085 "configure"
2085#include "confdefs.h"
2086extern int not_required_by_rtems() ;
2087int main() {
2088not_required_by_rtems()
2089; return 0; }
2090EOF
2091if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2092  rm -rf conftest*
2093  rtems_cv_use_newlib="yes"
2094else
2095  echo "configure: failed program was:" >&5
2096  cat conftest.$ac_ext >&5
2097fi
2098rm -f conftest*
2099
2100    if test -z "$rtems_cv_use_newlib"; then
2101      cat > conftest.$ac_ext <<EOF
2102#line 2103 "configure"
2103#include "confdefs.h"
2104extern int rtems_provides_crt0 ;
2105int main() {
2106rtems_provides_crt0 = 0
2107; return 0; }
2108EOF
2109if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2110  rm -rf conftest*
2111  rtems_cv_use_newlib="yes"
2112else
2113  echo "configure: failed program was:" >&5
2114  cat conftest.$ac_ext >&5
2115  rm -rf conftest*
2116  rtems_cv_use_newlib="no"
2117fi
2118rm -f conftest*
2119    fi
2120  CC=$rtems_save_CC
2121fi
2122
2123echo "$ac_t""$rtems_cv_use_newlib" 1>&6
2124RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
2125
2126
2127
2128# Check if there is custom/*.cfg for this BSP
2129echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
2130echo "configure:2131: checking for make/custom/$RTEMS_BSP.cfg" >&5
2131if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
2132  echo "$ac_t""yes" 1>&6
2133else
2134  { echo "configure: error: no" 1>&2; exit 1; }
2135fi
2136
2137echo $ac_n "checking whether BSP supports multiprocessing""... $ac_c" 1>&6
2138echo "configure:2139: checking whether BSP supports multiprocessing" >&5
2139if eval "test \"`echo '$''{'rtems_cv_HAS_MP'+set}'`\" = set"; then
2140  echo $ac_n "(cached) $ac_c" 1>&6
2141else
2142      if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP}/shmsupp"; then
2143      if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
2144        rtems_cv_HAS_MP="yes" ;
2145      else
2146        rtems_cv_HAS_MP="disabled";
2147      fi
2148    else
2149      rtems_cv_HAS_MP="no";
2150    fi
2151fi
2152
2153echo "$ac_t""$rtems_cv_HAS_MP" 1>&6
2154if test "$rtems_cv_HAS_MP" = "yes"; then
2155HAS_MP="yes"
2156else
2157HAS_MP="no"
2158fi
2159
2160
2161echo $ac_n "checking whether BSP supports libposix""... $ac_c" 1>&6
2162echo "configure:2163: checking whether BSP supports libposix" >&5
2163if eval "test \"`echo '$''{'rtems_cv_HAS_POSIX_API'+set}'`\" = set"; then
2164  echo $ac_n "(cached) $ac_c" 1>&6
2165else
2166      case "$RTEMS_CPU" in
2167    unix*)
2168      rtems_cv_HAS_POSIX_API="no"
2169      ;;
2170    *)
2171      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
2172        rtems_cv_HAS_POSIX_API="yes";
2173      else
2174        rtems_cv_HAS_POSIX_API="disabled";
2175      fi
2176      ;;
2177    esac
2178fi
2179
2180echo "$ac_t""$rtems_cv_HAS_POSIX_API" 1>&6
2181if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
2182  HAS_POSIX_API="yes";
2183else
2184  HAS_POSIX_API="no";
2185fi
2186
2187
2188# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
2189if test "$RTEMS_USE_MACROS" = "yes"; then
2190  INLINEdir="macros"
2191  if test "$HAS_POSIX_API" = "yes"; then
2192    # The problem is that there is currently no code in posix/macros :)
2193    { echo "configure: error: Macros are not implemented for the POSIX API" 1>&2; exit 1; }
2194  fi
2195else
2196  INLINEdir="inline"
2197fi
2198
2199
2200if test "$INLINEdir" = "inline" ; then
2201  INLINE_TRUE=
2202  INLINE_FALSE='#'
2203else
2204  INLINE_TRUE='#'
2205  INLINE_FALSE=
2206fi
2207
2208
2209if test "$INLINEdir" = "macros" ; then
2210  MACROS_TRUE=
2211  MACROS_FALSE='#'
2212else
2213  MACROS_TRUE='#'
2214  MACROS_FALSE=
2215fi
2216
2217
2218
2219
2220
2221if test "$HAS_POSIX_API" = "yes"; then
2222  HAS_POSIX_TRUE=
2223  HAS_POSIX_FALSE='#'
2224else
2225  HAS_POSIX_TRUE='#'
2226  HAS_POSIX_FALSE=
2227fi
2228
2229if test "$HAS_POSIX_API" = "yes"; then
2230cfg_subdirs="posix"
2231fi
2232subdirs="$cfg_subdirs"
2233
2234subdirs="$cfg_subdirs score/cpu"
2235
2236
2237PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
2238
2239
2240# Try to explicitly list a Makefile here
2241trap '' 1 2 15
2242cat > confcache <<\EOF
2243# This file is a shell script that caches the results of configure
2244# tests run on this system so they can be shared between configure
2245# scripts and configure runs.  It is not useful on other systems.
2246# If it contains results you don't want to keep, you may remove or edit it.
2247#
2248# By default, configure uses ./config.cache as the cache file,
2249# creating it if it does not exist already.  You can give configure
2250# the --cache-file=FILE option to use a different cache file; that is
2251# what configure does when it calls configure scripts in
2252# subdirectories, so they share the cache.
2253# Giving --cache-file=/dev/null disables caching, for debugging configure.
2254# config.status only pays attention to the cache file if you give it the
2255# --recheck option to rerun configure.
2256#
2257EOF
2258# The following way of writing the cache mishandles newlines in values,
2259# but we know of no workaround that is simple, portable, and efficient.
2260# So, don't put newlines in cache variables' values.
2261# Ultrix sh set writes to stderr and can't be redirected directly,
2262# and sets the high bit in the cache file unless we assign to the vars.
2263(set) 2>&1 |
2264  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2265  *ac_space=\ *)
2266    # `set' does not quote correctly, so add quotes (double-quote substitution
2267    # turns \\\\ into \\, and sed turns \\ into \).
2268    sed -n \
2269      -e "s/'/'\\\\''/g" \
2270      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2271    ;;
2272  *)
2273    # `set' quotes correctly as required by POSIX, so do not add quotes.
2274    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2275    ;;
2276  esac >> confcache
2277if cmp -s $cache_file confcache; then
2278  :
2279else
2280  if test -w $cache_file; then
2281    echo "updating cache $cache_file"
2282    cat confcache > $cache_file
2283  else
2284    echo "not updating unwritable cache $cache_file"
2285  fi
2286fi
2287rm -f confcache
2288
2289trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2290
2291test "x$prefix" = xNONE && prefix=$ac_default_prefix
2292# Let make expand exec_prefix.
2293test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2294
2295# Any assignment to VPATH causes Sun make to only execute
2296# the first set of double-colon rules, so remove it if not needed.
2297# If there is a colon in the path, we need to keep it.
2298if test "x$srcdir" = x.; then
2299  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2300fi
2301
2302trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2303
2304# Transform confdefs.h into DEFS.
2305# Protect against shell expansion while executing Makefile rules.
2306# Protect against Makefile macro expansion.
2307cat > conftest.defs <<\EOF
2308s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2309s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2310s%\[%\\&%g
2311s%\]%\\&%g
2312s%\$%$$%g
2313EOF
2314DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2315rm -f conftest.defs
2316
2317
2318# Without the "./", some shells look in PATH for config.status.
2319: ${CONFIG_STATUS=./config.status}
2320
2321echo creating $CONFIG_STATUS
2322rm -f $CONFIG_STATUS
2323cat > $CONFIG_STATUS <<EOF
2324#! /bin/sh
2325# Generated automatically by configure.
2326# Run this file to recreate the current configuration.
2327# This directory was configured as follows,
2328# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2329#
2330# $0 $ac_configure_args
2331#
2332# Compiler output produced by configure, useful for debugging
2333# configure, is in ./config.log if it exists.
2334
2335ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2336for ac_option
2337do
2338  case "\$ac_option" in
2339  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2340    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2341    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2342  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2343    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2344    exit 0 ;;
2345  -help | --help | --hel | --he | --h)
2346    echo "\$ac_cs_usage"; exit 0 ;;
2347  *) echo "\$ac_cs_usage"; exit 1 ;;
2348  esac
2349done
2350
2351ac_given_srcdir=$srcdir
2352ac_given_INSTALL="$INSTALL"
2353
2354trap 'rm -fr `echo "Makefile
2355rtems/Makefile
2356rtems/src/Makefile
2357rtems/include/Makefile
2358rtems/include/rtems/Makefile
2359rtems/include/rtems/rtems/Makefile
2360rtems/optman/Makefile
2361rtems/inline/Makefile
2362rtems/inline/rtems/Makefile
2363rtems/inline/rtems/rtems/Makefile
2364rtems/macros/Makefile
2365rtems/macros/rtems/Makefile
2366rtems/macros/rtems/rtems/Makefile
2367sapi/Makefile
2368sapi/src/Makefile
2369sapi/include/Makefile
2370sapi/include/rtems/Makefile
2371sapi/include/rtems/sptables.h
2372sapi/inline/Makefile
2373sapi/inline/rtems/Makefile
2374sapi/macros/Makefile
2375sapi/macros/rtems/Makefile
2376sapi/optman/Makefile
2377score/Makefile
2378score/cpu/Makefile
2379score/include/Makefile
2380score/include/rtems/Makefile
2381score/include/rtems/score/Makefile
2382score/inline/Makefile
2383score/inline/rtems/Makefile
2384score/inline/rtems/score/Makefile
2385score/macros/Makefile
2386score/macros/rtems/Makefile
2387score/macros/rtems/score/Makefile
2388score/src/Makefile
2389wrapup/Makefile
2390wrapup/rtems/Makefile
2391wrapup/posix/Makefile
2392" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2393EOF
2394cat >> $CONFIG_STATUS <<EOF
2395
2396# Protect against being on the right side of a sed subst in config.status.
2397sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2398 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2399$ac_vpsub
2400$extrasub
2401s%@SHELL@%$SHELL%g
2402s%@CFLAGS@%$CFLAGS%g
2403s%@CPPFLAGS@%$CPPFLAGS%g
2404s%@CXXFLAGS@%$CXXFLAGS%g
2405s%@FFLAGS@%$FFLAGS%g
2406s%@DEFS@%$DEFS%g
2407s%@LDFLAGS@%$LDFLAGS%g
2408s%@LIBS@%$LIBS%g
2409s%@exec_prefix@%$exec_prefix%g
2410s%@prefix@%$prefix%g
2411s%@program_transform_name@%$program_transform_name%g
2412s%@bindir@%$bindir%g
2413s%@sbindir@%$sbindir%g
2414s%@libexecdir@%$libexecdir%g
2415s%@datadir@%$datadir%g
2416s%@sysconfdir@%$sysconfdir%g
2417s%@sharedstatedir@%$sharedstatedir%g
2418s%@localstatedir@%$localstatedir%g
2419s%@libdir@%$libdir%g
2420s%@includedir@%$includedir%g
2421s%@oldincludedir@%$oldincludedir%g
2422s%@infodir@%$infodir%g
2423s%@mandir@%$mandir%g
2424s%@RTEMS_TOPdir@%$RTEMS_TOPdir%g
2425s%@host@%$host%g
2426s%@host_alias@%$host_alias%g
2427s%@host_cpu@%$host_cpu%g
2428s%@host_vendor@%$host_vendor%g
2429s%@host_os@%$host_os%g
2430s%@target@%$target%g
2431s%@target_alias@%$target_alias%g
2432s%@target_cpu@%$target_cpu%g
2433s%@target_vendor@%$target_vendor%g
2434s%@target_os@%$target_os%g
2435s%@build@%$build%g
2436s%@build_alias@%$build_alias%g
2437s%@build_cpu@%$build_cpu%g
2438s%@build_vendor@%$build_vendor%g
2439s%@build_os@%$build_os%g
2440s%@RTEMS_CPU@%$RTEMS_CPU%g
2441s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2442s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2443s%@INSTALL_DATA@%$INSTALL_DATA%g
2444s%@PACKAGE@%$PACKAGE%g
2445s%@VERSION@%$VERSION%g
2446s%@ACLOCAL@%$ACLOCAL%g
2447s%@AUTOCONF@%$AUTOCONF%g
2448s%@AUTOMAKE@%$AUTOMAKE%g
2449s%@AUTOHEADER@%$AUTOHEADER%g
2450s%@MAKEINFO@%$MAKEINFO%g
2451s%@SET_MAKE@%$SET_MAKE%g
2452s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
2453s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
2454s%@MAINT@%$MAINT%g
2455s%@RTEMS_HAS_MULTIPROCESSING@%$RTEMS_HAS_MULTIPROCESSING%g
2456s%@RTEMS_HAS_POSIX_API@%$RTEMS_HAS_POSIX_API%g
2457s%@RTEMS_USE_MACROS@%$RTEMS_USE_MACROS%g
2458s%@RTEMS_LIBC_DIR@%$RTEMS_LIBC_DIR%g
2459s%@RTEMS_BSP@%$RTEMS_BSP%g
2460s%@RTEMS_HOST@%$RTEMS_HOST%g
2461s%@PROJECT_ROOT@%$PROJECT_ROOT%g
2462s%@RTEMS_ROOT@%$RTEMS_ROOT%g
2463s%@INSTALL_CHANGE@%$INSTALL_CHANGE%g
2464s%@PACKHEX@%$PACKHEX%g
2465s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
2466s%@GCCSED@%$GCCSED%g
2467s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
2468s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
2469s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
2470s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
2471s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
2472s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
2473s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
2474s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
2475s%@RTEMS_USE_NEWLIB@%$RTEMS_USE_NEWLIB%g
2476s%@HAS_MP@%$HAS_MP%g
2477s%@HAS_POSIX_API@%$HAS_POSIX_API%g
2478s%@INLINE_TRUE@%$INLINE_TRUE%g
2479s%@INLINE_FALSE@%$INLINE_FALSE%g
2480s%@MACROS_TRUE@%$MACROS_TRUE%g
2481s%@MACROS_FALSE@%$MACROS_FALSE%g
2482s%@RTEMS_VERSION@%$RTEMS_VERSION%g
2483s%@HAS_POSIX_TRUE@%$HAS_POSIX_TRUE%g
2484s%@HAS_POSIX_FALSE@%$HAS_POSIX_FALSE%g
2485s%@subdirs@%$subdirs%g
2486s%@PROJECT_INCLUDE@%$PROJECT_INCLUDE%g
2487
2488CEOF
2489EOF
2490
2491cat >> $CONFIG_STATUS <<\EOF
2492
2493# Split the substitutions into bite-sized pieces for seds with
2494# small command number limits, like on Digital OSF/1 and HP-UX.
2495ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2496ac_file=1 # Number of current file.
2497ac_beg=1 # First line for current file.
2498ac_end=$ac_max_sed_cmds # Line after last line for current file.
2499ac_more_lines=:
2500ac_sed_cmds=""
2501while $ac_more_lines; do
2502  if test $ac_beg -gt 1; then
2503    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2504  else
2505    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2506  fi
2507  if test ! -s conftest.s$ac_file; then
2508    ac_more_lines=false
2509    rm -f conftest.s$ac_file
2510  else
2511    if test -z "$ac_sed_cmds"; then
2512      ac_sed_cmds="sed -f conftest.s$ac_file"
2513    else
2514      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2515    fi
2516    ac_file=`expr $ac_file + 1`
2517    ac_beg=$ac_end
2518    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2519  fi
2520done
2521if test -z "$ac_sed_cmds"; then
2522  ac_sed_cmds=cat
2523fi
2524EOF
2525
2526cat >> $CONFIG_STATUS <<EOF
2527
2528CONFIG_FILES=\${CONFIG_FILES-"Makefile
2529rtems/Makefile
2530rtems/src/Makefile
2531rtems/include/Makefile
2532rtems/include/rtems/Makefile
2533rtems/include/rtems/rtems/Makefile
2534rtems/optman/Makefile
2535rtems/inline/Makefile
2536rtems/inline/rtems/Makefile
2537rtems/inline/rtems/rtems/Makefile
2538rtems/macros/Makefile
2539rtems/macros/rtems/Makefile
2540rtems/macros/rtems/rtems/Makefile
2541sapi/Makefile
2542sapi/src/Makefile
2543sapi/include/Makefile
2544sapi/include/rtems/Makefile
2545sapi/include/rtems/sptables.h
2546sapi/inline/Makefile
2547sapi/inline/rtems/Makefile
2548sapi/macros/Makefile
2549sapi/macros/rtems/Makefile
2550sapi/optman/Makefile
2551score/Makefile
2552score/cpu/Makefile
2553score/include/Makefile
2554score/include/rtems/Makefile
2555score/include/rtems/score/Makefile
2556score/inline/Makefile
2557score/inline/rtems/Makefile
2558score/inline/rtems/score/Makefile
2559score/macros/Makefile
2560score/macros/rtems/Makefile
2561score/macros/rtems/score/Makefile
2562score/src/Makefile
2563wrapup/Makefile
2564wrapup/rtems/Makefile
2565wrapup/posix/Makefile
2566"}
2567EOF
2568cat >> $CONFIG_STATUS <<\EOF
2569for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2570  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2571  case "$ac_file" in
2572  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2573       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2574  *) ac_file_in="${ac_file}.in" ;;
2575  esac
2576
2577  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2578
2579  # Remove last slash and all that follows it.  Not all systems have dirname.
2580  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2581  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2582    # The file is in a subdirectory.
2583    test ! -d "$ac_dir" && mkdir "$ac_dir"
2584    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2585    # A "../" for each directory in $ac_dir_suffix.
2586    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2587  else
2588    ac_dir_suffix= ac_dots=
2589  fi
2590
2591  case "$ac_given_srcdir" in
2592  .)  srcdir=.
2593      if test -z "$ac_dots"; then top_srcdir=.
2594      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2595  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2596  *) # Relative path.
2597    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2598    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2599  esac
2600
2601  case "$ac_given_INSTALL" in
2602  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2603  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2604  esac
2605
2606  echo creating "$ac_file"
2607  rm -f "$ac_file"
2608  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2609  case "$ac_file" in
2610  *Makefile*) ac_comsub="1i\\
2611# $configure_input" ;;
2612  *) ac_comsub= ;;
2613  esac
2614
2615  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2616  sed -e "$ac_comsub
2617s%@configure_input@%$configure_input%g
2618s%@srcdir@%$srcdir%g
2619s%@top_srcdir@%$top_srcdir%g
2620s%@INSTALL@%$INSTALL%g
2621" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2622fi; done
2623rm -f conftest.s*
2624
2625EOF
2626cat >> $CONFIG_STATUS <<EOF
2627
2628EOF
2629cat >> $CONFIG_STATUS <<\EOF
2630
2631exit 0
2632EOF
2633chmod +x $CONFIG_STATUS
2634rm -fr confdefs* $ac_clean_files
2635test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2636
2637if test "$no_recursion" != yes; then
2638
2639  # Remove --cache-file and --srcdir arguments so they do not pile up.
2640  ac_sub_configure_args=
2641  ac_prev=
2642  for ac_arg in $ac_configure_args; do
2643    if test -n "$ac_prev"; then
2644      ac_prev=
2645      continue
2646    fi
2647    case "$ac_arg" in
2648    -cache-file | --cache-file | --cache-fil | --cache-fi \
2649    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2650      ac_prev=cache_file ;;
2651    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2652    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2653      ;;
2654    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2655      ac_prev=srcdir ;;
2656    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2657      ;;
2658    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2659    esac
2660  done
2661
2662  for ac_config_dir in $cfg_subdirs score/cpu; do
2663
2664    # Do not complain, so a configure script can configure whichever
2665    # parts of a large source tree are present.
2666    if test ! -d $srcdir/$ac_config_dir; then
2667      continue
2668    fi
2669
2670    echo configuring in $ac_config_dir
2671
2672    case "$srcdir" in
2673    .) ;;
2674    *)
2675      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2676      else
2677        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2678      fi
2679      ;;
2680    esac
2681
2682    ac_popdir=`pwd`
2683    cd $ac_config_dir
2684
2685      # A "../" for each directory in /$ac_config_dir.
2686      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2687
2688    case "$srcdir" in
2689    .) # No --srcdir option.  We are building in place.
2690      ac_sub_srcdir=$srcdir ;;
2691    /*) # Absolute path.
2692      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2693    *) # Relative path.
2694      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2695    esac
2696
2697    # Check for guested configure; otherwise get Cygnus style configure.
2698    if test -f $ac_sub_srcdir/configure; then
2699      ac_sub_configure=$ac_sub_srcdir/configure
2700    elif test -f $ac_sub_srcdir/configure.in; then
2701      ac_sub_configure=$ac_configure
2702    else
2703      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2704      ac_sub_configure=
2705    fi
2706
2707    # The recursion is here.
2708    if test -n "$ac_sub_configure"; then
2709
2710      # Make the cache file name correct relative to the subdirectory.
2711      case "$cache_file" in
2712      /*) ac_sub_cache_file=$cache_file ;;
2713      *) # Relative path.
2714        ac_sub_cache_file="$ac_dots$cache_file" ;;
2715      esac
2716  case "$ac_given_INSTALL" in
2717        [/$]*) INSTALL="$ac_given_INSTALL" ;;
2718        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2719        esac
2720
2721      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2722      # The eval makes quoting arguments work.
2723      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2724      then :
2725      else
2726        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2727      fi
2728    fi
2729
2730    cd $ac_popdir
2731  done
2732fi
2733
Note: See TracBrowser for help on using the repository browser.