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