* aclocal.m4: Recognize --enable-maintainer-mode.
[external/binutils.git] / sim / m32r / configure
1 #! /bin/sh
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 # Guess values for system-dependent variables and create Makefiles.
79 # Generated automatically using autoconf version 2.12.1 
80 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
81 #
82 # This configure script is free software; the Free Software Foundation
83 # gives unlimited permission to copy, distribute and modify it.
84
85 # Defaults:
86 ac_help=
87 ac_default_prefix=/usr/local
88 # Any additions from configure.in:
89 ac_help="$ac_help
90   --enable-maintainer-mode              Enable developer functionality."
91 ac_help="$ac_help
92   --enable-sim-bswap                    Use Host specific BSWAP instruction."
93 ac_help="$ac_help
94   --enable-sim-cflags=opts              Extra CFLAGS for use in building simulator"
95 ac_help="$ac_help
96   --enable-sim-debug=opts               Enable debugging flags"
97 ac_help="$ac_help
98   --enable-sim-stdio                    Specify whether to use stdio for console input/output."
99 ac_help="$ac_help
100   --enable-sim-trace=opts               Enable tracing flags"
101 ac_help="$ac_help
102   --enable-sim-profile=opts             Enable profiling flags"
103 ac_help="$ac_help
104   --enable-sim-endian=endian            Specify target byte endian orientation."
105 ac_help="$ac_help
106   --enable-sim-alignment=align          Specify strict,  nonstrict or forced alignment of memory accesses."
107 ac_help="$ac_help
108   --enable-sim-hostendian=end           Specify host byte endian orientation."
109 ac_help="$ac_help
110   --enable-sim-scache=size              Specify simulator execution cache size."
111 ac_help="$ac_help
112   --enable-sim-default-model=model      Specify default model to simulate."
113 ac_help="$ac_help
114   --enable-sim-environment=environment  Specify mixed, user, virtual or operating environment."
115
116 # Initialize some variables set by options.
117 # The variables have the same names as the options, with
118 # dashes changed to underlines.
119 build=NONE
120 cache_file=./config.cache
121 exec_prefix=NONE
122 host=NONE
123 no_create=
124 nonopt=NONE
125 no_recursion=
126 prefix=NONE
127 program_prefix=NONE
128 program_suffix=NONE
129 program_transform_name=s,x,x,
130 silent=
131 site=
132 srcdir=
133 target=NONE
134 verbose=
135 x_includes=NONE
136 x_libraries=NONE
137 bindir='${exec_prefix}/bin'
138 sbindir='${exec_prefix}/sbin'
139 libexecdir='${exec_prefix}/libexec'
140 datadir='${prefix}/share'
141 sysconfdir='${prefix}/etc'
142 sharedstatedir='${prefix}/com'
143 localstatedir='${prefix}/var'
144 libdir='${exec_prefix}/lib'
145 includedir='${prefix}/include'
146 oldincludedir='/usr/include'
147 infodir='${prefix}/info'
148 mandir='${prefix}/man'
149
150 # Initialize some other variables.
151 subdirs=
152 MFLAGS= MAKEFLAGS=
153 SHELL=${CONFIG_SHELL-/bin/sh}
154 # Maximum number of lines to put in a shell here document.
155 ac_max_here_lines=12
156
157 ac_prev=
158 for ac_option
159 do
160
161   # If the previous option needs an argument, assign it.
162   if test -n "$ac_prev"; then
163     eval "$ac_prev=\$ac_option"
164     ac_prev=
165     continue
166   fi
167
168   case "$ac_option" in
169   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
170   *) ac_optarg= ;;
171   esac
172
173   # Accept the important Cygnus configure options, so we can diagnose typos.
174
175   case "$ac_option" in
176
177   -bindir | --bindir | --bindi | --bind | --bin | --bi)
178     ac_prev=bindir ;;
179   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
180     bindir="$ac_optarg" ;;
181
182   -build | --build | --buil | --bui | --bu)
183     ac_prev=build ;;
184   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
185     build="$ac_optarg" ;;
186
187   -cache-file | --cache-file | --cache-fil | --cache-fi \
188   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
189     ac_prev=cache_file ;;
190   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
191   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
192     cache_file="$ac_optarg" ;;
193
194   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
195     ac_prev=datadir ;;
196   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
197   | --da=*)
198     datadir="$ac_optarg" ;;
199
200   -disable-* | --disable-*)
201     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
202     # Reject names that are not valid shell variable names.
203     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
204       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
205     fi
206     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
207     eval "enable_${ac_feature}=no" ;;
208
209   -enable-* | --enable-*)
210     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
211     # Reject names that are not valid shell variable names.
212     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
213       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
214     fi
215     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
216     case "$ac_option" in
217       *=*) ;;
218       *) ac_optarg=yes ;;
219     esac
220     eval "enable_${ac_feature}='$ac_optarg'" ;;
221
222   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
223   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
224   | --exec | --exe | --ex)
225     ac_prev=exec_prefix ;;
226   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
227   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
228   | --exec=* | --exe=* | --ex=*)
229     exec_prefix="$ac_optarg" ;;
230
231   -gas | --gas | --ga | --g)
232     # Obsolete; use --with-gas.
233     with_gas=yes ;;
234
235   -help | --help | --hel | --he)
236     # Omit some internal or obsolete options to make the list less imposing.
237     # This message is too long to be a string in the A/UX 3.1 sh.
238     cat << EOF
239 Usage: configure [options] [host]
240 Options: [defaults in brackets after descriptions]
241 Configuration:
242   --cache-file=FILE       cache test results in FILE
243   --help                  print this message
244   --no-create             do not create output files
245   --quiet, --silent       do not print \`checking...' messages
246   --version               print the version of autoconf that created configure
247 Directory and file names:
248   --prefix=PREFIX         install architecture-independent files in PREFIX
249                           [$ac_default_prefix]
250   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
251                           [same as prefix]
252   --bindir=DIR            user executables in DIR [EPREFIX/bin]
253   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
254   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
255   --datadir=DIR           read-only architecture-independent data in DIR
256                           [PREFIX/share]
257   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
258   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
259                           [PREFIX/com]
260   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
261   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
262   --includedir=DIR        C header files in DIR [PREFIX/include]
263   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
264   --infodir=DIR           info documentation in DIR [PREFIX/info]
265   --mandir=DIR            man documentation in DIR [PREFIX/man]
266   --srcdir=DIR            find the sources in DIR [configure dir or ..]
267   --program-prefix=PREFIX prepend PREFIX to installed program names
268   --program-suffix=SUFFIX append SUFFIX to installed program names
269   --program-transform-name=PROGRAM
270                           run sed PROGRAM on installed program names
271 EOF
272     cat << EOF
273 Host type:
274   --build=BUILD           configure for building on BUILD [BUILD=HOST]
275   --host=HOST             configure for HOST [guessed]
276   --target=TARGET         configure for TARGET [TARGET=HOST]
277 Features and packages:
278   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
279   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
280   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
281   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
282   --x-includes=DIR        X include files are in DIR
283   --x-libraries=DIR       X library files are in DIR
284 EOF
285     if test -n "$ac_help"; then
286       echo "--enable and --with options recognized:$ac_help"
287     fi
288     exit 0 ;;
289
290   -host | --host | --hos | --ho)
291     ac_prev=host ;;
292   -host=* | --host=* | --hos=* | --ho=*)
293     host="$ac_optarg" ;;
294
295   -includedir | --includedir | --includedi | --included | --include \
296   | --includ | --inclu | --incl | --inc)
297     ac_prev=includedir ;;
298   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
299   | --includ=* | --inclu=* | --incl=* | --inc=*)
300     includedir="$ac_optarg" ;;
301
302   -infodir | --infodir | --infodi | --infod | --info | --inf)
303     ac_prev=infodir ;;
304   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
305     infodir="$ac_optarg" ;;
306
307   -libdir | --libdir | --libdi | --libd)
308     ac_prev=libdir ;;
309   -libdir=* | --libdir=* | --libdi=* | --libd=*)
310     libdir="$ac_optarg" ;;
311
312   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
313   | --libexe | --libex | --libe)
314     ac_prev=libexecdir ;;
315   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
316   | --libexe=* | --libex=* | --libe=*)
317     libexecdir="$ac_optarg" ;;
318
319   -localstatedir | --localstatedir | --localstatedi | --localstated \
320   | --localstate | --localstat | --localsta | --localst \
321   | --locals | --local | --loca | --loc | --lo)
322     ac_prev=localstatedir ;;
323   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
324   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
325   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
326     localstatedir="$ac_optarg" ;;
327
328   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
329     ac_prev=mandir ;;
330   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
331     mandir="$ac_optarg" ;;
332
333   -nfp | --nfp | --nf)
334     # Obsolete; use --without-fp.
335     with_fp=no ;;
336
337   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
338   | --no-cr | --no-c)
339     no_create=yes ;;
340
341   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
342   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
343     no_recursion=yes ;;
344
345   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
346   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
347   | --oldin | --oldi | --old | --ol | --o)
348     ac_prev=oldincludedir ;;
349   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
350   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
351   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
352     oldincludedir="$ac_optarg" ;;
353
354   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
355     ac_prev=prefix ;;
356   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
357     prefix="$ac_optarg" ;;
358
359   -program-prefix | --program-prefix | --program-prefi | --program-pref \
360   | --program-pre | --program-pr | --program-p)
361     ac_prev=program_prefix ;;
362   -program-prefix=* | --program-prefix=* | --program-prefi=* \
363   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
364     program_prefix="$ac_optarg" ;;
365
366   -program-suffix | --program-suffix | --program-suffi | --program-suff \
367   | --program-suf | --program-su | --program-s)
368     ac_prev=program_suffix ;;
369   -program-suffix=* | --program-suffix=* | --program-suffi=* \
370   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
371     program_suffix="$ac_optarg" ;;
372
373   -program-transform-name | --program-transform-name \
374   | --program-transform-nam | --program-transform-na \
375   | --program-transform-n | --program-transform- \
376   | --program-transform | --program-transfor \
377   | --program-transfo | --program-transf \
378   | --program-trans | --program-tran \
379   | --progr-tra | --program-tr | --program-t)
380     ac_prev=program_transform_name ;;
381   -program-transform-name=* | --program-transform-name=* \
382   | --program-transform-nam=* | --program-transform-na=* \
383   | --program-transform-n=* | --program-transform-=* \
384   | --program-transform=* | --program-transfor=* \
385   | --program-transfo=* | --program-transf=* \
386   | --program-trans=* | --program-tran=* \
387   | --progr-tra=* | --program-tr=* | --program-t=*)
388     program_transform_name="$ac_optarg" ;;
389
390   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
391   | -silent | --silent | --silen | --sile | --sil)
392     silent=yes ;;
393
394   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
395     ac_prev=sbindir ;;
396   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
397   | --sbi=* | --sb=*)
398     sbindir="$ac_optarg" ;;
399
400   -sharedstatedir | --sharedstatedir | --sharedstatedi \
401   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
402   | --sharedst | --shareds | --shared | --share | --shar \
403   | --sha | --sh)
404     ac_prev=sharedstatedir ;;
405   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
406   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
407   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
408   | --sha=* | --sh=*)
409     sharedstatedir="$ac_optarg" ;;
410
411   -site | --site | --sit)
412     ac_prev=site ;;
413   -site=* | --site=* | --sit=*)
414     site="$ac_optarg" ;;
415
416   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
417     ac_prev=srcdir ;;
418   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
419     srcdir="$ac_optarg" ;;
420
421   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
422   | --syscon | --sysco | --sysc | --sys | --sy)
423     ac_prev=sysconfdir ;;
424   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
425   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
426     sysconfdir="$ac_optarg" ;;
427
428   -target | --target | --targe | --targ | --tar | --ta | --t)
429     ac_prev=target ;;
430   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
431     target="$ac_optarg" ;;
432
433   -v | -verbose | --verbose | --verbos | --verbo | --verb)
434     verbose=yes ;;
435
436   -version | --version | --versio | --versi | --vers)
437     echo "configure generated by autoconf version 2.12.1"
438     exit 0 ;;
439
440   -with-* | --with-*)
441     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
442     # Reject names that are not valid shell variable names.
443     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
444       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
445     fi
446     ac_package=`echo $ac_package| sed 's/-/_/g'`
447     case "$ac_option" in
448       *=*) ;;
449       *) ac_optarg=yes ;;
450     esac
451     eval "with_${ac_package}='$ac_optarg'" ;;
452
453   -without-* | --without-*)
454     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
455     # Reject names that are not valid shell variable names.
456     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
457       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
458     fi
459     ac_package=`echo $ac_package| sed 's/-/_/g'`
460     eval "with_${ac_package}=no" ;;
461
462   --x)
463     # Obsolete; use --with-x.
464     with_x=yes ;;
465
466   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
467   | --x-incl | --x-inc | --x-in | --x-i)
468     ac_prev=x_includes ;;
469   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
470   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
471     x_includes="$ac_optarg" ;;
472
473   -x-libraries | --x-libraries | --x-librarie | --x-librari \
474   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
475     ac_prev=x_libraries ;;
476   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
477   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
478     x_libraries="$ac_optarg" ;;
479
480   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
481     ;;
482
483   *)
484     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
485       echo "configure: warning: $ac_option: invalid host type" 1>&2
486     fi
487     if test "x$nonopt" != xNONE; then
488       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
489     fi
490     nonopt="$ac_option"
491     ;;
492
493   esac
494 done
495
496 if test -n "$ac_prev"; then
497   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
498 fi
499
500 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
501
502 # File descriptor usage:
503 # 0 standard input
504 # 1 file creation
505 # 2 errors and warnings
506 # 3 some systems may open it to /dev/tty
507 # 4 used on the Kubota Titan
508 # 6 checking for... messages and results
509 # 5 compiler messages saved in config.log
510 if test "$silent" = yes; then
511   exec 6>/dev/null
512 else
513   exec 6>&1
514 fi
515 exec 5>./config.log
516
517 echo "\
518 This file contains any messages produced by compilers while
519 running configure, to aid debugging if configure makes a mistake.
520 " 1>&5
521
522 # Strip out --no-create and --no-recursion so they do not pile up.
523 # Also quote any args containing shell metacharacters.
524 ac_configure_args=
525 for ac_arg
526 do
527   case "$ac_arg" in
528   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
529   | --no-cr | --no-c) ;;
530   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
531   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
532   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
533   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
534   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
535   esac
536 done
537
538 # NLS nuisances.
539 # Only set these to C if already set.  These must not be set unconditionally
540 # because not all systems understand e.g. LANG=C (notably SCO).
541 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
542 # Non-C LC_CTYPE values break the ctype check.
543 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
544 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
545 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
546 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
547
548 # confdefs.h avoids OS command line length limits that DEFS can exceed.
549 rm -rf conftest* confdefs.h
550 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
551 echo > confdefs.h
552
553 # A filename unique to this package, relative to the directory that
554 # configure is in, which we can look for to find out if srcdir is correct.
555 ac_unique_file=Makefile.in
556
557 # Find the source files, if location was not specified.
558 if test -z "$srcdir"; then
559   ac_srcdir_defaulted=yes
560   # Try the directory containing this script, then its parent.
561   ac_prog=$0
562   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
563   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
564   srcdir=$ac_confdir
565   if test ! -r $srcdir/$ac_unique_file; then
566     srcdir=..
567   fi
568 else
569   ac_srcdir_defaulted=no
570 fi
571 if test ! -r $srcdir/$ac_unique_file; then
572   if test "$ac_srcdir_defaulted" = yes; then
573     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
574   else
575     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
576   fi
577 fi
578 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
579
580 # Prefer explicitly selected file to automatically selected ones.
581 if test -z "$CONFIG_SITE"; then
582   if test "x$prefix" != xNONE; then
583     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
584   else
585     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
586   fi
587 fi
588 for ac_site_file in $CONFIG_SITE; do
589   if test -r "$ac_site_file"; then
590     echo "loading site script $ac_site_file"
591     . "$ac_site_file"
592   fi
593 done
594
595 if test -r "$cache_file"; then
596   echo "loading cache $cache_file"
597   . $cache_file
598 else
599   echo "creating cache $cache_file"
600   > $cache_file
601 fi
602
603 ac_ext=c
604 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
605 ac_cpp='$CPP $CPPFLAGS'
606 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
607 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
608 cross_compiling=$ac_cv_prog_cc_cross
609
610 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
611   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
612   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
613     ac_n= ac_c='
614 ' ac_t='        '
615   else
616     ac_n=-n ac_c= ac_t=
617   fi
618 else
619   ac_n= ac_c='\c' ac_t=
620 fi
621
622
623
624 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
625 echo "configure:626: checking how to run the C preprocessor" >&5
626 # On Suns, sometimes $CPP names a directory.
627 if test -n "$CPP" && test -d "$CPP"; then
628   CPP=
629 fi
630 if test -z "$CPP"; then
631 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
632   echo $ac_n "(cached) $ac_c" 1>&6
633 else
634     # This must be in double quotes, not single quotes, because CPP may get
635   # substituted into the Makefile and "${CC-cc}" will confuse make.
636   CPP="${CC-cc} -E"
637   # On the NeXT, cc -E runs the code through the compiler's parser,
638   # not just through cpp.
639   cat > conftest.$ac_ext <<EOF
640 #line 641 "configure"
641 #include "confdefs.h"
642 #include <assert.h>
643 Syntax Error
644 EOF
645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
646 { (eval echo configure:647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
647 ac_err=`grep -v '^ *+' conftest.out`
648 if test -z "$ac_err"; then
649   :
650 else
651   echo "$ac_err" >&5
652   echo "configure: failed program was:" >&5
653   cat conftest.$ac_ext >&5
654   rm -rf conftest*
655   CPP="${CC-cc} -E -traditional-cpp"
656   cat > conftest.$ac_ext <<EOF
657 #line 658 "configure"
658 #include "confdefs.h"
659 #include <assert.h>
660 Syntax Error
661 EOF
662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
663 { (eval echo configure:664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
664 ac_err=`grep -v '^ *+' conftest.out`
665 if test -z "$ac_err"; then
666   :
667 else
668   echo "$ac_err" >&5
669   echo "configure: failed program was:" >&5
670   cat conftest.$ac_ext >&5
671   rm -rf conftest*
672   CPP=/lib/cpp
673 fi
674 rm -f conftest*
675 fi
676 rm -f conftest*
677   ac_cv_prog_CPP="$CPP"
678 fi
679   CPP="$ac_cv_prog_CPP"
680 else
681   ac_cv_prog_CPP="$CPP"
682 fi
683 echo "$ac_t""$CPP" 1>&6
684
685
686 # autoconf.info says this should be called right after AC_INIT.
687
688
689 ac_aux_dir=
690 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
691   if test -f $ac_dir/install-sh; then
692     ac_aux_dir=$ac_dir
693     ac_install_sh="$ac_aux_dir/install-sh -c"
694     break
695   elif test -f $ac_dir/install.sh; then
696     ac_aux_dir=$ac_dir
697     ac_install_sh="$ac_aux_dir/install.sh -c"
698     break
699   fi
700 done
701 if test -z "$ac_aux_dir"; then
702   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
703 fi
704 ac_config_guess=$ac_aux_dir/config.guess
705 ac_config_sub=$ac_aux_dir/config.sub
706 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
707
708
709 # Do some error checking and defaulting for the host and target type.
710 # The inputs are:
711 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
712 #
713 # The rules are:
714 # 1. You are not allowed to specify --host, --target, and nonopt at the
715 #    same time.
716 # 2. Host defaults to nonopt.
717 # 3. If nonopt is not specified, then host defaults to the current host,
718 #    as determined by config.guess.
719 # 4. Target and build default to nonopt.
720 # 5. If nonopt is not specified, then target and build default to host.
721
722 # The aliases save the names the user supplied, while $host etc.
723 # will get canonicalized.
724 case $host---$target---$nonopt in
725 NONE---*---* | *---NONE---* | *---*---NONE) ;;
726 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
727 esac
728
729
730 # Make sure we can run config.sub.
731 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
732 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
733 fi
734
735 echo $ac_n "checking host system type""... $ac_c" 1>&6
736 echo "configure:737: checking host system type" >&5
737
738 host_alias=$host
739 case "$host_alias" in
740 NONE)
741   case $nonopt in
742   NONE)
743     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
744     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
745     fi ;;
746   *) host_alias=$nonopt ;;
747   esac ;;
748 esac
749
750 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
751 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
752 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
753 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
754 echo "$ac_t""$host" 1>&6
755
756 echo $ac_n "checking target system type""... $ac_c" 1>&6
757 echo "configure:758: checking target system type" >&5
758
759 target_alias=$target
760 case "$target_alias" in
761 NONE)
762   case $nonopt in
763   NONE) target_alias=$host_alias ;;
764   *) target_alias=$nonopt ;;
765   esac ;;
766 esac
767
768 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
769 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
770 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
771 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
772 echo "$ac_t""$target" 1>&6
773
774 echo $ac_n "checking build system type""... $ac_c" 1>&6
775 echo "configure:776: checking build system type" >&5
776
777 build_alias=$build
778 case "$build_alias" in
779 NONE)
780   case $nonopt in
781   NONE) build_alias=$host_alias ;;
782   *) build_alias=$nonopt ;;
783   esac ;;
784 esac
785
786 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
787 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
788 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
789 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
790 echo "$ac_t""$build" 1>&6
791
792 test "$host_alias" != "$target_alias" &&
793   test "$program_prefix$program_suffix$program_transform_name" = \
794     NONENONEs,x,x, &&
795   program_prefix=${target_alias}-
796
797 if test "$program_transform_name" = s,x,x,; then
798   program_transform_name=
799 else
800   # Double any \ or $.  echo might interpret backslashes.
801   cat <<\EOF_SED > conftestsed
802 s,\\,\\\\,g; s,\$,$$,g
803 EOF_SED
804   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
805   rm -f conftestsed
806 fi
807 test "$program_prefix" != NONE &&
808   program_transform_name="s,^,${program_prefix},; $program_transform_name"
809 # Use a double $ so make ignores it.
810 test "$program_suffix" != NONE &&
811   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
812
813 # sed with no file args requires a program.
814 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
815
816 # Extract the first word of "gcc", so it can be a program name with args.
817 set dummy gcc; ac_word=$2
818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
819 echo "configure:820: checking for $ac_word" >&5
820 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
821   echo $ac_n "(cached) $ac_c" 1>&6
822 else
823   if test -n "$CC"; then
824   ac_cv_prog_CC="$CC" # Let the user override the test.
825 else
826   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
827   for ac_dir in $PATH; do
828     test -z "$ac_dir" && ac_dir=.
829     if test -f $ac_dir/$ac_word; then
830       ac_cv_prog_CC="gcc"
831       break
832     fi
833   done
834   IFS="$ac_save_ifs"
835 fi
836 fi
837 CC="$ac_cv_prog_CC"
838 if test -n "$CC"; then
839   echo "$ac_t""$CC" 1>&6
840 else
841   echo "$ac_t""no" 1>&6
842 fi
843
844 if test -z "$CC"; then
845   # Extract the first word of "cc", so it can be a program name with args.
846 set dummy cc; ac_word=$2
847 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
848 echo "configure:849: checking for $ac_word" >&5
849 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
850   echo $ac_n "(cached) $ac_c" 1>&6
851 else
852   if test -n "$CC"; then
853   ac_cv_prog_CC="$CC" # Let the user override the test.
854 else
855   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
856   ac_prog_rejected=no
857   for ac_dir in $PATH; do
858     test -z "$ac_dir" && ac_dir=.
859     if test -f $ac_dir/$ac_word; then
860       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
861         ac_prog_rejected=yes
862         continue
863       fi
864       ac_cv_prog_CC="cc"
865       break
866     fi
867   done
868   IFS="$ac_save_ifs"
869 if test $ac_prog_rejected = yes; then
870   # We found a bogon in the path, so make sure we never use it.
871   set dummy $ac_cv_prog_CC
872   shift
873   if test $# -gt 0; then
874     # We chose a different compiler from the bogus one.
875     # However, it has the same basename, so the bogon will be chosen
876     # first if we set CC to just the basename; use the full file name.
877     shift
878     set dummy "$ac_dir/$ac_word" "$@"
879     shift
880     ac_cv_prog_CC="$@"
881   fi
882 fi
883 fi
884 fi
885 CC="$ac_cv_prog_CC"
886 if test -n "$CC"; then
887   echo "$ac_t""$CC" 1>&6
888 else
889   echo "$ac_t""no" 1>&6
890 fi
891
892   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
893 fi
894
895 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
896 echo "configure:897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
897
898 ac_ext=c
899 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
900 ac_cpp='$CPP $CPPFLAGS'
901 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
902 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
903 cross_compiling=$ac_cv_prog_cc_cross
904
905 cat > conftest.$ac_ext <<EOF
906 #line 907 "configure"
907 #include "confdefs.h"
908 main(){return(0);}
909 EOF
910 if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
911   ac_cv_prog_cc_works=yes
912   # If we can't run a trivial program, we are probably using a cross compiler.
913   if (./conftest; exit) 2>/dev/null; then
914     ac_cv_prog_cc_cross=no
915   else
916     ac_cv_prog_cc_cross=yes
917   fi
918 else
919   echo "configure: failed program was:" >&5
920   cat conftest.$ac_ext >&5
921   ac_cv_prog_cc_works=no
922 fi
923 rm -fr conftest*
924
925 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
926 if test $ac_cv_prog_cc_works = no; then
927   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
928 fi
929 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
930 echo "configure:931: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
931 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
932 cross_compiling=$ac_cv_prog_cc_cross
933
934 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
935 echo "configure:936: checking whether we are using GNU C" >&5
936 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
937   echo $ac_n "(cached) $ac_c" 1>&6
938 else
939   cat > conftest.c <<EOF
940 #ifdef __GNUC__
941   yes;
942 #endif
943 EOF
944 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
945   ac_cv_prog_gcc=yes
946 else
947   ac_cv_prog_gcc=no
948 fi
949 fi
950
951 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
952
953 if test $ac_cv_prog_gcc = yes; then
954   GCC=yes
955   ac_test_CFLAGS="${CFLAGS+set}"
956   ac_save_CFLAGS="$CFLAGS"
957   CFLAGS=
958   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
959 echo "configure:960: checking whether ${CC-cc} accepts -g" >&5
960 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
961   echo $ac_n "(cached) $ac_c" 1>&6
962 else
963   echo 'void f(){}' > conftest.c
964 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
965   ac_cv_prog_cc_g=yes
966 else
967   ac_cv_prog_cc_g=no
968 fi
969 rm -f conftest*
970
971 fi
972
973 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
974   if test "$ac_test_CFLAGS" = set; then
975     CFLAGS="$ac_save_CFLAGS"
976   elif test $ac_cv_prog_cc_g = yes; then
977     CFLAGS="-g -O2"
978   else
979     CFLAGS="-O2"
980   fi
981 else
982   GCC=
983   test "${CFLAGS+set}" = set || CFLAGS="-g"
984 fi
985
986 # Find a good install program.  We prefer a C program (faster),
987 # so one script is as good as another.  But avoid the broken or
988 # incompatible versions:
989 # SysV /etc/install, /usr/sbin/install
990 # SunOS /usr/etc/install
991 # IRIX /sbin/install
992 # AIX /bin/install
993 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
994 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
995 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
996 # ./install, which can be erroneously created by make from ./install.sh.
997 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
998 echo "configure:999: checking for a BSD compatible install" >&5
999 if test -z "$INSTALL"; then
1000 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1001   echo $ac_n "(cached) $ac_c" 1>&6
1002 else
1003     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1004   for ac_dir in $PATH; do
1005     # Account for people who put trailing slashes in PATH elements.
1006     case "$ac_dir/" in
1007     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1008     *)
1009       # OSF1 and SCO ODT 3.0 have their own names for install.
1010       # Don't use installbsd from OSF since it installs stuff as root
1011       # by default.
1012       for ac_prog in ginstall scoinst install; do
1013         if test -f $ac_dir/$ac_prog; then
1014           if test $ac_prog = install &&
1015             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1016             # AIX install.  It has an incompatible calling convention.
1017             :
1018           else
1019             ac_cv_path_install="$ac_dir/$ac_prog -c"
1020             break 2
1021           fi
1022         fi
1023       done
1024       ;;
1025     esac
1026   done
1027   IFS="$ac_save_IFS"
1028
1029 fi
1030   if test "${ac_cv_path_install+set}" = set; then
1031     INSTALL="$ac_cv_path_install"
1032   else
1033     # As a last resort, use the slow shell script.  We don't cache a
1034     # path for INSTALL within a source directory, because that will
1035     # break other packages using the cache if that directory is
1036     # removed, or if the path is relative.
1037     INSTALL="$ac_install_sh"
1038   fi
1039 fi
1040 echo "$ac_t""$INSTALL" 1>&6
1041
1042 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1043 # It thinks the first close brace ends the variable substitution.
1044 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1045
1046 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1047
1048
1049 # Put a plausible default for CC_FOR_BUILD in Makefile.
1050 if test "x$cross_compiling" = "xno"; then
1051   CC_FOR_BUILD='$(CC)'
1052 else
1053   CC_FOR_BUILD=gcc
1054 fi
1055
1056
1057
1058
1059 AR=${AR-ar}
1060
1061 # Extract the first word of "ranlib", so it can be a program name with args.
1062 set dummy ranlib; ac_word=$2
1063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1064 echo "configure:1065: checking for $ac_word" >&5
1065 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1066   echo $ac_n "(cached) $ac_c" 1>&6
1067 else
1068   if test -n "$RANLIB"; then
1069   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1070 else
1071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1072   for ac_dir in $PATH; do
1073     test -z "$ac_dir" && ac_dir=.
1074     if test -f $ac_dir/$ac_word; then
1075       ac_cv_prog_RANLIB="ranlib"
1076       break
1077     fi
1078   done
1079   IFS="$ac_save_ifs"
1080   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1081 fi
1082 fi
1083 RANLIB="$ac_cv_prog_RANLIB"
1084 if test -n "$RANLIB"; then
1085   echo "$ac_t""$RANLIB" 1>&6
1086 else
1087   echo "$ac_t""no" 1>&6
1088 fi
1089
1090
1091 # Check for common headers.
1092 # FIXME: Seems to me this can cause problems for i386-windows hosts.
1093 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
1094 for ac_hdr in stdlib.h string.h strings.h unistd.h time.h sys/time.h sys/resource.h
1095 do
1096 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1097 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1098 echo "configure:1099: checking for $ac_hdr" >&5
1099 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1100   echo $ac_n "(cached) $ac_c" 1>&6
1101 else
1102   cat > conftest.$ac_ext <<EOF
1103 #line 1104 "configure"
1104 #include "confdefs.h"
1105 #include <$ac_hdr>
1106 EOF
1107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1108 { (eval echo configure:1109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1109 ac_err=`grep -v '^ *+' conftest.out`
1110 if test -z "$ac_err"; then
1111   rm -rf conftest*
1112   eval "ac_cv_header_$ac_safe=yes"
1113 else
1114   echo "$ac_err" >&5
1115   echo "configure: failed program was:" >&5
1116   cat conftest.$ac_ext >&5
1117   rm -rf conftest*
1118   eval "ac_cv_header_$ac_safe=no"
1119 fi
1120 rm -f conftest*
1121 fi
1122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1123   echo "$ac_t""yes" 1>&6
1124     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1125   cat >> confdefs.h <<EOF
1126 #define $ac_tr_hdr 1
1127 EOF
1128  
1129 else
1130   echo "$ac_t""no" 1>&6
1131 fi
1132 done
1133
1134 for ac_func in getrusage time sigaction
1135 do
1136 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1137 echo "configure:1138: checking for $ac_func" >&5
1138 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1139   echo $ac_n "(cached) $ac_c" 1>&6
1140 else
1141   cat > conftest.$ac_ext <<EOF
1142 #line 1143 "configure"
1143 #include "confdefs.h"
1144 /* System header to define __stub macros and hopefully few prototypes,
1145     which can conflict with char $ac_func(); below.  */
1146 #include <assert.h>
1147 /* Override any gcc2 internal prototype to avoid an error.  */
1148 /* We use char because int might match the return type of a gcc2
1149     builtin and then its argument prototype would still apply.  */
1150 char $ac_func();
1151
1152 int main() {
1153
1154 /* The GNU C library defines this for functions which it implements
1155     to always fail with ENOSYS.  Some functions are actually named
1156     something starting with __ and the normal name is an alias.  */
1157 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1158 choke me
1159 #else
1160 $ac_func();
1161 #endif
1162
1163 ; return 0; }
1164 EOF
1165 if { (eval echo configure:1166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1166   rm -rf conftest*
1167   eval "ac_cv_func_$ac_func=yes"
1168 else
1169   echo "configure: failed program was:" >&5
1170   cat conftest.$ac_ext >&5
1171   rm -rf conftest*
1172   eval "ac_cv_func_$ac_func=no"
1173 fi
1174 rm -f conftest*
1175 fi
1176
1177 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1178   echo "$ac_t""yes" 1>&6
1179     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1180   cat >> confdefs.h <<EOF
1181 #define $ac_tr_func 1
1182 EOF
1183  
1184 else
1185   echo "$ac_t""no" 1>&6
1186 fi
1187 done
1188
1189
1190 . ${srcdir}/../../bfd/configure.host
1191
1192
1193
1194 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1195 if test "${enable_maintainer_mode+set}" = set; then
1196   enableval="$enable_maintainer_mode"
1197   case "${enableval}" in
1198   yes)  MAINT="" ;;
1199   no)   MAINT="#" ;;
1200   *)    { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
1201 esac
1202 if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
1203   echo "Setting maintainer mode" 6>&1
1204 fi
1205 else
1206   MAINT="#"
1207 fi
1208
1209
1210
1211 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
1212 if test "${enable_sim_bswap+set}" = set; then
1213   enableval="$enable_sim_bswap"
1214   case "${enableval}" in
1215   yes)  sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
1216   no)   sim_bswap="-DWITH_BSWAP=0";;
1217   *)    { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
1218 esac
1219 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
1220   echo "Setting bswap flags = $sim_bswap" 6>&1
1221 fi
1222 else
1223   sim_bswap=""
1224 fi
1225
1226
1227
1228 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
1229 if test "${enable_sim_cflags+set}" = set; then
1230   enableval="$enable_sim_cflags"
1231   case "${enableval}" in
1232   yes)   sim_cflags="-O2";;
1233   trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
1234   no)    sim_cflags="";;
1235   *)     sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1236 esac
1237 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
1238   echo "Setting sim cflags = $sim_cflags" 6>&1
1239 fi
1240 else
1241   sim_cflags=""
1242 fi
1243
1244
1245
1246 # Check whether --enable-sim-debug or --disable-sim-debug was given.
1247 if test "${enable_sim_debug+set}" = set; then
1248   enableval="$enable_sim_debug"
1249   case "${enableval}" in
1250   yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
1251   no)  sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
1252   *)   sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
1253 esac
1254 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
1255   echo "Setting sim debug = $sim_debug" 6>&1
1256 fi
1257 else
1258   sim_debug=""
1259 fi
1260
1261
1262
1263 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
1264 if test "${enable_sim_stdio+set}" = set; then
1265   enableval="$enable_sim_stdio"
1266   case "${enableval}" in
1267   yes)  sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
1268   no)   sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
1269   *)    { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
1270 esac
1271 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
1272   echo "Setting stdio flags = $sim_stdio" 6>&1
1273 fi
1274 else
1275   sim_stdio=""
1276 fi
1277
1278
1279
1280 # Check whether --enable-sim-trace or --disable-sim-trace was given.
1281 if test "${enable_sim_trace+set}" = set; then
1282   enableval="$enable_sim_trace"
1283   case "${enableval}" in
1284   yes)  sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
1285   no)   sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
1286   [-0-9]*)
1287         sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
1288   [a-z]*)
1289         sim_trace=""
1290         for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
1291           if test x"$sim_trace" = x; then
1292             sim_trace="-DWITH_TRACE='(TRACE_$x"
1293           else
1294             sim_trace="${sim_trace}|TRACE_$x"
1295           fi
1296         done
1297         sim_trace="$sim_trace)'" ;;
1298 esac
1299 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
1300   echo "Setting sim trace = $sim_trace" 6>&1
1301 fi
1302 else
1303   sim_trace=""
1304 fi
1305
1306
1307
1308 # Check whether --enable-sim-profile or --disable-sim-profile was given.
1309 if test "${enable_sim_profile+set}" = set; then
1310   enableval="$enable_sim_profile"
1311   case "${enableval}" in
1312   yes)  sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
1313   no)   sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
1314   [-0-9]*)
1315         sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
1316   [a-z]*)
1317         sim_profile=""
1318         for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
1319           if test x"$sim_profile" = x; then
1320             sim_profile="-DWITH_PROFILE='(PROFILE_$x"
1321           else
1322             sim_profile="${sim_profile}|PROFILE_$x"
1323           fi
1324         done
1325         sim_profile="$sim_profile)'" ;;
1326 esac
1327 if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
1328   echo "Setting sim profile = $sim_profile" 6>&1
1329 fi
1330 else
1331   sim_profile=""
1332 fi
1333
1334
1335
1336 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1337 echo "configure:1338: checking return type of signal handlers" >&5
1338 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1339   echo $ac_n "(cached) $ac_c" 1>&6
1340 else
1341   cat > conftest.$ac_ext <<EOF
1342 #line 1343 "configure"
1343 #include "confdefs.h"
1344 #include <sys/types.h>
1345 #include <signal.h>
1346 #ifdef signal
1347 #undef signal
1348 #endif
1349 #ifdef __cplusplus
1350 extern "C" void (*signal (int, void (*)(int)))(int);
1351 #else
1352 void (*signal ()) ();
1353 #endif
1354
1355 int main() {
1356 int i;
1357 ; return 0; }
1358 EOF
1359 if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1360   rm -rf conftest*
1361   ac_cv_type_signal=void
1362 else
1363   echo "configure: failed program was:" >&5
1364   cat conftest.$ac_ext >&5
1365   rm -rf conftest*
1366   ac_cv_type_signal=int
1367 fi
1368 rm -f conftest*
1369 fi
1370
1371 echo "$ac_t""$ac_cv_type_signal" 1>&6
1372 cat >> confdefs.h <<EOF
1373 #define RETSIGTYPE $ac_cv_type_signal
1374 EOF
1375
1376
1377
1378
1379 sim_link_files=
1380 sim_link_links=
1381
1382 sim_link_links=tconfig.h
1383 if test -f ${srcdir}/tconfig.in
1384 then
1385   sim_link_files=tconfig.in
1386 else
1387   sim_link_files=../common/tconfig.in
1388 fi
1389
1390 # targ-vals.def points to the libc macro description file.
1391 case "${target}" in
1392 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
1393 esac
1394 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
1395 sim_link_links="${sim_link_links} targ-vals.def"
1396
1397
1398
1399 sim_link_files="${sim_link_files} m32r-sim.h ../../opcodes/m32r-opc.h"
1400 sim_link_links="${sim_link_links} cpu-sim.h cpu-opc.h"
1401
1402
1403 wire_endian="BIG_ENDIAN"
1404 default_endian=""
1405 # Check whether --enable-sim-endian or --disable-sim-endian was given.
1406 if test "${enable_sim_endian+set}" = set; then
1407   enableval="$enable_sim_endian"
1408   case "${enableval}" in
1409   b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
1410   l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
1411   yes)   if test x"$wire_endian" != x; then
1412            sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
1413          else
1414            if test x"$default_endian" != x; then
1415              sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
1416            else
1417              echo "No hard-wired endian for target $target" 1>&6
1418              sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
1419            fi
1420          fi;;
1421   no)    if test x"$default_endian" != x; then
1422            sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
1423          else
1424            if test x"$wire_endian" != x; then
1425              sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
1426            else
1427              echo "No default endian for target $target" 1>&6
1428              sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
1429            fi
1430          fi;;
1431   *)     { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
1432 esac
1433 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
1434   echo "Setting endian flags = $sim_endian" 6>&1
1435 fi
1436 else
1437   if test x"$default_endian" != x; then
1438   sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
1439 else
1440   if test x"$wire_endian" != x; then
1441     sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
1442   else
1443     sim_endian=
1444   fi
1445 fi
1446 fi
1447
1448 wire_alignment="NONSTRICT_ALIGNMENT"
1449 default_alignment=""
1450
1451 # Check whether --enable-sim-alignment or --disable-sim-alignment was given.
1452 if test "${enable_sim_alignment+set}" = set; then
1453   enableval="$enable_sim_alignment"
1454   case "${enableval}" in
1455   strict | STRICT)       sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
1456   nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
1457   forced | FORCED)       sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
1458   yes) if test x"$wire_alignment" != x; then
1459          sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
1460        else
1461          if test x"$default_alignment" != x; then
1462            sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
1463          else
1464            echo "No hard-wired alignment for target $target" 1>&6
1465            sim_alignment="-DWITH_ALIGNMENT=0"
1466          fi
1467        fi;;
1468   no)  if test x"$default_alignment" != x; then
1469          sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
1470        else
1471          if test x"$wire_alignment" != x; then
1472            sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
1473          else
1474            echo "No default alignment for target $target" 1>&6
1475            sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
1476          fi
1477        fi;;
1478   *)   { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
1479 esac
1480 if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
1481   echo "Setting alignment flags = $sim_alignment" 6>&1
1482 fi
1483 else
1484   if test x"$default_alignment" != x; then
1485   sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
1486 else
1487   if test x"$wire_alignment" != x; then
1488     sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
1489   else
1490     sim_alignment=
1491   fi
1492 fi
1493 fi
1494
1495
1496 # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
1497 if test "${enable_sim_hostendian+set}" = set; then
1498   enableval="$enable_sim_hostendian"
1499   case "${enableval}" in
1500   no)    sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
1501   b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
1502   l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
1503   *)     { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
1504 esac
1505 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
1506   echo "Setting hostendian flags = $sim_hostendian" 6>&1
1507 fi
1508 else
1509   
1510 if test "x$cross_compiling" = "xno"; then
1511   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1512 echo "configure:1513: checking whether byte ordering is bigendian" >&5
1513 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1514   echo $ac_n "(cached) $ac_c" 1>&6
1515 else
1516   ac_cv_c_bigendian=unknown
1517 # See if sys/param.h defines the BYTE_ORDER macro.
1518 cat > conftest.$ac_ext <<EOF
1519 #line 1520 "configure"
1520 #include "confdefs.h"
1521 #include <sys/types.h>
1522 #include <sys/param.h>
1523 int main() {
1524
1525 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1526  bogus endian macros
1527 #endif
1528 ; return 0; }
1529 EOF
1530 if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1531   rm -rf conftest*
1532   # It does; now see whether it defined to BIG_ENDIAN or not.
1533 cat > conftest.$ac_ext <<EOF
1534 #line 1535 "configure"
1535 #include "confdefs.h"
1536 #include <sys/types.h>
1537 #include <sys/param.h>
1538 int main() {
1539
1540 #if BYTE_ORDER != BIG_ENDIAN
1541  not big endian
1542 #endif
1543 ; return 0; }
1544 EOF
1545 if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1546   rm -rf conftest*
1547   ac_cv_c_bigendian=yes
1548 else
1549   echo "configure: failed program was:" >&5
1550   cat conftest.$ac_ext >&5
1551   rm -rf conftest*
1552   ac_cv_c_bigendian=no
1553 fi
1554 rm -f conftest*
1555 else
1556   echo "configure: failed program was:" >&5
1557   cat conftest.$ac_ext >&5
1558 fi
1559 rm -f conftest*
1560 if test $ac_cv_c_bigendian = unknown; then
1561 if test "$cross_compiling" = yes; then
1562     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1563 else
1564   cat > conftest.$ac_ext <<EOF
1565 #line 1566 "configure"
1566 #include "confdefs.h"
1567 main () {
1568   /* Are we little or big endian?  From Harbison&Steele.  */
1569   union
1570   {
1571     long l;
1572     char c[sizeof (long)];
1573   } u;
1574   u.l = 1;
1575   exit (u.c[sizeof (long) - 1] == 1);
1576 }
1577 EOF
1578 if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1579 then
1580   ac_cv_c_bigendian=no
1581 else
1582   echo "configure: failed program was:" >&5
1583   cat conftest.$ac_ext >&5
1584   rm -fr conftest*
1585   ac_cv_c_bigendian=yes
1586 fi
1587 rm -fr conftest*
1588 fi
1589
1590 fi
1591 fi
1592
1593 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1594 if test $ac_cv_c_bigendian = yes; then
1595   cat >> confdefs.h <<\EOF
1596 #define WORDS_BIGENDIAN 1
1597 EOF
1598
1599 fi
1600
1601   if test $ac_cv_c_bigendian = yes; then
1602     sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
1603   else
1604     sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
1605   fi
1606 else
1607   sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
1608 fi
1609 fi
1610
1611
1612 default_sim_scache="1024"
1613 # Check whether --enable-sim-scache or --disable-sim-scache was given.
1614 if test "${enable_sim_scache+set}" = set; then
1615   enableval="$enable_sim_scache"
1616   case "${enableval}" in
1617   yes)  sim_scache="-DWITH_SCACHE=${default_sim_scache}";;
1618   no)   sim_scache="-DWITH_SCACHE=0" ;;
1619   [0-9]*) sim_cache=${enableval};;
1620   *)    { echo "configure: error: "Bad value $enableval passed to --enable-sim-scache"" 1>&2; exit 1; };
1621         sim_scache="";;
1622 esac
1623 if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then
1624   echo "Setting scache size = $sim_scache" 6>&1
1625 fi
1626 else
1627   sim_scache="-DWITH_SCACHE=${default_sim_scache}"
1628 fi
1629
1630
1631
1632 default_sim_default_model="m32r/d"
1633 # Check whether --enable-sim-default-model or --disable-sim-default-model was given.
1634 if test "${enable_sim_default_model+set}" = set; then
1635   enableval="$enable_sim_default_model"
1636   case "${enableval}" in
1637   yes|no) { echo "configure: error: "Missing argument to --enable-sim-default-model"" 1>&2; exit 1; };;
1638   *)    sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
1639 esac
1640 if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
1641   echo "Setting default model = $sim_default_model" 6>&1
1642 fi
1643 else
1644   sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
1645 fi
1646
1647
1648
1649 # Check whether --enable-sim-environment or --disable-sim-environment was given.
1650 if test "${enable_sim_environment+set}" = set; then
1651   enableval="$enable_sim_environment"
1652   case "${enableval}" in
1653   all | ALL)             sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";;
1654   user | USER)           sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
1655   virtual | VIRTUAL)     sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
1656   operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
1657   *)   { echo "configure: error: "Unknown value $enableval passed to --enable-sim-environment"" 1>&2; exit 1; };
1658        sim_environment="";;
1659 esac
1660 if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then
1661   echo "Setting sim environment = $sim_environment" 6>&1
1662 fi
1663 else
1664   sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"
1665 fi
1666
1667
1668
1669
1670 trap '' 1 2 15
1671 cat > confcache <<\EOF
1672 # This file is a shell script that caches the results of configure
1673 # tests run on this system so they can be shared between configure
1674 # scripts and configure runs.  It is not useful on other systems.
1675 # If it contains results you don't want to keep, you may remove or edit it.
1676 #
1677 # By default, configure uses ./config.cache as the cache file,
1678 # creating it if it does not exist already.  You can give configure
1679 # the --cache-file=FILE option to use a different cache file; that is
1680 # what configure does when it calls configure scripts in
1681 # subdirectories, so they share the cache.
1682 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1683 # config.status only pays attention to the cache file if you give it the
1684 # --recheck option to rerun configure.
1685 #
1686 EOF
1687 # The following way of writing the cache mishandles newlines in values,
1688 # but we know of no workaround that is simple, portable, and efficient.
1689 # So, don't put newlines in cache variables' values.
1690 # Ultrix sh set writes to stderr and can't be redirected directly,
1691 # and sets the high bit in the cache file unless we assign to the vars.
1692 (set) 2>&1 |
1693   case `(ac_space=' '; set) 2>&1 | grep ac_space` in
1694   *ac_space=\ *)
1695     # `set' does not quote correctly, so add quotes (double-quote substitution
1696     # turns \\\\ into \\, and sed turns \\ into \).
1697     sed -n \
1698       -e "s/'/'\\\\''/g" \
1699       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1700     ;;
1701   *)
1702     # `set' quotes correctly as required by POSIX, so do not add quotes.
1703     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1704     ;;
1705   esac >> confcache
1706 if cmp -s $cache_file confcache; then
1707   :
1708 else
1709   if test -w $cache_file; then
1710     echo "updating cache $cache_file"
1711     cat confcache > $cache_file
1712   else
1713     echo "not updating unwritable cache $cache_file"
1714   fi
1715 fi
1716 rm -f confcache
1717
1718 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1719
1720 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1721 # Let make expand exec_prefix.
1722 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1723
1724 # Any assignment to VPATH causes Sun make to only execute
1725 # the first set of double-colon rules, so remove it if not needed.
1726 # If there is a colon in the path, we need to keep it.
1727 if test "x$srcdir" = x.; then
1728   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1729 fi
1730
1731 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1732
1733 DEFS=-DHAVE_CONFIG_H
1734
1735 # Without the "./", some shells look in PATH for config.status.
1736 : ${CONFIG_STATUS=./config.status}
1737
1738 echo creating $CONFIG_STATUS
1739 rm -f $CONFIG_STATUS
1740 cat > $CONFIG_STATUS <<EOF
1741 #! /bin/sh
1742 # Generated automatically by configure.
1743 # Run this file to recreate the current configuration.
1744 # This directory was configured as follows,
1745 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1746 #
1747 # $0 $ac_configure_args
1748 #
1749 # Compiler output produced by configure, useful for debugging
1750 # configure, is in ./config.log if it exists.
1751
1752 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1753 for ac_option
1754 do
1755   case "\$ac_option" in
1756   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1757     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1758     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1759   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1760     echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
1761     exit 0 ;;
1762   -help | --help | --hel | --he | --h)
1763     echo "\$ac_cs_usage"; exit 0 ;;
1764   *) echo "\$ac_cs_usage"; exit 1 ;;
1765   esac
1766 done
1767
1768 ac_given_srcdir=$srcdir
1769 ac_given_INSTALL="$INSTALL"
1770
1771 trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1772 EOF
1773 cat >> $CONFIG_STATUS <<EOF
1774
1775 # Protect against being on the right side of a sed subst in config.status.
1776 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1777  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1778 $ac_vpsub
1779 $extrasub
1780 s%@sim_environment@%$sim_environment%g
1781 s%@sim_alignment@%$sim_alignment%g
1782 s%@sim_assert@%$sim_assert%g
1783 s%@sim_bitsize@%$sim_bitsize%g
1784 s%@sim_endian@%$sim_endian%g
1785 s%@sim_hostendian@%$sim_hostendian%g
1786 s%@sim_float@%$sim_float%g
1787 s%@sim_scache@%$sim_scache%g
1788 s%@sim_default_model@%$sim_default_model%g
1789 s%@sim_hardware@%$sim_hardware%g
1790 s%@sim_inline@%$sim_inline%g
1791 s%@sim_packages@%$sim_packages%g
1792 s%@sim_regparm@%$sim_regparm%g
1793 s%@sim_reserved_bits@%$sim_reserved_bits%g
1794 s%@sim_smp@%$sim_smp%g
1795 s%@sim_stdcall@%$sim_stdcall%g
1796 s%@sim_xor_endian@%$sim_xor_endian%g
1797 s%@sim_warnings@%$sim_warnings%g
1798 s%@SHELL@%$SHELL%g
1799 s%@CFLAGS@%$CFLAGS%g
1800 s%@CPPFLAGS@%$CPPFLAGS%g
1801 s%@CXXFLAGS@%$CXXFLAGS%g
1802 s%@DEFS@%$DEFS%g
1803 s%@LDFLAGS@%$LDFLAGS%g
1804 s%@LIBS@%$LIBS%g
1805 s%@exec_prefix@%$exec_prefix%g
1806 s%@prefix@%$prefix%g
1807 s%@program_transform_name@%$program_transform_name%g
1808 s%@bindir@%$bindir%g
1809 s%@sbindir@%$sbindir%g
1810 s%@libexecdir@%$libexecdir%g
1811 s%@datadir@%$datadir%g
1812 s%@sysconfdir@%$sysconfdir%g
1813 s%@sharedstatedir@%$sharedstatedir%g
1814 s%@localstatedir@%$localstatedir%g
1815 s%@libdir@%$libdir%g
1816 s%@includedir@%$includedir%g
1817 s%@oldincludedir@%$oldincludedir%g
1818 s%@infodir@%$infodir%g
1819 s%@mandir@%$mandir%g
1820 s%@host@%$host%g
1821 s%@host_alias@%$host_alias%g
1822 s%@host_cpu@%$host_cpu%g
1823 s%@host_vendor@%$host_vendor%g
1824 s%@host_os@%$host_os%g
1825 s%@target@%$target%g
1826 s%@target_alias@%$target_alias%g
1827 s%@target_cpu@%$target_cpu%g
1828 s%@target_vendor@%$target_vendor%g
1829 s%@target_os@%$target_os%g
1830 s%@build@%$build%g
1831 s%@build_alias@%$build_alias%g
1832 s%@build_cpu@%$build_cpu%g
1833 s%@build_vendor@%$build_vendor%g
1834 s%@build_os@%$build_os%g
1835 s%@CC@%$CC%g
1836 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1837 s%@INSTALL_DATA@%$INSTALL_DATA%g
1838 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
1839 s%@HDEFINES@%$HDEFINES%g
1840 s%@AR@%$AR%g
1841 s%@RANLIB@%$RANLIB%g
1842 s%@CPP@%$CPP%g
1843 s%@MAINT@%$MAINT%g
1844 s%@sim_bswap@%$sim_bswap%g
1845 s%@sim_cflags@%$sim_cflags%g
1846 s%@sim_debug@%$sim_debug%g
1847 s%@sim_stdio@%$sim_stdio%g
1848 s%@sim_trace@%$sim_trace%g
1849 s%@sim_profile@%$sim_profile%g
1850
1851 CEOF
1852 EOF
1853
1854 cat >> $CONFIG_STATUS <<\EOF
1855
1856 # Split the substitutions into bite-sized pieces for seds with
1857 # small command number limits, like on Digital OSF/1 and HP-UX.
1858 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1859 ac_file=1 # Number of current file.
1860 ac_beg=1 # First line for current file.
1861 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1862 ac_more_lines=:
1863 ac_sed_cmds=""
1864 while $ac_more_lines; do
1865   if test $ac_beg -gt 1; then
1866     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1867   else
1868     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1869   fi
1870   if test ! -s conftest.s$ac_file; then
1871     ac_more_lines=false
1872     rm -f conftest.s$ac_file
1873   else
1874     if test -z "$ac_sed_cmds"; then
1875       ac_sed_cmds="sed -f conftest.s$ac_file"
1876     else
1877       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1878     fi
1879     ac_file=`expr $ac_file + 1`
1880     ac_beg=$ac_end
1881     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1882   fi
1883 done
1884 if test -z "$ac_sed_cmds"; then
1885   ac_sed_cmds=cat
1886 fi
1887 EOF
1888
1889 cat >> $CONFIG_STATUS <<EOF
1890
1891 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
1892 EOF
1893 cat >> $CONFIG_STATUS <<\EOF
1894 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1895   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1896   case "$ac_file" in
1897   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1898        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1899   *) ac_file_in="${ac_file}.in" ;;
1900   esac
1901
1902   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1903
1904   # Remove last slash and all that follows it.  Not all systems have dirname.
1905   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1906   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1907     # The file is in a subdirectory.
1908     test ! -d "$ac_dir" && mkdir "$ac_dir"
1909     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1910     # A "../" for each directory in $ac_dir_suffix.
1911     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1912   else
1913     ac_dir_suffix= ac_dots=
1914   fi
1915
1916   case "$ac_given_srcdir" in
1917   .)  srcdir=.
1918       if test -z "$ac_dots"; then top_srcdir=.
1919       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1920   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1921   *) # Relative path.
1922     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1923     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1924   esac
1925
1926   case "$ac_given_INSTALL" in
1927   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1928   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1929   esac
1930
1931   echo creating "$ac_file"
1932   rm -f "$ac_file"
1933   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1934   case "$ac_file" in
1935   *Makefile*) ac_comsub="1i\\
1936 # $configure_input" ;;
1937   *) ac_comsub= ;;
1938   esac
1939
1940   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1941   sed -e "$ac_comsub
1942 s%@configure_input@%$configure_input%g
1943 s%@srcdir@%$srcdir%g
1944 s%@top_srcdir@%$top_srcdir%g
1945 s%@INSTALL@%$INSTALL%g
1946 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1947 fi; done
1948 rm -f conftest.s*
1949
1950 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1951 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1952 #
1953 # ac_d sets the value in "#define NAME VALUE" lines.
1954 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1955 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1956 ac_dC='\3'
1957 ac_dD='%g'
1958 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1959 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1960 ac_uB='\([      ]\)%\1#\2define\3'
1961 ac_uC=' '
1962 ac_uD='\4%g'
1963 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1964 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1965 ac_eB='$%\1#\2define\3'
1966 ac_eC=' '
1967 ac_eD='%g'
1968
1969 if test "${CONFIG_HEADERS+set}" != set; then
1970 EOF
1971 cat >> $CONFIG_STATUS <<EOF
1972   CONFIG_HEADERS="config.h:config.in"
1973 EOF
1974 cat >> $CONFIG_STATUS <<\EOF
1975 fi
1976 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1977   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1978   case "$ac_file" in
1979   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1980        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1981   *) ac_file_in="${ac_file}.in" ;;
1982   esac
1983
1984   echo creating $ac_file
1985
1986   rm -f conftest.frag conftest.in conftest.out
1987   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1988   cat $ac_file_inputs > conftest.in
1989
1990 EOF
1991
1992 # Transform confdefs.h into a sed script conftest.vals that substitutes
1993 # the proper values into config.h.in to produce config.h.  And first:
1994 # Protect against being on the right side of a sed subst in config.status.
1995 # Protect against being in an unquoted here document in config.status.
1996 rm -f conftest.vals
1997 cat > conftest.hdr <<\EOF
1998 s/[\\&%]/\\&/g
1999 s%[\\$`]%\\&%g
2000 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2001 s%ac_d%ac_u%gp
2002 s%ac_u%ac_e%gp
2003 EOF
2004 sed -n -f conftest.hdr confdefs.h > conftest.vals
2005 rm -f conftest.hdr
2006
2007 # This sed command replaces #undef with comments.  This is necessary, for
2008 # example, in the case of _POSIX_SOURCE, which is predefined and required
2009 # on some systems where configure will not decide to define it.
2010 cat >> conftest.vals <<\EOF
2011 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2012 EOF
2013
2014 # Break up conftest.vals because some shells have a limit on
2015 # the size of here documents, and old seds have small limits too.
2016
2017 rm -f conftest.tail
2018 while :
2019 do
2020   ac_lines=`grep -c . conftest.vals`
2021   # grep -c gives empty output for an empty file on some AIX systems.
2022   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2023   # Write a limited-size here document to conftest.frag.
2024   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2025   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2026   echo 'CEOF
2027   sed -f conftest.frag conftest.in > conftest.out
2028   rm -f conftest.in
2029   mv conftest.out conftest.in
2030 ' >> $CONFIG_STATUS
2031   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2032   rm -f conftest.vals
2033   mv conftest.tail conftest.vals
2034 done
2035 rm -f conftest.vals
2036
2037 cat >> $CONFIG_STATUS <<\EOF
2038   rm -f conftest.frag conftest.h
2039   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2040   cat conftest.in >> conftest.h
2041   rm -f conftest.in
2042   if cmp -s $ac_file conftest.h 2>/dev/null; then
2043     echo "$ac_file is unchanged"
2044     rm -f conftest.h
2045   else
2046     # Remove last slash and all that follows it.  Not all systems have dirname.
2047       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2048       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2049       # The file is in a subdirectory.
2050       test ! -d "$ac_dir" && mkdir "$ac_dir"
2051     fi
2052     rm -f $ac_file
2053     mv conftest.h $ac_file
2054   fi
2055 fi; done
2056
2057 EOF
2058
2059 cat >> $CONFIG_STATUS <<EOF
2060 ac_sources="$sim_link_files"
2061 ac_dests="$sim_link_links"
2062 EOF
2063
2064 cat >> $CONFIG_STATUS <<\EOF
2065 srcdir=$ac_given_srcdir
2066 while test -n "$ac_sources"; do
2067   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2068   set $ac_sources; ac_source=$1; shift; ac_sources=$*
2069
2070   echo "linking $srcdir/$ac_source to $ac_dest"
2071
2072   if test ! -r $srcdir/$ac_source; then
2073     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2074   fi
2075   rm -f $ac_dest
2076
2077   # Make relative symlinks.
2078   # Remove last slash and all that follows it.  Not all systems have dirname.
2079   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2080   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2081     # The dest file is in a subdirectory.
2082     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2083     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2084     # A "../" for each directory in $ac_dest_dir_suffix.
2085     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2086   else
2087     ac_dest_dir_suffix= ac_dots=
2088   fi
2089
2090   case "$srcdir" in
2091   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2092   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2093   esac
2094
2095   # Make a symlink if possible; otherwise try a hard link.
2096   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2097     ln $srcdir/$ac_source $ac_dest; then :
2098   else
2099     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2100   fi
2101 done
2102 EOF
2103 cat >> $CONFIG_STATUS <<EOF
2104
2105 EOF
2106 cat >> $CONFIG_STATUS <<\EOF
2107 case "x$CONFIG_FILES" in
2108  xMakefile*)
2109    echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
2110    rm -f Makesim1.tmp Makesim2.tmp Makefile
2111    sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
2112    sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
2113    sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
2114         -e '/^## COMMON_POST_/ r Makesim2.tmp' \
2115         <Makefile.sim >Makefile
2116    rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
2117    ;;
2118  esac
2119  case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
2120
2121 exit 0
2122 EOF
2123 chmod +x $CONFIG_STATUS
2124 rm -fr confdefs* $ac_clean_files
2125 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2126
2127