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