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