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