source: rtems/c/src/exec/configure @ c935c5f

4.104.114.84.95
Last change on this file since c935c5f was ea562ee9, checked in by Joel Sherrill <joel.sherrill@…>, on 08/12/99 at 18:22:17

Patch from Ralf Corsepius <corsepiu@…>:

After upgrading my linux box to the brand new SuSE 6.2 release, which is
glibc-2.1 based, I came across a bug in RTEMS - IIRC, I even warned you
about it about 1/2 a year ago, but nothing has been done since then :-.

The *.m4 macros to check for SYSV/IPC are broken for linux/glibc2.1,
because they assume that linux always defines union semun, which isn't
true anymore for glibc2.1 (the manpage for semctl states _X_OPEN
specifies it this way). Therefore I have tried to implement a more
general approach for handling SYSV for unix/posix which checks for
presence of struct semun, instead of trying to evaluate OS specific
preprocessor symbols.

This approach is a bit adventureous, because I only tested it with
linux/glibc2.1 and linux/libc5, but not under other Unix variants RTEMS
supports. I am quite confident it will work on other hosts, too, but who
knows :-.

[FYI: I think this might also is the cause of some problems with RedHat?
6.X / Mandrake linux recently reported on the rtems list -- rtems-4.0.0
can not be build for posix on any glibc2.1 based host]

Furthermore the patch below contains a couple of minor fixes and
configuration cleanups, which IMO should be applied before releasing a
new snapshot.

To apply this patch:

cd <source-tree>
patch -p1 < rtems-rc-19990709-8.diff
./autogen

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