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