New file common/sim-config.c sets/checks simulator configuration options.
[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
528 # autoconf.info says this should be called right after AC_INIT.
529
530
531 ac_aux_dir=
532 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
533 if test -f $ac_dir/install-sh; then
534 ac_aux_dir=$ac_dir
535 ac_install_sh="$ac_aux_dir/install-sh -c"
536 break
537 elif test -f $ac_dir/install.sh; then
538 ac_aux_dir=$ac_dir
539 ac_install_sh="$ac_aux_dir/install.sh -c"
540 break
541 fi
542 done
543 if test -z "$ac_aux_dir"; then
544 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
545 fi
546 ac_config_guess=$ac_aux_dir/config.guess
547 ac_config_sub=$ac_aux_dir/config.sub
548 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
549
550
551 # Do some error checking and defaulting for the host and target type.
552 # The inputs are:
553 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
554 #
555 # The rules are:
556 # 1. You are not allowed to specify --host, --target, and nonopt at the
557 # same time.
558 # 2. Host defaults to nonopt.
559 # 3. If nonopt is not specified, then host defaults to the current host,
560 # as determined by config.guess.
561 # 4. Target and build default to nonopt.
562 # 5. If nonopt is not specified, then target and build default to host.
563
564 # The aliases save the names the user supplied, while $host etc.
565 # will get canonicalized.
566 case $host---$target---$nonopt in
567 NONE---*---* | *---NONE---* | *---*---NONE) ;;
568 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
569 esac
570
571
572 # Make sure we can run config.sub.
573 if $ac_config_sub sun4 >/dev/null 2>&1; then :
574 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
575 fi
576
577 echo $ac_n "checking host system type""... $ac_c" 1>&6
578
579 host_alias=$host
580 case "$host_alias" in
581 NONE)
582 case $nonopt in
583 NONE)
584 if host_alias=`$ac_config_guess`; then :
585 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
586 fi ;;
587 *) host_alias=$nonopt ;;
588 esac ;;
589 esac
590
591 host=`$ac_config_sub $host_alias`
592 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
593 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
594 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
595 echo "$ac_t""$host" 1>&6
596
597 echo $ac_n "checking target system type""... $ac_c" 1>&6
598
599 target_alias=$target
600 case "$target_alias" in
601 NONE)
602 case $nonopt in
603 NONE) target_alias=$host_alias ;;
604 *) target_alias=$nonopt ;;
605 esac ;;
606 esac
607
608 target=`$ac_config_sub $target_alias`
609 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
610 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
611 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
612 echo "$ac_t""$target" 1>&6
613
614 echo $ac_n "checking build system type""... $ac_c" 1>&6
615
616 build_alias=$build
617 case "$build_alias" in
618 NONE)
619 case $nonopt in
620 NONE) build_alias=$host_alias ;;
621 *) build_alias=$nonopt ;;
622 esac ;;
623 esac
624
625 build=`$ac_config_sub $build_alias`
626 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
627 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
628 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
629 echo "$ac_t""$build" 1>&6
630
631 test "$host_alias" != "$target_alias" &&
632 test "$program_prefix$program_suffix$program_transform_name" = \
633 NONENONEs,x,x, &&
634 program_prefix=${target_alias}-
635
636 if test "$program_transform_name" = s,x,x,; then
637 program_transform_name=
638 else
639 # Double any \ or $. echo might interpret backslashes.
640 cat <<\EOF_SED > conftestsed
641 s,\\,\\\\,g; s,\$,$$,g
642 EOF_SED
643 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
644 rm -f conftestsed
645 fi
646 test "$program_prefix" != NONE &&
647 program_transform_name="s,^,${program_prefix},; $program_transform_name"
648 # Use a double $ so make ignores it.
649 test "$program_suffix" != NONE &&
650 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
651
652 # sed with no file args requires a program.
653 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
654
655 # Extract the first word of "gcc", so it can be a program name with args.
656 set dummy gcc; ac_word=$2
657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
658 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
659 echo $ac_n "(cached) $ac_c" 1>&6
660 else
661 if test -n "$CC"; then
662 ac_cv_prog_CC="$CC" # Let the user override the test.
663 else
664 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
665 for ac_dir in $PATH; do
666 test -z "$ac_dir" && ac_dir=.
667 if test -f $ac_dir/$ac_word; then
668 ac_cv_prog_CC="gcc"
669 break
670 fi
671 done
672 IFS="$ac_save_ifs"
673 fi
674 fi
675 CC="$ac_cv_prog_CC"
676 if test -n "$CC"; then
677 echo "$ac_t""$CC" 1>&6
678 else
679 echo "$ac_t""no" 1>&6
680 fi
681
682 if test -z "$CC"; then
683 # Extract the first word of "cc", so it can be a program name with args.
684 set dummy cc; ac_word=$2
685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
686 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
687 echo $ac_n "(cached) $ac_c" 1>&6
688 else
689 if test -n "$CC"; then
690 ac_cv_prog_CC="$CC" # Let the user override the test.
691 else
692 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
693 ac_prog_rejected=no
694 for ac_dir in $PATH; do
695 test -z "$ac_dir" && ac_dir=.
696 if test -f $ac_dir/$ac_word; then
697 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
698 ac_prog_rejected=yes
699 continue
700 fi
701 ac_cv_prog_CC="cc"
702 break
703 fi
704 done
705 IFS="$ac_save_ifs"
706 if test $ac_prog_rejected = yes; then
707 # We found a bogon in the path, so make sure we never use it.
708 set dummy $ac_cv_prog_CC
709 shift
710 if test $# -gt 0; then
711 # We chose a different compiler from the bogus one.
712 # However, it has the same basename, so the bogon will be chosen
713 # first if we set CC to just the basename; use the full file name.
714 shift
715 set dummy "$ac_dir/$ac_word" "$@"
716 shift
717 ac_cv_prog_CC="$@"
718 fi
719 fi
720 fi
721 fi
722 CC="$ac_cv_prog_CC"
723 if test -n "$CC"; then
724 echo "$ac_t""$CC" 1>&6
725 else
726 echo "$ac_t""no" 1>&6
727 fi
728
729 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
730 fi
731
732 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
733 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
734 echo $ac_n "(cached) $ac_c" 1>&6
735 else
736 cat > conftest.c <<EOF
737 #ifdef __GNUC__
738 yes;
739 #endif
740 EOF
741 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
742 ac_cv_prog_gcc=yes
743 else
744 ac_cv_prog_gcc=no
745 fi
746 fi
747
748 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
749 if test $ac_cv_prog_gcc = yes; then
750 GCC=yes
751 if test "${CFLAGS+set}" != set; then
752 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
753 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755 else
756 echo 'void f(){}' > conftest.c
757 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
758 ac_cv_prog_gcc_g=yes
759 else
760 ac_cv_prog_gcc_g=no
761 fi
762 rm -f conftest*
763
764 fi
765
766 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
767 if test $ac_cv_prog_gcc_g = yes; then
768 CFLAGS="-g -O"
769 else
770 CFLAGS="-O"
771 fi
772 fi
773 else
774 GCC=
775 test "${CFLAGS+set}" = set || CFLAGS="-g"
776 fi
777
778 # Find a good install program. We prefer a C program (faster),
779 # so one script is as good as another. But avoid the broken or
780 # incompatible versions:
781 # SysV /etc/install, /usr/sbin/install
782 # SunOS /usr/etc/install
783 # IRIX /sbin/install
784 # AIX /bin/install
785 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
786 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
787 # ./install, which can be erroneously created by make from ./install.sh.
788 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
789 if test -z "$INSTALL"; then
790 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
791 echo $ac_n "(cached) $ac_c" 1>&6
792 else
793 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
794 for ac_dir in $PATH; do
795 # Account for people who put trailing slashes in PATH elements.
796 case "$ac_dir/" in
797 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
798 *)
799 # OSF1 and SCO ODT 3.0 have their own names for install.
800 for ac_prog in ginstall installbsd scoinst install; do
801 if test -f $ac_dir/$ac_prog; then
802 if test $ac_prog = install &&
803 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
804 # AIX install. It has an incompatible calling convention.
805 # OSF/1 installbsd also uses dspmsg, but is usable.
806 :
807 else
808 ac_cv_path_install="$ac_dir/$ac_prog -c"
809 break 2
810 fi
811 fi
812 done
813 ;;
814 esac
815 done
816 IFS="$ac_save_ifs"
817
818 fi
819 if test "${ac_cv_path_install+set}" = set; then
820 INSTALL="$ac_cv_path_install"
821 else
822 # As a last resort, use the slow shell script. We don't cache a
823 # path for INSTALL within a source directory, because that will
824 # break other packages using the cache if that directory is
825 # removed, or if the path is relative.
826 INSTALL="$ac_install_sh"
827 fi
828 fi
829 echo "$ac_t""$INSTALL" 1>&6
830
831 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
832 # It thinks the first close brace ends the variable substitution.
833 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
834
835 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
836
837
838 # Put a plausible default for CC_FOR_BUILD in Makefile.
839 # If we cannot run a trivial program, we must be cross compiling.
840 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
841 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
843 else
844 if test "$cross_compiling" = yes; then
845 ac_cv_c_cross=yes
846 else
847 cat > conftest.$ac_ext <<EOF
848 #line 849 "configure"
849 #include "confdefs.h"
850 main(){return(0);}
851 EOF
852 { (eval echo configure:853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
853 if test -s conftest && (./conftest; exit) 2>/dev/null; then
854 ac_cv_c_cross=no
855 else
856 ac_cv_c_cross=yes
857 fi
858 fi
859 rm -fr conftest*
860 fi
861
862 echo "$ac_t""$ac_cv_c_cross" 1>&6
863 cross_compiling=$ac_cv_c_cross
864
865 if test "x$cross_compiling" = "xno"; then
866 CC_FOR_BUILD='$(CC)'
867 else
868 CC_FOR_BUILD=gcc
869 fi
870
871
872
873
874 AR=${AR-ar}
875
876 # Extract the first word of "ranlib", so it can be a program name with args.
877 set dummy ranlib; ac_word=$2
878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
879 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
880 echo $ac_n "(cached) $ac_c" 1>&6
881 else
882 if test -n "$RANLIB"; then
883 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
884 else
885 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
886 for ac_dir in $PATH; do
887 test -z "$ac_dir" && ac_dir=.
888 if test -f $ac_dir/$ac_word; then
889 ac_cv_prog_RANLIB="ranlib"
890 break
891 fi
892 done
893 IFS="$ac_save_ifs"
894 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
895 fi
896 fi
897 RANLIB="$ac_cv_prog_RANLIB"
898 if test -n "$RANLIB"; then
899 echo "$ac_t""$RANLIB" 1>&6
900 else
901 echo "$ac_t""no" 1>&6
902 fi
903
904
905 . ${srcdir}/../../bfd/configure.host
906
907
908
909 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
910 if test "${enable_sim_bswap+set}" = set; then
911 enableval="$enable_sim_bswap"
912 case "${enableval}" in
913 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
914 no) sim_bswap="-DWITH_BSWAP=0";;
915 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
916 esac
917 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
918 echo "Setting bswap flags = $sim_bswap" 6>&1
919 fi
920 else
921 sim_bswap=""
922 fi
923
924
925
926 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
927 if test "${enable_sim_cflags+set}" = set; then
928 enableval="$enable_sim_cflags"
929 case "${enableval}" in
930 yes) sim_cflags="-O2";;
931 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
932 no) sim_cflags="";;
933 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
934 esac
935 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
936 echo "Setting sim cflags = $sim_cflags" 6>&1
937 fi
938 else
939 sim_cflags=""
940 fi
941
942
943
944 # Check whether --enable-sim-debug or --disable-sim-debug was given.
945 if test "${enable_sim_debug+set}" = set; then
946 enableval="$enable_sim_debug"
947 case "${enableval}" in
948 yes) sim_debug="-DDEBUG=7";;
949 no) sim_debug="-DDEBUG=0";;
950 *) sim_debug="-DDEBUG='(${enableval})'";;
951 esac
952 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
953 echo "Setting sim debug = $sim_debug" 6>&1
954 fi
955 else
956 sim_debug=""
957 fi
958
959
960
961 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
962 if test "${enable_sim_stdio+set}" = set; then
963 enableval="$enable_sim_stdio"
964 case "${enableval}" in
965 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
966 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
967 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
968 esac
969 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
970 echo "Setting stdio flags = $sim_stdio" 6>&1
971 fi
972 else
973 sim_stdio=""
974 fi
975
976
977
978 # Check whether --enable-sim-trace or --disable-sim-trace was given.
979 if test "${enable_sim_trace+set}" = set; then
980 enableval="$enable_sim_trace"
981 case "${enableval}" in
982 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=1";;
983 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
984 *) sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
985 esac
986 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
987 echo "Setting sim trace = $sim_trace" 6>&1
988 fi
989 else
990 sim_trace=""
991 fi
992
993
994
995 sim_link_files=
996 sim_link_links=
997
998 sim_link_links=tconfig.h
999 if test -f ${srcdir}/tconfig.in
1000 then
1001 sim_link_files=tconfig.in
1002 else
1003 sim_link_files=../common/tconfig.in
1004 fi
1005
1006 # targ-vals.def points to the libc macro description file.
1007 case "${target}" in
1008 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
1009 esac
1010 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
1011 sim_link_links="${sim_link_links} targ-vals.def"
1012
1013
1014
1015 # Put a useful copy of CPP_FOR_TARGET in Makefile.
1016 # This is only used to build the target values header files. These files are
1017 # shipped with distributions so CPP_FOR_TARGET only needs to work in
1018 # developer's trees. This value is borrowed from ../../Makefile.in.
1019 CPP_FOR_TARGET="\` \
1020 if test -f \$\${rootme}/../../gcc/Makefile ; then \
1021 if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \
1022 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \
1023 else \
1024 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \
1025 fi; \
1026 else \
1027 if test '\$(host_canonical)' = '\$(target_canonical)' ; then \
1028 echo \$(CC); \
1029 else \
1030 t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \
1031 fi; \
1032 fi\` -E"
1033
1034
1035 # Set TARGET_SUBDIR, needed by CPP_FOR_TARGET.
1036 if test x"${host}" = x"${target}" ; then
1037 TARGET_SUBDIR="."
1038 else
1039 TARGET_SUBDIR=${target_alias}
1040 fi
1041
1042
1043 # These aren't all needed yet, but will be eventually.
1044 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1045 # On Suns, sometimes $CPP names a directory.
1046 if test -n "$CPP" && test -d "$CPP"; then
1047 CPP=
1048 fi
1049 if test -z "$CPP"; then
1050 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1051 echo $ac_n "(cached) $ac_c" 1>&6
1052 else
1053 # This must be in double quotes, not single quotes, because CPP may get
1054 # substituted into the Makefile and "${CC-cc}" will confuse make.
1055 CPP="${CC-cc} -E"
1056 # On the NeXT, cc -E runs the code through the compiler's parser,
1057 # not just through cpp.
1058 cat > conftest.$ac_ext <<EOF
1059 #line 1060 "configure"
1060 #include "confdefs.h"
1061 #include <assert.h>
1062 Syntax Error
1063 EOF
1064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1065 { (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1066 ac_err=`grep -v '^ *+' conftest.out`
1067 if test -z "$ac_err"; then
1068 :
1069 else
1070 echo "$ac_err" >&5
1071 rm -rf conftest*
1072 CPP="${CC-cc} -E -traditional-cpp"
1073 cat > conftest.$ac_ext <<EOF
1074 #line 1075 "configure"
1075 #include "confdefs.h"
1076 #include <assert.h>
1077 Syntax Error
1078 EOF
1079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1080 { (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1081 ac_err=`grep -v '^ *+' conftest.out`
1082 if test -z "$ac_err"; then
1083 :
1084 else
1085 echo "$ac_err" >&5
1086 rm -rf conftest*
1087 CPP=/lib/cpp
1088 fi
1089 rm -f conftest*
1090 fi
1091 rm -f conftest*
1092 ac_cv_prog_CPP="$CPP"
1093 fi
1094 CPP="$ac_cv_prog_CPP"
1095 else
1096 ac_cv_prog_CPP="$CPP"
1097 fi
1098 echo "$ac_t""$CPP" 1>&6
1099
1100 for ac_hdr in stdlib.h string.h strings.h time.h sys/times.h
1101 do
1102 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1103 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1104 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1105 echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107 cat > conftest.$ac_ext <<EOF
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1110 #include <$ac_hdr>
1111 EOF
1112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1113 { (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1114 ac_err=`grep -v '^ *+' conftest.out`
1115 if test -z "$ac_err"; then
1116 rm -rf conftest*
1117 eval "ac_cv_header_$ac_safe=yes"
1118 else
1119 echo "$ac_err" >&5
1120 rm -rf conftest*
1121 eval "ac_cv_header_$ac_safe=no"
1122 fi
1123 rm -f conftest*
1124 fi
1125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1126 echo "$ac_t""yes" 1>&6
1127 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1128 cat >> confdefs.h <<EOF
1129 #define $ac_tr_hdr 1
1130 EOF
1131
1132 else
1133 echo "$ac_t""no" 1>&6
1134 fi
1135 done
1136
1137
1138 trap '' 1 2 15
1139 cat > confcache <<\EOF
1140 # This file is a shell script that caches the results of configure
1141 # tests run on this system so they can be shared between configure
1142 # scripts and configure runs. It is not useful on other systems.
1143 # If it contains results you don't want to keep, you may remove or edit it.
1144 #
1145 # By default, configure uses ./config.cache as the cache file,
1146 # creating it if it does not exist already. You can give configure
1147 # the --cache-file=FILE option to use a different cache file; that is
1148 # what configure does when it calls configure scripts in
1149 # subdirectories, so they share the cache.
1150 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1151 # config.status only pays attention to the cache file if you give it the
1152 # --recheck option to rerun configure.
1153 #
1154 EOF
1155 # Ultrix sh set writes to stderr and can't be redirected directly,
1156 # and sets the high bit in the cache file unless we assign to the vars.
1157 (set) 2>&1 |
1158 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1159 >> confcache
1160 if cmp -s $cache_file confcache; then
1161 :
1162 else
1163 if test -w $cache_file; then
1164 echo "updating cache $cache_file"
1165 cat confcache > $cache_file
1166 else
1167 echo "not updating unwritable cache $cache_file"
1168 fi
1169 fi
1170 rm -f confcache
1171
1172 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1173
1174 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1175 # Let make expand exec_prefix.
1176 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1177
1178 # Any assignment to VPATH causes Sun make to only execute
1179 # the first set of double-colon rules, so remove it if not needed.
1180 # If there is a colon in the path, we need to keep it.
1181 if test "x$srcdir" = x.; then
1182 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1183 fi
1184
1185 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1186
1187 DEFS=-DHAVE_CONFIG_H
1188
1189 # Without the "./", some shells look in PATH for config.status.
1190 : ${CONFIG_STATUS=./config.status}
1191
1192 echo creating $CONFIG_STATUS
1193 rm -f $CONFIG_STATUS
1194 cat > $CONFIG_STATUS <<EOF
1195 #! /bin/sh
1196 # Generated automatically by configure.
1197 # Run this file to recreate the current configuration.
1198 # This directory was configured as follows,
1199 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1200 #
1201 # $0 $ac_configure_args
1202 #
1203 # Compiler output produced by configure, useful for debugging
1204 # configure, is in ./config.log if it exists.
1205
1206 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1207 for ac_option
1208 do
1209 case "\$ac_option" in
1210 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1211 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1212 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1213 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1214 echo "$CONFIG_STATUS generated by autoconf version 2.10"
1215 exit 0 ;;
1216 -help | --help | --hel | --he | --h)
1217 echo "\$ac_cs_usage"; exit 0 ;;
1218 *) echo "\$ac_cs_usage"; exit 1 ;;
1219 esac
1220 done
1221
1222 ac_given_srcdir=$srcdir
1223 ac_given_INSTALL="$INSTALL"
1224
1225 trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1226 EOF
1227 cat >> $CONFIG_STATUS <<EOF
1228
1229 # Protect against being on the right side of a sed subst in config.status.
1230 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1231 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1232 $ac_vpsub
1233 $extrasub
1234 s%@CFLAGS@%$CFLAGS%g
1235 s%@CPPFLAGS@%$CPPFLAGS%g
1236 s%@CXXFLAGS@%$CXXFLAGS%g
1237 s%@DEFS@%$DEFS%g
1238 s%@LDFLAGS@%$LDFLAGS%g
1239 s%@LIBS@%$LIBS%g
1240 s%@exec_prefix@%$exec_prefix%g
1241 s%@prefix@%$prefix%g
1242 s%@program_transform_name@%$program_transform_name%g
1243 s%@bindir@%$bindir%g
1244 s%@sbindir@%$sbindir%g
1245 s%@libexecdir@%$libexecdir%g
1246 s%@datadir@%$datadir%g
1247 s%@sysconfdir@%$sysconfdir%g
1248 s%@sharedstatedir@%$sharedstatedir%g
1249 s%@localstatedir@%$localstatedir%g
1250 s%@libdir@%$libdir%g
1251 s%@includedir@%$includedir%g
1252 s%@oldincludedir@%$oldincludedir%g
1253 s%@infodir@%$infodir%g
1254 s%@mandir@%$mandir%g
1255 s%@host@%$host%g
1256 s%@host_alias@%$host_alias%g
1257 s%@host_cpu@%$host_cpu%g
1258 s%@host_vendor@%$host_vendor%g
1259 s%@host_os@%$host_os%g
1260 s%@target@%$target%g
1261 s%@target_alias@%$target_alias%g
1262 s%@target_cpu@%$target_cpu%g
1263 s%@target_vendor@%$target_vendor%g
1264 s%@target_os@%$target_os%g
1265 s%@build@%$build%g
1266 s%@build_alias@%$build_alias%g
1267 s%@build_cpu@%$build_cpu%g
1268 s%@build_vendor@%$build_vendor%g
1269 s%@build_os@%$build_os%g
1270 s%@CC@%$CC%g
1271 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1272 s%@INSTALL_DATA@%$INSTALL_DATA%g
1273 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
1274 s%@HDEFINES@%$HDEFINES%g
1275 s%@AR@%$AR%g
1276 s%@RANLIB@%$RANLIB%g
1277 s%@sim_bswap@%$sim_bswap%g
1278 s%@sim_cflags@%$sim_cflags%g
1279 s%@sim_debug@%$sim_debug%g
1280 s%@sim_stdio@%$sim_stdio%g
1281 s%@sim_trace@%$sim_trace%g
1282 s%@CPP_FOR_TARGET@%$CPP_FOR_TARGET%g
1283 s%@TARGET_SUBDIR@%$TARGET_SUBDIR%g
1284 s%@CPP@%$CPP%g
1285
1286 CEOF
1287 EOF
1288 cat >> $CONFIG_STATUS <<EOF
1289
1290 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1291 EOF
1292 cat >> $CONFIG_STATUS <<\EOF
1293 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1294 # Support "outfile[:infile]", defaulting infile="outfile.in".
1295 case "$ac_file" in
1296 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1297 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1298 *) ac_file_in="${ac_file}.in" ;;
1299 esac
1300
1301 # Adjust relative srcdir, etc. for subdirectories.
1302
1303 # Remove last slash and all that follows it. Not all systems have dirname.
1304 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1305 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1306 # The file is in a subdirectory.
1307 test ! -d "$ac_dir" && mkdir "$ac_dir"
1308 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1309 # A "../" for each directory in $ac_dir_suffix.
1310 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1311 else
1312 ac_dir_suffix= ac_dots=
1313 fi
1314
1315 case "$ac_given_srcdir" in
1316 .) srcdir=.
1317 if test -z "$ac_dots"; then top_srcdir=.
1318 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1319 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1320 *) # Relative path.
1321 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1322 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1323 esac
1324
1325 case "$ac_given_INSTALL" in
1326 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1327 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1328 esac
1329 echo creating "$ac_file"
1330 rm -f "$ac_file"
1331 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1332 case "$ac_file" in
1333 *Makefile*) ac_comsub="1i\\
1334 # $configure_input" ;;
1335 *) ac_comsub= ;;
1336 esac
1337 sed -e "$ac_comsub
1338 s%@configure_input@%$configure_input%g
1339 s%@srcdir@%$srcdir%g
1340 s%@top_srcdir@%$top_srcdir%g
1341 s%@INSTALL@%$INSTALL%g
1342 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1343 fi; done
1344 rm -f conftest.subs
1345
1346 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1347 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1348 #
1349 # ac_d sets the value in "#define NAME VALUE" lines.
1350 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1351 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1352 ac_dC='\3'
1353 ac_dD='%g'
1354 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1355 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1356 ac_uB='\([ ]\)%\1#\2define\3'
1357 ac_uC=' '
1358 ac_uD='\4%g'
1359 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1360 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1361 ac_eB='$%\1#\2define\3'
1362 ac_eC=' '
1363 ac_eD='%g'
1364
1365 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
1366 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1367 # Support "outfile[:infile]", defaulting infile="outfile.in".
1368 case "$ac_file" in
1369 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1370 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1371 *) ac_file_in="${ac_file}.in" ;;
1372 esac
1373
1374 echo creating $ac_file
1375
1376 rm -f conftest.frag conftest.in conftest.out
1377 cp $ac_given_srcdir/$ac_file_in conftest.in
1378
1379 EOF
1380
1381 # Transform confdefs.h into a sed script conftest.vals that substitutes
1382 # the proper values into config.h.in to produce config.h. And first:
1383 # Protect against being on the right side of a sed subst in config.status.
1384 # Protect against being in an unquoted here document in config.status.
1385 rm -f conftest.vals
1386 cat > conftest.hdr <<\EOF
1387 s/[\\&%]/\\&/g
1388 s%[\\$`]%\\&%g
1389 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1390 s%ac_d%ac_u%gp
1391 s%ac_u%ac_e%gp
1392 EOF
1393 sed -n -f conftest.hdr confdefs.h > conftest.vals
1394 rm -f conftest.hdr
1395
1396 # This sed command replaces #undef with comments. This is necessary, for
1397 # example, in the case of _POSIX_SOURCE, which is predefined and required
1398 # on some systems where configure will not decide to define it.
1399 cat >> conftest.vals <<\EOF
1400 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1401 EOF
1402
1403 # Break up conftest.vals because some shells have a limit on
1404 # the size of here documents, and old seds have small limits too.
1405 # Maximum number of lines to put in a single here document.
1406 ac_max_here_lines=12
1407
1408 rm -f conftest.tail
1409 while :
1410 do
1411 ac_lines=`grep -c . conftest.vals`
1412 # grep -c gives empty output for an empty file on some AIX systems.
1413 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1414 # Write a limited-size here document to conftest.frag.
1415 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1416 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1417 echo 'CEOF
1418 sed -f conftest.frag conftest.in > conftest.out
1419 rm -f conftest.in
1420 mv conftest.out conftest.in
1421 ' >> $CONFIG_STATUS
1422 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1423 rm -f conftest.vals
1424 mv conftest.tail conftest.vals
1425 done
1426 rm -f conftest.vals
1427
1428 cat >> $CONFIG_STATUS <<\EOF
1429 rm -f conftest.frag conftest.h
1430 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1431 cat conftest.in >> conftest.h
1432 rm -f conftest.in
1433 if cmp -s $ac_file conftest.h 2>/dev/null; then
1434 echo "$ac_file is unchanged"
1435 rm -f conftest.h
1436 else
1437 # Remove last slash and all that follows it. Not all systems have dirname.
1438 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1439 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1440 # The file is in a subdirectory.
1441 test ! -d "$ac_dir" && mkdir "$ac_dir"
1442 fi
1443 rm -f $ac_file
1444 mv conftest.h $ac_file
1445 fi
1446 fi; done
1447
1448
1449 case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
1450 exit 0
1451 EOF
1452 chmod +x $CONFIG_STATUS
1453 rm -fr confdefs* $ac_clean_files
1454 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1455