* config.in (WORDS_BIGENDIAN): Add.
[platform/upstream/binutils.git] / sim / d10v / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.10 
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-sim-cflags=opts              Extra CFLAGS for use in building simulator"
16 ac_help="$ac_help
17   --enable-sim-debug=opts               Enable debugging flags"
18 ac_help="$ac_help
19   --enable-sim-trace=opts               Enable tracing flags"
20 ac_help="$ac_help
21   --enable-sim-bswap                    Use the BSWAP instruction on Intel 486s and Pentiums."
22
23 # Initialize some variables set by options.
24 # The variables have the same names as the options, with
25 # dashes changed to underlines.
26 build=NONE
27 cache_file=./config.cache
28 exec_prefix=NONE
29 host=NONE
30 no_create=
31 nonopt=NONE
32 no_recursion=
33 prefix=NONE
34 program_prefix=NONE
35 program_suffix=NONE
36 program_transform_name=s,x,x,
37 silent=
38 site=
39 srcdir=
40 target=NONE
41 verbose=
42 x_includes=NONE
43 x_libraries=NONE
44 bindir='${exec_prefix}/bin'
45 sbindir='${exec_prefix}/sbin'
46 libexecdir='${exec_prefix}/libexec'
47 datadir='${prefix}/share'
48 sysconfdir='${prefix}/etc'
49 sharedstatedir='${prefix}/com'
50 localstatedir='${prefix}/var'
51 libdir='${exec_prefix}/lib'
52 includedir='${prefix}/include'
53 oldincludedir='/usr/include'
54 infodir='${prefix}/info'
55 mandir='${prefix}/man'
56
57 # Initialize some other variables.
58 subdirs=
59 MFLAGS= MAKEFLAGS=
60
61 ac_prev=
62 for ac_option
63 do
64
65   # If the previous option needs an argument, assign it.
66   if test -n "$ac_prev"; then
67     eval "$ac_prev=\$ac_option"
68     ac_prev=
69     continue
70   fi
71
72   case "$ac_option" in
73   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
74   *) ac_optarg= ;;
75   esac
76
77   # Accept the important Cygnus configure options, so we can diagnose typos.
78
79   case "$ac_option" in
80
81   -bindir | --bindir | --bindi | --bind | --bin | --bi)
82     ac_prev=bindir ;;
83   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
84     bindir="$ac_optarg" ;;
85
86   -build | --build | --buil | --bui | --bu)
87     ac_prev=build ;;
88   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
89     build="$ac_optarg" ;;
90
91   -cache-file | --cache-file | --cache-fil | --cache-fi \
92   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93     ac_prev=cache_file ;;
94   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
96     cache_file="$ac_optarg" ;;
97
98   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99     ac_prev=datadir ;;
100   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101   | --da=*)
102     datadir="$ac_optarg" ;;
103
104   -disable-* | --disable-*)
105     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
106     # Reject names that are not valid shell variable names.
107     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
108       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109     fi
110     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
111     eval "enable_${ac_feature}=no" ;;
112
113   -enable-* | --enable-*)
114     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
115     # Reject names that are not valid shell variable names.
116     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
117       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118     fi
119     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120     case "$ac_option" in
121       *=*) ;;
122       *) ac_optarg=yes ;;
123     esac
124     eval "enable_${ac_feature}='$ac_optarg'" ;;
125
126   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
127   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
128   | --exec | --exe | --ex)
129     ac_prev=exec_prefix ;;
130   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
131   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
132   | --exec=* | --exe=* | --ex=*)
133     exec_prefix="$ac_optarg" ;;
134
135   -gas | --gas | --ga | --g)
136     # Obsolete; use --with-gas.
137     with_gas=yes ;;
138
139   -help | --help | --hel | --he)
140     # Omit some internal or obsolete options to make the list less imposing.
141     # This message is too long to be a string in the A/UX 3.1 sh.
142     cat << EOF
143 Usage: configure [options] [host]
144 Options: [defaults in brackets after descriptions]
145 Configuration:
146   --cache-file=FILE       cache test results in FILE
147   --help                  print this message
148   --no-create             do not create output files
149   --quiet, --silent       do not print \`checking...' messages
150   --version               print the version of autoconf that created configure
151 Directory and file names:
152   --prefix=PREFIX         install architecture-independent files in PREFIX
153                           [$ac_default_prefix]
154   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
155                           [same as prefix]
156   --bindir=DIR            user executables in DIR [EPREFIX/bin]
157   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
158   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
159   --datadir=DIR           read-only architecture-independent data in DIR
160                           [PREFIX/share]
161   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
162   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
163                           [PREFIX/com]
164   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
165   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
166   --includedir=DIR        C header files in DIR [PREFIX/include]
167   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
168   --infodir=DIR           info documentation in DIR [PREFIX/info]
169   --mandir=DIR            man documentation in DIR [PREFIX/man]
170   --srcdir=DIR            find the sources in DIR [configure dir or ..]
171   --program-prefix=PREFIX prepend PREFIX to installed program names
172   --program-suffix=SUFFIX append SUFFIX to installed program names
173   --program-transform-name=PROGRAM
174                           run sed PROGRAM on installed program names
175 EOF
176     cat << EOF
177 Host type:
178   --build=BUILD           configure for building on BUILD [BUILD=HOST]
179   --host=HOST             configure for HOST [guessed]
180   --target=TARGET         configure for TARGET [TARGET=HOST]
181 Features and packages:
182   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
183   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
184   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
185   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
186   --x-includes=DIR        X include files are in DIR
187   --x-libraries=DIR       X library files are in DIR
188 EOF
189     if test -n "$ac_help"; then
190       echo "--enable and --with options recognized:$ac_help"
191     fi
192     exit 0 ;;
193
194   -host | --host | --hos | --ho)
195     ac_prev=host ;;
196   -host=* | --host=* | --hos=* | --ho=*)
197     host="$ac_optarg" ;;
198
199   -includedir | --includedir | --includedi | --included | --include \
200   | --includ | --inclu | --incl | --inc)
201     ac_prev=includedir ;;
202   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
203   | --includ=* | --inclu=* | --incl=* | --inc=*)
204     includedir="$ac_optarg" ;;
205
206   -infodir | --infodir | --infodi | --infod | --info | --inf)
207     ac_prev=infodir ;;
208   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
209     infodir="$ac_optarg" ;;
210
211   -libdir | --libdir | --libdi | --libd)
212     ac_prev=libdir ;;
213   -libdir=* | --libdir=* | --libdi=* | --libd=*)
214     libdir="$ac_optarg" ;;
215
216   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
217   | --libexe | --libex | --libe)
218     ac_prev=libexecdir ;;
219   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
220   | --libexe=* | --libex=* | --libe=*)
221     libexecdir="$ac_optarg" ;;
222
223   -localstatedir | --localstatedir | --localstatedi | --localstated \
224   | --localstate | --localstat | --localsta | --localst \
225   | --locals | --local | --loca | --loc | --lo)
226     ac_prev=localstatedir ;;
227   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
228   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
229   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
230     localstatedir="$ac_optarg" ;;
231
232   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233     ac_prev=mandir ;;
234   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
235     mandir="$ac_optarg" ;;
236
237   -nfp | --nfp | --nf)
238     # Obsolete; use --without-fp.
239     with_fp=no ;;
240
241   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
242   | --no-cr | --no-c)
243     no_create=yes ;;
244
245   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
246   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
247     no_recursion=yes ;;
248
249   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
250   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
251   | --oldin | --oldi | --old | --ol | --o)
252     ac_prev=oldincludedir ;;
253   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
254   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
255   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
256     oldincludedir="$ac_optarg" ;;
257
258   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259     ac_prev=prefix ;;
260   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
261     prefix="$ac_optarg" ;;
262
263   -program-prefix | --program-prefix | --program-prefi | --program-pref \
264   | --program-pre | --program-pr | --program-p)
265     ac_prev=program_prefix ;;
266   -program-prefix=* | --program-prefix=* | --program-prefi=* \
267   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
268     program_prefix="$ac_optarg" ;;
269
270   -program-suffix | --program-suffix | --program-suffi | --program-suff \
271   | --program-suf | --program-su | --program-s)
272     ac_prev=program_suffix ;;
273   -program-suffix=* | --program-suffix=* | --program-suffi=* \
274   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
275     program_suffix="$ac_optarg" ;;
276
277   -program-transform-name | --program-transform-name \
278   | --program-transform-nam | --program-transform-na \
279   | --program-transform-n | --program-transform- \
280   | --program-transform | --program-transfor \
281   | --program-transfo | --program-transf \
282   | --program-trans | --program-tran \
283   | --progr-tra | --program-tr | --program-t)
284     ac_prev=program_transform_name ;;
285   -program-transform-name=* | --program-transform-name=* \
286   | --program-transform-nam=* | --program-transform-na=* \
287   | --program-transform-n=* | --program-transform-=* \
288   | --program-transform=* | --program-transfor=* \
289   | --program-transfo=* | --program-transf=* \
290   | --program-trans=* | --program-tran=* \
291   | --progr-tra=* | --program-tr=* | --program-t=*)
292     program_transform_name="$ac_optarg" ;;
293
294   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
295   | -silent | --silent | --silen | --sile | --sil)
296     silent=yes ;;
297
298   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299     ac_prev=sbindir ;;
300   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301   | --sbi=* | --sb=*)
302     sbindir="$ac_optarg" ;;
303
304   -sharedstatedir | --sharedstatedir | --sharedstatedi \
305   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
306   | --sharedst | --shareds | --shared | --share | --shar \
307   | --sha | --sh)
308     ac_prev=sharedstatedir ;;
309   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
310   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
311   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312   | --sha=* | --sh=*)
313     sharedstatedir="$ac_optarg" ;;
314
315   -site | --site | --sit)
316     ac_prev=site ;;
317   -site=* | --site=* | --sit=*)
318     site="$ac_optarg" ;;
319
320   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321     ac_prev=srcdir ;;
322   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
323     srcdir="$ac_optarg" ;;
324
325   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
326   | --syscon | --sysco | --sysc | --sys | --sy)
327     ac_prev=sysconfdir ;;
328   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
329   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
330     sysconfdir="$ac_optarg" ;;
331
332   -target | --target | --targe | --targ | --tar | --ta | --t)
333     ac_prev=target ;;
334   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
335     target="$ac_optarg" ;;
336
337   -v | -verbose | --verbose | --verbos | --verbo | --verb)
338     verbose=yes ;;
339
340   -version | --version | --versio | --versi | --vers)
341     echo "configure generated by autoconf version 2.10"
342     exit 0 ;;
343
344   -with-* | --with-*)
345     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
346     # Reject names that are not valid shell variable names.
347     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
348       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349     fi
350     ac_package=`echo $ac_package| sed 's/-/_/g'`
351     case "$ac_option" in
352       *=*) ;;
353       *) ac_optarg=yes ;;
354     esac
355     eval "with_${ac_package}='$ac_optarg'" ;;
356
357   -without-* | --without-*)
358     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
359     # Reject names that are not valid shell variable names.
360     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
361       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362     fi
363     ac_package=`echo $ac_package| sed 's/-/_/g'`
364     eval "with_${ac_package}=no" ;;
365
366   --x)
367     # Obsolete; use --with-x.
368     with_x=yes ;;
369
370   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
371   | --x-incl | --x-inc | --x-in | --x-i)
372     ac_prev=x_includes ;;
373   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
374   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
375     x_includes="$ac_optarg" ;;
376
377   -x-libraries | --x-libraries | --x-librarie | --x-librari \
378   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
379     ac_prev=x_libraries ;;
380   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
381   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
382     x_libraries="$ac_optarg" ;;
383
384   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
385     ;;
386
387   *)
388     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
389       echo "configure: warning: $ac_option: invalid host type" 1>&2
390     fi
391     if test "x$nonopt" != xNONE; then
392       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
393     fi
394     nonopt="$ac_option"
395     ;;
396
397   esac
398 done
399
400 if test -n "$ac_prev"; then
401   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402 fi
403
404 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405
406 # File descriptor usage:
407 # 0 standard input
408 # 1 file creation
409 # 2 errors and warnings
410 # 3 some systems may open it to /dev/tty
411 # 4 used on the Kubota Titan
412 # 6 checking for... messages and results
413 # 5 compiler messages saved in config.log
414 if test "$silent" = yes; then
415   exec 6>/dev/null
416 else
417   exec 6>&1
418 fi
419 exec 5>./config.log
420
421 echo "\
422 This file contains any messages produced by compilers while
423 running configure, to aid debugging if configure makes a mistake.
424 " 1>&5
425
426 # Strip out --no-create and --no-recursion so they do not pile up.
427 # Also quote any args containing shell metacharacters.
428 ac_configure_args=
429 for ac_arg
430 do
431   case "$ac_arg" in
432   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
433   | --no-cr | --no-c) ;;
434   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
435   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
436   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
437   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
438   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
439   esac
440 done
441
442 # NLS nuisances.
443 # Only set LANG and LC_ALL to C if already set.
444 # These must not be set unconditionally because not all systems understand
445 # e.g. LANG=C (notably SCO).
446 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
447 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
448
449 # confdefs.h avoids OS command line length limits that DEFS can exceed.
450 rm -rf conftest* confdefs.h
451 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
452 echo > confdefs.h
453
454 # A filename unique to this package, relative to the directory that
455 # configure is in, which we can look for to find out if srcdir is correct.
456 ac_unique_file=Makefile.in
457
458 # Find the source files, if location was not specified.
459 if test -z "$srcdir"; then
460   ac_srcdir_defaulted=yes
461   # Try the directory containing this script, then its parent.
462   ac_prog=$0
463   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
464   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
465   srcdir=$ac_confdir
466   if test ! -r $srcdir/$ac_unique_file; then
467     srcdir=..
468   fi
469 else
470   ac_srcdir_defaulted=no
471 fi
472 if test ! -r $srcdir/$ac_unique_file; then
473   if test "$ac_srcdir_defaulted" = yes; then
474     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
475   else
476     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
477   fi
478 fi
479 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
480
481 # Prefer explicitly selected file to automatically selected ones.
482 if test -z "$CONFIG_SITE"; then
483   if test "x$prefix" != xNONE; then
484     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
485   else
486     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
487   fi
488 fi
489 for ac_site_file in $CONFIG_SITE; do
490   if test -r "$ac_site_file"; then
491     echo "loading site script $ac_site_file"
492     . "$ac_site_file"
493   fi
494 done
495
496 if test -r "$cache_file"; then
497   echo "loading cache $cache_file"
498   . $cache_file
499 else
500   echo "creating cache $cache_file"
501   > $cache_file
502 fi
503
504 ac_ext=c
505 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
506 ac_cpp='$CPP $CPPFLAGS'
507 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
508 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
509
510 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
511   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
512   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
513     ac_n= ac_c='
514 ' ac_t='        '
515   else
516     ac_n=-n ac_c= ac_t=
517   fi
518 else
519   ac_n= ac_c='\c' ac_t=
520 fi
521
522
523
524 # If we cannot run a trivial program, we must be cross compiling.
525 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
526 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
527   echo $ac_n "(cached) $ac_c" 1>&6
528 else
529   if test "$cross_compiling" = yes; then
530   ac_cv_c_cross=yes
531 else
532 cat > conftest.$ac_ext <<EOF
533 #line 534 "configure"
534 #include "confdefs.h"
535 main(){return(0);}
536 EOF
537 { (eval echo configure:538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
538 if test -s conftest && (./conftest; exit) 2>/dev/null; then
539   ac_cv_c_cross=no
540 else
541   ac_cv_c_cross=yes
542 fi
543 fi
544 rm -fr conftest*
545 fi
546
547 echo "$ac_t""$ac_cv_c_cross" 1>&6
548 cross_compiling=$ac_cv_c_cross
549
550
551 # autoconf.info says this should be called right after AC_INIT.
552
553
554 ac_aux_dir=
555 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
556   if test -f $ac_dir/install-sh; then
557     ac_aux_dir=$ac_dir
558     ac_install_sh="$ac_aux_dir/install-sh -c"
559     break
560   elif test -f $ac_dir/install.sh; then
561     ac_aux_dir=$ac_dir
562     ac_install_sh="$ac_aux_dir/install.sh -c"
563     break
564   fi
565 done
566 if test -z "$ac_aux_dir"; then
567   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
568 fi
569 ac_config_guess=$ac_aux_dir/config.guess
570 ac_config_sub=$ac_aux_dir/config.sub
571 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
572
573
574 # Do some error checking and defaulting for the host and target type.
575 # The inputs are:
576 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
577 #
578 # The rules are:
579 # 1. You are not allowed to specify --host, --target, and nonopt at the
580 #    same time.
581 # 2. Host defaults to nonopt.
582 # 3. If nonopt is not specified, then host defaults to the current host,
583 #    as determined by config.guess.
584 # 4. Target and build default to nonopt.
585 # 5. If nonopt is not specified, then target and build default to host.
586
587 # The aliases save the names the user supplied, while $host etc.
588 # will get canonicalized.
589 case $host---$target---$nonopt in
590 NONE---*---* | *---NONE---* | *---*---NONE) ;;
591 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
592 esac
593
594
595 # Make sure we can run config.sub.
596 if $ac_config_sub sun4 >/dev/null 2>&1; then :
597 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
598 fi
599
600 echo $ac_n "checking host system type""... $ac_c" 1>&6
601
602 host_alias=$host
603 case "$host_alias" in
604 NONE)
605   case $nonopt in
606   NONE)
607     if host_alias=`$ac_config_guess`; then :
608     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
609     fi ;;
610   *) host_alias=$nonopt ;;
611   esac ;;
612 esac
613
614 host=`$ac_config_sub $host_alias`
615 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
616 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
617 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
618 echo "$ac_t""$host" 1>&6
619
620 echo $ac_n "checking target system type""... $ac_c" 1>&6
621
622 target_alias=$target
623 case "$target_alias" in
624 NONE)
625   case $nonopt in
626   NONE) target_alias=$host_alias ;;
627   *) target_alias=$nonopt ;;
628   esac ;;
629 esac
630
631 target=`$ac_config_sub $target_alias`
632 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
633 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
634 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
635 echo "$ac_t""$target" 1>&6
636
637 echo $ac_n "checking build system type""... $ac_c" 1>&6
638
639 build_alias=$build
640 case "$build_alias" in
641 NONE)
642   case $nonopt in
643   NONE) build_alias=$host_alias ;;
644   *) build_alias=$nonopt ;;
645   esac ;;
646 esac
647
648 build=`$ac_config_sub $build_alias`
649 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
650 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
651 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
652 echo "$ac_t""$build" 1>&6
653
654 test "$host_alias" != "$target_alias" &&
655   test "$program_prefix$program_suffix$program_transform_name" = \
656     NONENONEs,x,x, &&
657   program_prefix=${target_alias}-
658
659 if test "$program_transform_name" = s,x,x,; then
660   program_transform_name=
661 else
662   # Double any \ or $.  echo might interpret backslashes.
663   cat <<\EOF_SED > conftestsed
664 s,\\,\\\\,g; s,\$,$$,g
665 EOF_SED
666   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
667   rm -f conftestsed
668 fi
669 test "$program_prefix" != NONE &&
670   program_transform_name="s,^,${program_prefix},; $program_transform_name"
671 # Use a double $ so make ignores it.
672 test "$program_suffix" != NONE &&
673   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
674
675 # sed with no file args requires a program.
676 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
677
678 # Extract the first word of "gcc", so it can be a program name with args.
679 set dummy gcc; ac_word=$2
680 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
681 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
682   echo $ac_n "(cached) $ac_c" 1>&6
683 else
684   if test -n "$CC"; then
685   ac_cv_prog_CC="$CC" # Let the user override the test.
686 else
687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
688   for ac_dir in $PATH; do
689     test -z "$ac_dir" && ac_dir=.
690     if test -f $ac_dir/$ac_word; then
691       ac_cv_prog_CC="gcc"
692       break
693     fi
694   done
695   IFS="$ac_save_ifs"
696 fi
697 fi
698 CC="$ac_cv_prog_CC"
699 if test -n "$CC"; then
700   echo "$ac_t""$CC" 1>&6
701 else
702   echo "$ac_t""no" 1>&6
703 fi
704
705 if test -z "$CC"; then
706   # Extract the first word of "cc", so it can be a program name with args.
707 set dummy cc; ac_word=$2
708 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
709 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
710   echo $ac_n "(cached) $ac_c" 1>&6
711 else
712   if test -n "$CC"; then
713   ac_cv_prog_CC="$CC" # Let the user override the test.
714 else
715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
716   ac_prog_rejected=no
717   for ac_dir in $PATH; do
718     test -z "$ac_dir" && ac_dir=.
719     if test -f $ac_dir/$ac_word; then
720       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
721         ac_prog_rejected=yes
722         continue
723       fi
724       ac_cv_prog_CC="cc"
725       break
726     fi
727   done
728   IFS="$ac_save_ifs"
729 if test $ac_prog_rejected = yes; then
730   # We found a bogon in the path, so make sure we never use it.
731   set dummy $ac_cv_prog_CC
732   shift
733   if test $# -gt 0; then
734     # We chose a different compiler from the bogus one.
735     # However, it has the same basename, so the bogon will be chosen
736     # first if we set CC to just the basename; use the full file name.
737     shift
738     set dummy "$ac_dir/$ac_word" "$@"
739     shift
740     ac_cv_prog_CC="$@"
741   fi
742 fi
743 fi
744 fi
745 CC="$ac_cv_prog_CC"
746 if test -n "$CC"; then
747   echo "$ac_t""$CC" 1>&6
748 else
749   echo "$ac_t""no" 1>&6
750 fi
751
752   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
753 fi
754
755 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
756 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
757   echo $ac_n "(cached) $ac_c" 1>&6
758 else
759   cat > conftest.c <<EOF
760 #ifdef __GNUC__
761   yes;
762 #endif
763 EOF
764 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
765   ac_cv_prog_gcc=yes
766 else
767   ac_cv_prog_gcc=no
768 fi
769 fi
770
771 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
772 if test $ac_cv_prog_gcc = yes; then
773   GCC=yes
774   if test "${CFLAGS+set}" != set; then
775     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
776 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
777   echo $ac_n "(cached) $ac_c" 1>&6
778 else
779   echo 'void f(){}' > conftest.c
780 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
781   ac_cv_prog_gcc_g=yes
782 else
783   ac_cv_prog_gcc_g=no
784 fi
785 rm -f conftest*
786
787 fi
788
789 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
790     if test $ac_cv_prog_gcc_g = yes; then
791       CFLAGS="-g -O"
792     else
793       CFLAGS="-O"
794     fi
795   fi
796 else
797   GCC=
798   test "${CFLAGS+set}" = set || CFLAGS="-g"
799 fi
800
801 # Find a good install program.  We prefer a C program (faster),
802 # so one script is as good as another.  But avoid the broken or
803 # incompatible versions:
804 # SysV /etc/install, /usr/sbin/install
805 # SunOS /usr/etc/install
806 # IRIX /sbin/install
807 # AIX /bin/install
808 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
809 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
810 # ./install, which can be erroneously created by make from ./install.sh.
811 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
812 if test -z "$INSTALL"; then
813 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
814   echo $ac_n "(cached) $ac_c" 1>&6
815 else
816     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
817   for ac_dir in $PATH; do
818     # Account for people who put trailing slashes in PATH elements.
819     case "$ac_dir/" in
820     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
821     *)
822       # OSF1 and SCO ODT 3.0 have their own names for install.
823       for ac_prog in ginstall installbsd scoinst install; do
824         if test -f $ac_dir/$ac_prog; then
825           if test $ac_prog = install &&
826             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
827             # AIX install.  It has an incompatible calling convention.
828             # OSF/1 installbsd also uses dspmsg, but is usable.
829             :
830           else
831             ac_cv_path_install="$ac_dir/$ac_prog -c"
832             break 2
833           fi
834         fi
835       done
836       ;;
837     esac
838   done
839   IFS="$ac_save_ifs"
840
841 fi
842   if test "${ac_cv_path_install+set}" = set; then
843     INSTALL="$ac_cv_path_install"
844   else
845     # As a last resort, use the slow shell script.  We don't cache a
846     # path for INSTALL within a source directory, because that will
847     # break other packages using the cache if that directory is
848     # removed, or if the path is relative.
849     INSTALL="$ac_install_sh"
850   fi
851 fi
852 echo "$ac_t""$INSTALL" 1>&6
853
854 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
855 # It thinks the first close brace ends the variable substitution.
856 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
857
858 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
859
860 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
861 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
862   echo $ac_n "(cached) $ac_c" 1>&6
863 else
864   ac_cv_c_bigendian=unknown
865 # See if sys/param.h defines the BYTE_ORDER macro.
866 cat > conftest.$ac_ext <<EOF
867 #line 868 "configure"
868 #include "confdefs.h"
869 #include <sys/types.h>
870 #include <sys/param.h>
871 int main() { return 0; }
872 int t() {
873
874 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
875  bogus endian macros
876 #endif
877 ; return 0; }
878 EOF
879 if { (eval echo configure:880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
880   rm -rf conftest*
881   # It does; now see whether it defined to BIG_ENDIAN or not.
882 cat > conftest.$ac_ext <<EOF
883 #line 884 "configure"
884 #include "confdefs.h"
885 #include <sys/types.h>
886 #include <sys/param.h>
887 int main() { return 0; }
888 int t() {
889
890 #if BYTE_ORDER != BIG_ENDIAN
891  not big endian
892 #endif
893 ; return 0; }
894 EOF
895 if { (eval echo configure:896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
896   rm -rf conftest*
897   ac_cv_c_bigendian=yes
898 else
899   rm -rf conftest*
900   ac_cv_c_bigendian=no
901 fi
902 rm -f conftest*
903
904 fi
905 rm -f conftest*
906
907 if test $ac_cv_c_bigendian = unknown; then
908 if test "$cross_compiling" = yes; then
909     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
910 else
911 cat > conftest.$ac_ext <<EOF
912 #line 913 "configure"
913 #include "confdefs.h"
914 main () {
915   /* Are we little or big endian?  From Harbison&Steele.  */
916   union
917   {
918     long l;
919     char c[sizeof (long)];
920   } u;
921   u.l = 1;
922   exit (u.c[sizeof (long) - 1] == 1);
923 }
924 EOF
925 { (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
926 if test -s conftest && (./conftest; exit) 2>/dev/null; then
927   ac_cv_c_bigendian=no
928 else
929   ac_cv_c_bigendian=yes
930 fi
931 fi
932 rm -fr conftest*
933 fi
934 fi
935
936 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
937 if test $ac_cv_c_bigendian = yes; then
938   cat >> confdefs.h <<\EOF
939 #define WORDS_BIGENDIAN 1
940 EOF
941
942 fi
943
944
945 # Put a plausible default for CC_FOR_BUILD in Makefile.
946 # If we cannot run a trivial program, we must be cross compiling.
947 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
948 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
949   echo $ac_n "(cached) $ac_c" 1>&6
950 else
951   if test "$cross_compiling" = yes; then
952   ac_cv_c_cross=yes
953 else
954 cat > conftest.$ac_ext <<EOF
955 #line 956 "configure"
956 #include "confdefs.h"
957 main(){return(0);}
958 EOF
959 { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
960 if test -s conftest && (./conftest; exit) 2>/dev/null; then
961   ac_cv_c_cross=no
962 else
963   ac_cv_c_cross=yes
964 fi
965 fi
966 rm -fr conftest*
967 fi
968
969 echo "$ac_t""$ac_cv_c_cross" 1>&6
970 cross_compiling=$ac_cv_c_cross
971
972 if test "x$cross_compiling" = "xno"; then
973   CC_FOR_BUILD='$(CC)'
974 else
975   CC_FOR_BUILD=gcc
976 fi
977
978
979
980
981 AR=${AR-ar}
982
983 # Extract the first word of "ranlib", so it can be a program name with args.
984 set dummy ranlib; ac_word=$2
985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
986 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
987   echo $ac_n "(cached) $ac_c" 1>&6
988 else
989   if test -n "$RANLIB"; then
990   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
991 else
992   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
993   for ac_dir in $PATH; do
994     test -z "$ac_dir" && ac_dir=.
995     if test -f $ac_dir/$ac_word; then
996       ac_cv_prog_RANLIB="ranlib"
997       break
998     fi
999   done
1000   IFS="$ac_save_ifs"
1001   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1002 fi
1003 fi
1004 RANLIB="$ac_cv_prog_RANLIB"
1005 if test -n "$RANLIB"; then
1006   echo "$ac_t""$RANLIB" 1>&6
1007 else
1008   echo "$ac_t""no" 1>&6
1009 fi
1010
1011
1012 . ${srcdir}/../../bfd/configure.host
1013
1014
1015 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
1016 if test "${enable_sim_cflags+set}" = set; then
1017   enableval="$enable_sim_cflags"
1018   case "${enableval}" in
1019   yes)   sim_cflags="-O2";;
1020   trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
1021   no)    sim_cflags="";;
1022   *)     sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1023 esac
1024 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
1025   echo "Setting sim cflags = $sim_cflags" 6>&1
1026 fi
1027 else
1028   sim_cflags=""
1029 fi
1030
1031
1032 # Check whether --enable-sim-debug or --disable-sim-debug was given.
1033 if test "${enable_sim_debug+set}" = set; then
1034   enableval="$enable_sim_debug"
1035   case "${enableval}" in
1036   yes)  sim_debug="-DDEBUG=7";;
1037   no)   sim_debug="-DDEBUG=0";;
1038   *)    sim_debug="-DDEBUG='(${enableval})'";;
1039 esac
1040 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
1041   echo "Setting sim debug = $sim_debug" 6>&1
1042 fi
1043 else
1044   sim_debug=""
1045 fi
1046
1047
1048 # Check whether --enable-sim-trace or --disable-sim-trace was given.
1049 if test "${enable_sim_trace+set}" = set; then
1050   enableval="$enable_sim_trace"
1051   case "${enableval}" in
1052   yes)  sim_trace="-DTRACE=1";;
1053   no)   sim_trace="-DTRACE=0";;
1054   *)    sim_trace="-DTRACE='(${enableval})'";;
1055 esac
1056 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
1057   echo "Setting sim trace = $sim_trace" 6>&1
1058 fi
1059 else
1060   sim_trace=""
1061 fi
1062
1063
1064 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
1065 if test "${enable_sim_bswap+set}" = set; then
1066   enableval="$enable_sim_bswap"
1067   case "${enableval}" in
1068   yes)  sim_bswap="-DUSE_BSWAP";;
1069   no)   sim_bswap="";;
1070   *)    { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
1071 esac
1072 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
1073   echo "Setting bswap flags = $sim_bswap" 6>&1
1074 fi
1075 else
1076   sim_bswap=""
1077 fi
1078
1079
1080 sim_link_files=
1081 sim_link_links=
1082
1083 sim_link_links=tconfig.h
1084 if test -f ${srcdir}/tconfig.in
1085 then
1086   sim_link_files=tconfig.in
1087 else
1088   sim_link_files=../common/tconfig.in
1089 fi
1090
1091
1092
1093 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1094 # On Suns, sometimes $CPP names a directory.
1095 if test -n "$CPP" && test -d "$CPP"; then
1096   CPP=
1097 fi
1098 if test -z "$CPP"; then
1099 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1100   echo $ac_n "(cached) $ac_c" 1>&6
1101 else
1102     # This must be in double quotes, not single quotes, because CPP may get
1103   # substituted into the Makefile and "${CC-cc}" will confuse make.
1104   CPP="${CC-cc} -E"
1105   # On the NeXT, cc -E runs the code through the compiler's parser,
1106   # not just through cpp.
1107   cat > conftest.$ac_ext <<EOF
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1110 #include <assert.h>
1111 Syntax Error
1112 EOF
1113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1114 { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1115 ac_err=`grep -v '^ *+' conftest.out`
1116 if test -z "$ac_err"; then
1117   :
1118 else
1119   echo "$ac_err" >&5
1120   rm -rf conftest*
1121   CPP="${CC-cc} -E -traditional-cpp"
1122   cat > conftest.$ac_ext <<EOF
1123 #line 1124 "configure"
1124 #include "confdefs.h"
1125 #include <assert.h>
1126 Syntax Error
1127 EOF
1128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1129 { (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1130 ac_err=`grep -v '^ *+' conftest.out`
1131 if test -z "$ac_err"; then
1132   :
1133 else
1134   echo "$ac_err" >&5
1135   rm -rf conftest*
1136   CPP=/lib/cpp
1137 fi
1138 rm -f conftest*
1139 fi
1140 rm -f conftest*
1141   ac_cv_prog_CPP="$CPP"
1142 fi
1143   CPP="$ac_cv_prog_CPP"
1144 else
1145   ac_cv_prog_CPP="$CPP"
1146 fi
1147 echo "$ac_t""$CPP" 1>&6
1148
1149 for ac_hdr in unistd.h
1150 do
1151 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1153 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   cat > conftest.$ac_ext <<EOF
1157 #line 1158 "configure"
1158 #include "confdefs.h"
1159 #include <$ac_hdr>
1160 EOF
1161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1162 { (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1163 ac_err=`grep -v '^ *+' conftest.out`
1164 if test -z "$ac_err"; then
1165   rm -rf conftest*
1166   eval "ac_cv_header_$ac_safe=yes"
1167 else
1168   echo "$ac_err" >&5
1169   rm -rf conftest*
1170   eval "ac_cv_header_$ac_safe=no"
1171 fi
1172 rm -f conftest*
1173 fi
1174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1175   echo "$ac_t""yes" 1>&6
1176     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1177   cat >> confdefs.h <<EOF
1178 #define $ac_tr_hdr 1
1179 EOF
1180  
1181 else
1182   echo "$ac_t""no" 1>&6
1183 fi
1184 done
1185
1186
1187
1188
1189 trap '' 1 2 15
1190 cat > confcache <<\EOF
1191 # This file is a shell script that caches the results of configure
1192 # tests run on this system so they can be shared between configure
1193 # scripts and configure runs.  It is not useful on other systems.
1194 # If it contains results you don't want to keep, you may remove or edit it.
1195 #
1196 # By default, configure uses ./config.cache as the cache file,
1197 # creating it if it does not exist already.  You can give configure
1198 # the --cache-file=FILE option to use a different cache file; that is
1199 # what configure does when it calls configure scripts in
1200 # subdirectories, so they share the cache.
1201 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1202 # config.status only pays attention to the cache file if you give it the
1203 # --recheck option to rerun configure.
1204 #
1205 EOF
1206 # Ultrix sh set writes to stderr and can't be redirected directly,
1207 # and sets the high bit in the cache file unless we assign to the vars.
1208 (set) 2>&1 |
1209   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1210   >> confcache
1211 if cmp -s $cache_file confcache; then
1212   :
1213 else
1214   if test -w $cache_file; then
1215     echo "updating cache $cache_file"
1216     cat confcache > $cache_file
1217   else
1218     echo "not updating unwritable cache $cache_file"
1219   fi
1220 fi
1221 rm -f confcache
1222
1223 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1224
1225 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1226 # Let make expand exec_prefix.
1227 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1228
1229 # Any assignment to VPATH causes Sun make to only execute
1230 # the first set of double-colon rules, so remove it if not needed.
1231 # If there is a colon in the path, we need to keep it.
1232 if test "x$srcdir" = x.; then
1233   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1234 fi
1235
1236 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1237
1238 DEFS=-DHAVE_CONFIG_H
1239
1240 # Without the "./", some shells look in PATH for config.status.
1241 : ${CONFIG_STATUS=./config.status}
1242
1243 echo creating $CONFIG_STATUS
1244 rm -f $CONFIG_STATUS
1245 cat > $CONFIG_STATUS <<EOF
1246 #! /bin/sh
1247 # Generated automatically by configure.
1248 # Run this file to recreate the current configuration.
1249 # This directory was configured as follows,
1250 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1251 #
1252 # $0 $ac_configure_args
1253 #
1254 # Compiler output produced by configure, useful for debugging
1255 # configure, is in ./config.log if it exists.
1256
1257 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1258 for ac_option
1259 do
1260   case "\$ac_option" in
1261   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1262     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1263     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1264   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1265     echo "$CONFIG_STATUS generated by autoconf version 2.10"
1266     exit 0 ;;
1267   -help | --help | --hel | --he | --h)
1268     echo "\$ac_cs_usage"; exit 0 ;;
1269   *) echo "\$ac_cs_usage"; exit 1 ;;
1270   esac
1271 done
1272
1273 ac_given_srcdir=$srcdir
1274 ac_given_INSTALL="$INSTALL"
1275
1276 trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1277 EOF
1278 cat >> $CONFIG_STATUS <<EOF
1279
1280 # Protect against being on the right side of a sed subst in config.status.
1281 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1282  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1283 $ac_vpsub
1284 $extrasub
1285 s%@CFLAGS@%$CFLAGS%g
1286 s%@CPPFLAGS@%$CPPFLAGS%g
1287 s%@CXXFLAGS@%$CXXFLAGS%g
1288 s%@DEFS@%$DEFS%g
1289 s%@LDFLAGS@%$LDFLAGS%g
1290 s%@LIBS@%$LIBS%g
1291 s%@exec_prefix@%$exec_prefix%g
1292 s%@prefix@%$prefix%g
1293 s%@program_transform_name@%$program_transform_name%g
1294 s%@bindir@%$bindir%g
1295 s%@sbindir@%$sbindir%g
1296 s%@libexecdir@%$libexecdir%g
1297 s%@datadir@%$datadir%g
1298 s%@sysconfdir@%$sysconfdir%g
1299 s%@sharedstatedir@%$sharedstatedir%g
1300 s%@localstatedir@%$localstatedir%g
1301 s%@libdir@%$libdir%g
1302 s%@includedir@%$includedir%g
1303 s%@oldincludedir@%$oldincludedir%g
1304 s%@infodir@%$infodir%g
1305 s%@mandir@%$mandir%g
1306 s%@host@%$host%g
1307 s%@host_alias@%$host_alias%g
1308 s%@host_cpu@%$host_cpu%g
1309 s%@host_vendor@%$host_vendor%g
1310 s%@host_os@%$host_os%g
1311 s%@target@%$target%g
1312 s%@target_alias@%$target_alias%g
1313 s%@target_cpu@%$target_cpu%g
1314 s%@target_vendor@%$target_vendor%g
1315 s%@target_os@%$target_os%g
1316 s%@build@%$build%g
1317 s%@build_alias@%$build_alias%g
1318 s%@build_cpu@%$build_cpu%g
1319 s%@build_vendor@%$build_vendor%g
1320 s%@build_os@%$build_os%g
1321 s%@CC@%$CC%g
1322 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1323 s%@INSTALL_DATA@%$INSTALL_DATA%g
1324 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
1325 s%@HDEFINES@%$HDEFINES%g
1326 s%@AR@%$AR%g
1327 s%@RANLIB@%$RANLIB%g
1328 s%@sim_cflags@%$sim_cflags%g
1329 s%@sim_debug@%$sim_debug%g
1330 s%@sim_trace@%$sim_trace%g
1331 s%@sim_bswap@%$sim_bswap%g
1332 s%@CPP@%$CPP%g
1333
1334 CEOF
1335 EOF
1336 cat >> $CONFIG_STATUS <<EOF
1337
1338 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in"}
1339 EOF
1340 cat >> $CONFIG_STATUS <<\EOF
1341 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1342   # Support "outfile[:infile]", defaulting infile="outfile.in".
1343   case "$ac_file" in
1344   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1345        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1346   *) ac_file_in="${ac_file}.in" ;;
1347   esac
1348
1349   # Adjust relative srcdir, etc. for subdirectories.
1350
1351   # Remove last slash and all that follows it.  Not all systems have dirname.
1352   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1353   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1354     # The file is in a subdirectory.
1355     test ! -d "$ac_dir" && mkdir "$ac_dir"
1356     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1357     # A "../" for each directory in $ac_dir_suffix.
1358     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1359   else
1360     ac_dir_suffix= ac_dots=
1361   fi
1362
1363   case "$ac_given_srcdir" in
1364   .)  srcdir=.
1365       if test -z "$ac_dots"; then top_srcdir=.
1366       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1367   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1368   *) # Relative path.
1369     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1370     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1371   esac
1372
1373   case "$ac_given_INSTALL" in
1374   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1375   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1376   esac
1377   echo creating "$ac_file"
1378   rm -f "$ac_file"
1379   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1380   case "$ac_file" in
1381   *Makefile*) ac_comsub="1i\\
1382 # $configure_input" ;;
1383   *) ac_comsub= ;;
1384   esac
1385   sed -e "$ac_comsub
1386 s%@configure_input@%$configure_input%g
1387 s%@srcdir@%$srcdir%g
1388 s%@top_srcdir@%$top_srcdir%g
1389 s%@INSTALL@%$INSTALL%g
1390 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1391 fi; done
1392 rm -f conftest.subs
1393
1394 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1395 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1396 #
1397 # ac_d sets the value in "#define NAME VALUE" lines.
1398 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1399 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1400 ac_dC='\3'
1401 ac_dD='%g'
1402 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1403 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1404 ac_uB='\([      ]\)%\1#\2define\3'
1405 ac_uC=' '
1406 ac_uD='\4%g'
1407 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1408 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1409 ac_eB='$%\1#\2define\3'
1410 ac_eC=' '
1411 ac_eD='%g'
1412
1413 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
1414 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1415   # Support "outfile[:infile]", defaulting infile="outfile.in".
1416   case "$ac_file" in
1417   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1418        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1419   *) ac_file_in="${ac_file}.in" ;;
1420   esac
1421
1422   echo creating $ac_file
1423
1424   rm -f conftest.frag conftest.in conftest.out
1425   cp $ac_given_srcdir/$ac_file_in conftest.in
1426
1427 EOF
1428
1429 # Transform confdefs.h into a sed script conftest.vals that substitutes
1430 # the proper values into config.h.in to produce config.h.  And first:
1431 # Protect against being on the right side of a sed subst in config.status.
1432 # Protect against being in an unquoted here document in config.status.
1433 rm -f conftest.vals
1434 cat > conftest.hdr <<\EOF
1435 s/[\\&%]/\\&/g
1436 s%[\\$`]%\\&%g
1437 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1438 s%ac_d%ac_u%gp
1439 s%ac_u%ac_e%gp
1440 EOF
1441 sed -n -f conftest.hdr confdefs.h > conftest.vals
1442 rm -f conftest.hdr
1443
1444 # This sed command replaces #undef with comments.  This is necessary, for
1445 # example, in the case of _POSIX_SOURCE, which is predefined and required
1446 # on some systems where configure will not decide to define it.
1447 cat >> conftest.vals <<\EOF
1448 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1449 EOF
1450
1451 # Break up conftest.vals because some shells have a limit on
1452 # the size of here documents, and old seds have small limits too.
1453 # Maximum number of lines to put in a single here document.
1454 ac_max_here_lines=12
1455
1456 rm -f conftest.tail
1457 while :
1458 do
1459   ac_lines=`grep -c . conftest.vals`
1460   # grep -c gives empty output for an empty file on some AIX systems.
1461   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1462   # Write a limited-size here document to conftest.frag.
1463   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1464   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1465   echo 'CEOF
1466   sed -f conftest.frag conftest.in > conftest.out
1467   rm -f conftest.in
1468   mv conftest.out conftest.in
1469 ' >> $CONFIG_STATUS
1470   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1471   rm -f conftest.vals
1472   mv conftest.tail conftest.vals
1473 done
1474 rm -f conftest.vals
1475
1476 cat >> $CONFIG_STATUS <<\EOF
1477   rm -f conftest.frag conftest.h
1478   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1479   cat conftest.in >> conftest.h
1480   rm -f conftest.in
1481   if cmp -s $ac_file conftest.h 2>/dev/null; then
1482     echo "$ac_file is unchanged"
1483     rm -f conftest.h
1484   else
1485     # Remove last slash and all that follows it.  Not all systems have dirname.
1486       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1487       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1488       # The file is in a subdirectory.
1489       test ! -d "$ac_dir" && mkdir "$ac_dir"
1490     fi
1491     rm -f $ac_file
1492     mv conftest.h $ac_file
1493   fi
1494 fi; done
1495
1496 EOF
1497
1498 cat >> $CONFIG_STATUS <<EOF
1499 ac_sources="$sim_link_files"
1500 ac_dests="$sim_link_links"
1501 EOF
1502
1503 cat >> $CONFIG_STATUS <<\EOF
1504 srcdir=$ac_given_srcdir
1505 while test -n "$ac_sources"; do
1506   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
1507   set $ac_sources; ac_source=$1; shift; ac_sources=$*
1508
1509   echo "linking $srcdir/$ac_source to $ac_dest"
1510
1511   if test ! -r $srcdir/$ac_source; then
1512     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
1513   fi
1514   rm -f $ac_dest
1515
1516   # Make relative symlinks.
1517   # Remove last slash and all that follows it.  Not all systems have dirname.
1518   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
1519   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
1520     # The dest file is in a subdirectory.
1521     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
1522     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
1523     # A "../" for each directory in $ac_dest_dir_suffix.
1524     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
1525   else
1526     ac_dest_dir_suffix= ac_dots=
1527   fi
1528
1529   case "$srcdir" in
1530   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
1531   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
1532   esac
1533
1534   # Make a symlink if possible; otherwise try a hard link.
1535   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
1536     ln $srcdir/$ac_source $ac_dest; then :
1537   else
1538     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
1539   fi
1540 done
1541
1542 case "x$CONFIG_FILES" in xMakefile*)
1543    echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
1544    rm -f Makesim1.tmp Makesim2.tmp Makefile
1545    sed -n -e '/^## Begin config/,/^## End config/ p' <Makefile.sim >Makesim1.tmp
1546    sed -e '/^## Begin config/,/^## End config/ d' <Makefile.sim >Makesim2.tmp
1547    cat Make-common.sim Makesim2.tmp | sed -e '/^## Config/ r Makesim1.tmp' >Makefile
1548    rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
1549    ;;
1550  esac
1551  case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
1552
1553 exit 0
1554 EOF
1555 chmod +x $CONFIG_STATUS
1556 rm -fr confdefs* $ac_clean_files
1557 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1558
1559