source: rtems/c/src/exec/posix/configure @ 473b4e5

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

Regenerated.

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