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