Commit | Line | Data |
---|---|---|
4f965b81 MM |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
5c04f4f7 | 4 | # Generated automatically using autoconf version 2.12 |
88f1eac4 | 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: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
c494cadd | 14 | ac_help="$ac_help |
5c04f4f7 | 15 | --enable-sim-alignment=align Specify strict or nonstrict alignment." |
c494cadd | 16 | ac_help="$ac_help |
5c04f4f7 | 17 | --enable-sim-assert Specify whether to perform random assertions." |
30c87b55 | 18 | ac_help="$ac_help |
5c04f4f7 | 19 | --enable-sim-bitsize=n Specify target bitsize (32 or 64)." |
c494cadd | 20 | ac_help="$ac_help |
5c04f4f7 | 21 | --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums." |
c494cadd | 22 | ac_help="$ac_help |
5c04f4f7 | 23 | --enable-sim-cflags=opts Extra CFLAGS for use in building simulator" |
c494cadd | 24 | ac_help="$ac_help |
5c04f4f7 MM |
25 | --enable-sim-config=file Override default config file" |
26 | ac_help="$ac_help | |
27 | --enable-sim-default-model=which Specify default PowerPC to model." | |
c494cadd | 28 | ac_help="$ac_help |
73c4941b | 29 | --enable-sim-duplicate Expand (duplicate) semantic functions." |
30c87b55 | 30 | ac_help="$ac_help |
5c04f4f7 MM |
31 | --enable-sim-endian=endian Specify target byte endian orientation." |
32 | ac_help="$ac_help | |
33 | --enable-sim-env=env Specify target environment (operating, virtual, user)." | |
c494cadd | 34 | ac_help="$ac_help |
73c4941b | 35 | --enable-sim-filter=rule Specify filter rules." |
c494cadd | 36 | ac_help="$ac_help |
5c04f4f7 | 37 | --enable-sim-float Specify whether to use host floating point or simulate." |
2e913166 MM |
38 | ac_help="$ac_help |
39 | --enable-sim-hardware=list Specify the hardware to be included in the build." | |
40 | ac_help="$ac_help | |
5c04f4f7 | 41 | --enable-sim-hostbitsize=32|64 Specify host bitsize (32 or 64)." |
c494cadd | 42 | ac_help="$ac_help |
5c04f4f7 | 43 | --enable-sim-hostendain=end Specify host byte endian orientation." |
2e913166 | 44 | ac_help="$ac_help |
5c04f4f7 | 45 | --enable-sim-icache=size Specify instruction-decode cache size and type." |
2e913166 | 46 | ac_help="$ac_help |
5c04f4f7 | 47 | --enable-sim-inline=inlines Specify which functions should be inlined." |
c494cadd | 48 | ac_help="$ac_help |
5c04f4f7 | 49 | --enable-sim-jump Jump between semantic code (instead of call/return)." |
c494cadd | 50 | ac_help="$ac_help |
5c04f4f7 | 51 | --enable-sim-line-nr=opts Generate extra CPP code that references source rather than generated code" |
f2181eff | 52 | ac_help="$ac_help |
5c04f4f7 | 53 | --enable-sim-model=which Specify PowerPC to model." |
c494cadd | 54 | ac_help="$ac_help |
5c04f4f7 | 55 | --enable-sim-model-issue Specify whether to simulate model specific actions" |
c494cadd | 56 | ac_help="$ac_help |
5c04f4f7 | 57 | --enable-sim-monitor=mon Specify whether to enable monitoring events." |
c494cadd | 58 | ac_help="$ac_help |
5c04f4f7 | 59 | --enable-sim-opcode=which Override default opcode lookup." |
c494cadd | 60 | ac_help="$ac_help |
5c04f4f7 | 61 | --enable-sim-packages=list Specify the packages to be included in the build." |
73c4941b | 62 | ac_help="$ac_help |
5c04f4f7 | 63 | --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific." |
73c4941b | 64 | ac_help="$ac_help |
5c04f4f7 | 65 | --enable-sim-reserved-bits Specify whether to check reserved bits in instruction." |
73c4941b | 66 | ac_help="$ac_help |
5c04f4f7 | 67 | --enable-sim-smp=n Specify number of processors to configure for." |
a3114052 | 68 | ac_help="$ac_help |
5c04f4f7 | 69 | --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific." |
c494cadd | 70 | ac_help="$ac_help |
5c04f4f7 | 71 | --enable-sim-stdio Specify whether to use stdio for console input/output." |
c494cadd | 72 | ac_help="$ac_help |
5c04f4f7 | 73 | --enable-sim-switch Use a switch instead of a table for instruction call." |
c494cadd | 74 | ac_help="$ac_help |
5c04f4f7 | 75 | --enable-sim-timebase Specify whether the PPC timebase is supported." |
73c4941b | 76 | ac_help="$ac_help |
5c04f4f7 | 77 | --enable-sim-trace Specify whether tracing is supported." |
f2181eff | 78 | ac_help="$ac_help |
5c04f4f7 | 79 | --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o" |
a72d2509 | 80 | ac_help="$ac_help |
5c04f4f7 | 81 | --enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8)." |
4f965b81 MM |
82 | |
83 | # Initialize some variables set by options. | |
84 | # The variables have the same names as the options, with | |
85 | # dashes changed to underlines. | |
86 | build=NONE | |
87 | cache_file=./config.cache | |
88 | exec_prefix=NONE | |
89 | host=NONE | |
90 | no_create= | |
91 | nonopt=NONE | |
92 | no_recursion= | |
93 | prefix=NONE | |
94 | program_prefix=NONE | |
95 | program_suffix=NONE | |
96 | program_transform_name=s,x,x, | |
97 | silent= | |
98 | site= | |
99 | srcdir= | |
100 | target=NONE | |
101 | verbose= | |
102 | x_includes=NONE | |
103 | x_libraries=NONE | |
1f1e5dd8 MM |
104 | bindir='${exec_prefix}/bin' |
105 | sbindir='${exec_prefix}/sbin' | |
106 | libexecdir='${exec_prefix}/libexec' | |
107 | datadir='${prefix}/share' | |
108 | sysconfdir='${prefix}/etc' | |
109 | sharedstatedir='${prefix}/com' | |
110 | localstatedir='${prefix}/var' | |
111 | libdir='${exec_prefix}/lib' | |
112 | includedir='${prefix}/include' | |
113 | oldincludedir='/usr/include' | |
114 | infodir='${prefix}/info' | |
115 | mandir='${prefix}/man' | |
4f965b81 MM |
116 | |
117 | # Initialize some other variables. | |
118 | subdirs= | |
1f1e5dd8 | 119 | MFLAGS= MAKEFLAGS= |
5c04f4f7 MM |
120 | # Maximum number of lines to put in a shell here document. |
121 | ac_max_here_lines=12 | |
4f965b81 MM |
122 | |
123 | ac_prev= | |
124 | for ac_option | |
125 | do | |
126 | ||
127 | # If the previous option needs an argument, assign it. | |
128 | if test -n "$ac_prev"; then | |
129 | eval "$ac_prev=\$ac_option" | |
130 | ac_prev= | |
131 | continue | |
132 | fi | |
133 | ||
134 | case "$ac_option" in | |
135 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
136 | *) ac_optarg= ;; | |
137 | esac | |
138 | ||
139 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
140 | ||
141 | case "$ac_option" in | |
142 | ||
1f1e5dd8 MM |
143 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
144 | ac_prev=bindir ;; | |
145 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
146 | bindir="$ac_optarg" ;; | |
147 | ||
148 | -build | --build | --buil | --bui | --bu) | |
4f965b81 | 149 | ac_prev=build ;; |
1f1e5dd8 | 150 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
4f965b81 MM |
151 | build="$ac_optarg" ;; |
152 | ||
153 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
154 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
155 | ac_prev=cache_file ;; | |
156 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
157 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
158 | cache_file="$ac_optarg" ;; | |
159 | ||
1f1e5dd8 MM |
160 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
161 | ac_prev=datadir ;; | |
162 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
163 | | --da=*) | |
164 | datadir="$ac_optarg" ;; | |
165 | ||
4f965b81 MM |
166 | -disable-* | --disable-*) |
167 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
168 | # Reject names that are not valid shell variable names. | |
169 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
170 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
171 | fi | |
172 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
173 | eval "enable_${ac_feature}=no" ;; | |
174 | ||
175 | -enable-* | --enable-*) | |
176 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
177 | # Reject names that are not valid shell variable names. | |
178 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
179 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
180 | fi | |
181 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
182 | case "$ac_option" in | |
183 | *=*) ;; | |
184 | *) ac_optarg=yes ;; | |
185 | esac | |
186 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
187 | ||
188 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
189 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
190 | | --exec | --exe | --ex) | |
191 | ac_prev=exec_prefix ;; | |
192 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
193 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
194 | | --exec=* | --exe=* | --ex=*) | |
195 | exec_prefix="$ac_optarg" ;; | |
196 | ||
197 | -gas | --gas | --ga | --g) | |
198 | # Obsolete; use --with-gas. | |
199 | with_gas=yes ;; | |
200 | ||
201 | -help | --help | --hel | --he) | |
202 | # Omit some internal or obsolete options to make the list less imposing. | |
203 | # This message is too long to be a string in the A/UX 3.1 sh. | |
204 | cat << EOF | |
205 | Usage: configure [options] [host] | |
206 | Options: [defaults in brackets after descriptions] | |
207 | Configuration: | |
208 | --cache-file=FILE cache test results in FILE | |
209 | --help print this message | |
210 | --no-create do not create output files | |
211 | --quiet, --silent do not print \`checking...' messages | |
212 | --version print the version of autoconf that created configure | |
213 | Directory and file names: | |
214 | --prefix=PREFIX install architecture-independent files in PREFIX | |
215 | [$ac_default_prefix] | |
1f1e5dd8 | 216 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
4f965b81 | 217 | [same as prefix] |
1f1e5dd8 MM |
218 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
219 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
220 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
221 | --datadir=DIR read-only architecture-independent data in DIR | |
222 | [PREFIX/share] | |
223 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
224 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
225 | [PREFIX/com] | |
226 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
227 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
228 | --includedir=DIR C header files in DIR [PREFIX/include] | |
229 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
230 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
231 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
4f965b81 MM |
232 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
233 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
234 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1f1e5dd8 MM |
235 | --program-transform-name=PROGRAM |
236 | run sed PROGRAM on installed program names | |
237 | EOF | |
238 | cat << EOF | |
4f965b81 MM |
239 | Host type: |
240 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
241 | --host=HOST configure for HOST [guessed] | |
242 | --target=TARGET configure for TARGET [TARGET=HOST] | |
243 | Features and packages: | |
244 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
245 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
246 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
247 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
248 | --x-includes=DIR X include files are in DIR | |
249 | --x-libraries=DIR X library files are in DIR | |
4f965b81 | 250 | EOF |
1f1e5dd8 MM |
251 | if test -n "$ac_help"; then |
252 | echo "--enable and --with options recognized:$ac_help" | |
253 | fi | |
4f965b81 MM |
254 | exit 0 ;; |
255 | ||
256 | -host | --host | --hos | --ho) | |
257 | ac_prev=host ;; | |
258 | -host=* | --host=* | --hos=* | --ho=*) | |
259 | host="$ac_optarg" ;; | |
260 | ||
1f1e5dd8 MM |
261 | -includedir | --includedir | --includedi | --included | --include \ |
262 | | --includ | --inclu | --incl | --inc) | |
263 | ac_prev=includedir ;; | |
264 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
265 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
266 | includedir="$ac_optarg" ;; | |
267 | ||
268 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
269 | ac_prev=infodir ;; | |
270 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
271 | infodir="$ac_optarg" ;; | |
272 | ||
273 | -libdir | --libdir | --libdi | --libd) | |
274 | ac_prev=libdir ;; | |
275 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
276 | libdir="$ac_optarg" ;; | |
277 | ||
278 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
279 | | --libexe | --libex | --libe) | |
280 | ac_prev=libexecdir ;; | |
281 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
282 | | --libexe=* | --libex=* | --libe=*) | |
283 | libexecdir="$ac_optarg" ;; | |
284 | ||
285 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
286 | | --localstate | --localstat | --localsta | --localst \ | |
287 | | --locals | --local | --loca | --loc | --lo) | |
288 | ac_prev=localstatedir ;; | |
289 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
290 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
291 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
292 | localstatedir="$ac_optarg" ;; | |
293 | ||
294 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
295 | ac_prev=mandir ;; | |
296 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
297 | mandir="$ac_optarg" ;; | |
298 | ||
4f965b81 MM |
299 | -nfp | --nfp | --nf) |
300 | # Obsolete; use --without-fp. | |
301 | with_fp=no ;; | |
302 | ||
303 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
304 | | --no-cr | --no-c) | |
305 | no_create=yes ;; | |
306 | ||
307 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
308 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
309 | no_recursion=yes ;; | |
310 | ||
1f1e5dd8 MM |
311 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
312 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
313 | | --oldin | --oldi | --old | --ol | --o) | |
314 | ac_prev=oldincludedir ;; | |
315 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
316 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
317 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
318 | oldincludedir="$ac_optarg" ;; | |
319 | ||
4f965b81 MM |
320 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
321 | ac_prev=prefix ;; | |
322 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
323 | prefix="$ac_optarg" ;; | |
324 | ||
325 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
326 | | --program-pre | --program-pr | --program-p) | |
327 | ac_prev=program_prefix ;; | |
328 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
329 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
330 | program_prefix="$ac_optarg" ;; | |
331 | ||
332 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
333 | | --program-suf | --program-su | --program-s) | |
334 | ac_prev=program_suffix ;; | |
335 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
336 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
337 | program_suffix="$ac_optarg" ;; | |
338 | ||
339 | -program-transform-name | --program-transform-name \ | |
340 | | --program-transform-nam | --program-transform-na \ | |
341 | | --program-transform-n | --program-transform- \ | |
342 | | --program-transform | --program-transfor \ | |
343 | | --program-transfo | --program-transf \ | |
344 | | --program-trans | --program-tran \ | |
345 | | --progr-tra | --program-tr | --program-t) | |
346 | ac_prev=program_transform_name ;; | |
347 | -program-transform-name=* | --program-transform-name=* \ | |
348 | | --program-transform-nam=* | --program-transform-na=* \ | |
349 | | --program-transform-n=* | --program-transform-=* \ | |
350 | | --program-transform=* | --program-transfor=* \ | |
351 | | --program-transfo=* | --program-transf=* \ | |
352 | | --program-trans=* | --program-tran=* \ | |
353 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
354 | program_transform_name="$ac_optarg" ;; | |
355 | ||
356 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
357 | | -silent | --silent | --silen | --sile | --sil) | |
358 | silent=yes ;; | |
359 | ||
1f1e5dd8 MM |
360 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
361 | ac_prev=sbindir ;; | |
362 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
363 | | --sbi=* | --sb=*) | |
364 | sbindir="$ac_optarg" ;; | |
365 | ||
366 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
367 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
368 | | --sharedst | --shareds | --shared | --share | --shar \ | |
369 | | --sha | --sh) | |
370 | ac_prev=sharedstatedir ;; | |
371 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
372 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
373 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
374 | | --sha=* | --sh=*) | |
375 | sharedstatedir="$ac_optarg" ;; | |
376 | ||
4f965b81 MM |
377 | -site | --site | --sit) |
378 | ac_prev=site ;; | |
379 | -site=* | --site=* | --sit=*) | |
380 | site="$ac_optarg" ;; | |
381 | ||
382 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
383 | ac_prev=srcdir ;; | |
384 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
385 | srcdir="$ac_optarg" ;; | |
386 | ||
1f1e5dd8 MM |
387 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
388 | | --syscon | --sysco | --sysc | --sys | --sy) | |
389 | ac_prev=sysconfdir ;; | |
390 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
391 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
392 | sysconfdir="$ac_optarg" ;; | |
393 | ||
4f965b81 MM |
394 | -target | --target | --targe | --targ | --tar | --ta | --t) |
395 | ac_prev=target ;; | |
396 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
397 | target="$ac_optarg" ;; | |
398 | ||
399 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
400 | verbose=yes ;; | |
401 | ||
402 | -version | --version | --versio | --versi | --vers) | |
5c04f4f7 | 403 | echo "configure generated by autoconf version 2.12" |
4f965b81 MM |
404 | exit 0 ;; |
405 | ||
406 | -with-* | --with-*) | |
407 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
408 | # Reject names that are not valid shell variable names. | |
409 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
410 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
411 | fi | |
412 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
413 | case "$ac_option" in | |
414 | *=*) ;; | |
415 | *) ac_optarg=yes ;; | |
416 | esac | |
417 | eval "with_${ac_package}='$ac_optarg'" ;; | |
418 | ||
419 | -without-* | --without-*) | |
420 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
421 | # Reject names that are not valid shell variable names. | |
422 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
423 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
424 | fi | |
425 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
426 | eval "with_${ac_package}=no" ;; | |
427 | ||
428 | --x) | |
429 | # Obsolete; use --with-x. | |
430 | with_x=yes ;; | |
431 | ||
432 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
433 | | --x-incl | --x-inc | --x-in | --x-i) | |
434 | ac_prev=x_includes ;; | |
435 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
436 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
437 | x_includes="$ac_optarg" ;; | |
438 | ||
439 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
440 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
441 | ac_prev=x_libraries ;; | |
442 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
443 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
444 | x_libraries="$ac_optarg" ;; | |
445 | ||
446 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
447 | ;; | |
448 | ||
1f1e5dd8 | 449 | *) |
4f965b81 MM |
450 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
451 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
452 | fi | |
453 | if test "x$nonopt" != xNONE; then | |
454 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
455 | fi | |
456 | nonopt="$ac_option" | |
457 | ;; | |
458 | ||
459 | esac | |
460 | done | |
461 | ||
462 | if test -n "$ac_prev"; then | |
463 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
464 | fi | |
465 | ||
466 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
467 | ||
468 | # File descriptor usage: | |
469 | # 0 standard input | |
470 | # 1 file creation | |
471 | # 2 errors and warnings | |
472 | # 3 some systems may open it to /dev/tty | |
473 | # 4 used on the Kubota Titan | |
474 | # 6 checking for... messages and results | |
475 | # 5 compiler messages saved in config.log | |
476 | if test "$silent" = yes; then | |
477 | exec 6>/dev/null | |
478 | else | |
479 | exec 6>&1 | |
480 | fi | |
481 | exec 5>./config.log | |
482 | ||
483 | echo "\ | |
484 | This file contains any messages produced by compilers while | |
485 | running configure, to aid debugging if configure makes a mistake. | |
486 | " 1>&5 | |
487 | ||
488 | # Strip out --no-create and --no-recursion so they do not pile up. | |
489 | # Also quote any args containing shell metacharacters. | |
490 | ac_configure_args= | |
491 | for ac_arg | |
492 | do | |
493 | case "$ac_arg" in | |
494 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
495 | | --no-cr | --no-c) ;; | |
496 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
497 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
498 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
499 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
500 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
501 | esac | |
502 | done | |
503 | ||
504 | # NLS nuisances. | |
5c04f4f7 MM |
505 | # Only set these to C if already set. These must not be set unconditionally |
506 | # because not all systems understand e.g. LANG=C (notably SCO). | |
507 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
508 | # Non-C LC_CTYPE values break the ctype check. | |
4f965b81 | 509 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
5c04f4f7 MM |
510 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
511 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
512 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
4f965b81 MM |
513 | |
514 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
515 | rm -rf conftest* confdefs.h | |
516 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
517 | echo > confdefs.h | |
518 | ||
519 | # A filename unique to this package, relative to the directory that | |
520 | # configure is in, which we can look for to find out if srcdir is correct. | |
521 | ac_unique_file=Makefile.in | |
522 | ||
523 | # Find the source files, if location was not specified. | |
524 | if test -z "$srcdir"; then | |
525 | ac_srcdir_defaulted=yes | |
526 | # Try the directory containing this script, then its parent. | |
527 | ac_prog=$0 | |
528 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
529 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
530 | srcdir=$ac_confdir | |
531 | if test ! -r $srcdir/$ac_unique_file; then | |
532 | srcdir=.. | |
533 | fi | |
534 | else | |
535 | ac_srcdir_defaulted=no | |
536 | fi | |
537 | if test ! -r $srcdir/$ac_unique_file; then | |
538 | if test "$ac_srcdir_defaulted" = yes; then | |
539 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
540 | else | |
541 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
542 | fi | |
543 | fi | |
544 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
545 | ||
546 | # Prefer explicitly selected file to automatically selected ones. | |
547 | if test -z "$CONFIG_SITE"; then | |
548 | if test "x$prefix" != xNONE; then | |
549 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
550 | else | |
551 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
552 | fi | |
553 | fi | |
554 | for ac_site_file in $CONFIG_SITE; do | |
555 | if test -r "$ac_site_file"; then | |
556 | echo "loading site script $ac_site_file" | |
557 | . "$ac_site_file" | |
558 | fi | |
559 | done | |
560 | ||
561 | if test -r "$cache_file"; then | |
562 | echo "loading cache $cache_file" | |
563 | . $cache_file | |
564 | else | |
565 | echo "creating cache $cache_file" | |
566 | > $cache_file | |
567 | fi | |
568 | ||
569 | ac_ext=c | |
570 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
a72d2509 MM |
571 | ac_cpp='$CPP $CPPFLAGS' |
572 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
573 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
5c04f4f7 | 574 | cross_compiling=$ac_cv_prog_cc_cross |
4f965b81 MM |
575 | |
576 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
577 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
578 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
579 | ac_n= ac_c=' | |
580 | ' ac_t=' ' | |
581 | else | |
582 | ac_n=-n ac_c= ac_t= | |
583 | fi | |
584 | else | |
585 | ac_n= ac_c='\c' ac_t= | |
586 | fi | |
587 | ||
588 | ||
589 | ||
30c87b55 MM |
590 | ac_aux_dir= |
591 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
592 | if test -f $ac_dir/install-sh; then | |
593 | ac_aux_dir=$ac_dir | |
594 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
595 | break | |
596 | elif test -f $ac_dir/install.sh; then | |
597 | ac_aux_dir=$ac_dir | |
598 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
599 | break | |
600 | fi | |
601 | done | |
602 | if test -z "$ac_aux_dir"; then | |
603 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
604 | fi | |
605 | ac_config_guess=$ac_aux_dir/config.guess | |
606 | ac_config_sub=$ac_aux_dir/config.sub | |
607 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
608 | ||
609 | # Find a good install program. We prefer a C program (faster), | |
610 | # so one script is as good as another. But avoid the broken or | |
611 | # incompatible versions: | |
612 | # SysV /etc/install, /usr/sbin/install | |
613 | # SunOS /usr/etc/install | |
614 | # IRIX /sbin/install | |
615 | # AIX /bin/install | |
616 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
617 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
618 | # ./install, which can be erroneously created by make from ./install.sh. | |
619 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
5c04f4f7 | 620 | echo "configure:621: checking for a BSD compatible install" >&5 |
30c87b55 MM |
621 | if test -z "$INSTALL"; then |
622 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
623 | echo $ac_n "(cached) $ac_c" 1>&6 | |
624 | else | |
5c04f4f7 | 625 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
30c87b55 MM |
626 | for ac_dir in $PATH; do |
627 | # Account for people who put trailing slashes in PATH elements. | |
628 | case "$ac_dir/" in | |
629 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
630 | *) | |
631 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
632 | for ac_prog in ginstall installbsd scoinst install; do | |
633 | if test -f $ac_dir/$ac_prog; then | |
634 | if test $ac_prog = install && | |
635 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
636 | # AIX install. It has an incompatible calling convention. | |
637 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
638 | : | |
639 | else | |
640 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
641 | break 2 | |
642 | fi | |
643 | fi | |
644 | done | |
645 | ;; | |
646 | esac | |
647 | done | |
5c04f4f7 | 648 | IFS="$ac_save_IFS" |
30c87b55 MM |
649 | |
650 | fi | |
651 | if test "${ac_cv_path_install+set}" = set; then | |
652 | INSTALL="$ac_cv_path_install" | |
653 | else | |
654 | # As a last resort, use the slow shell script. We don't cache a | |
655 | # path for INSTALL within a source directory, because that will | |
656 | # break other packages using the cache if that directory is | |
657 | # removed, or if the path is relative. | |
658 | INSTALL="$ac_install_sh" | |
659 | fi | |
660 | fi | |
661 | echo "$ac_t""$INSTALL" 1>&6 | |
662 | ||
663 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
664 | # It thinks the first close brace ends the variable substitution. | |
665 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
666 | ||
667 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
668 | ||
a72d2509 MM |
669 | # Extract the first word of "gcc", so it can be a program name with args. |
670 | set dummy gcc; ac_word=$2 | |
671 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5c04f4f7 | 672 | echo "configure:673: checking for $ac_word" >&5 |
a72d2509 MM |
673 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
674 | echo $ac_n "(cached) $ac_c" 1>&6 | |
675 | else | |
676 | if test -n "$CC"; then | |
677 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
678 | else | |
679 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
680 | for ac_dir in $PATH; do | |
681 | test -z "$ac_dir" && ac_dir=. | |
682 | if test -f $ac_dir/$ac_word; then | |
683 | ac_cv_prog_CC="gcc" | |
684 | break | |
685 | fi | |
686 | done | |
687 | IFS="$ac_save_ifs" | |
688 | fi | |
689 | fi | |
690 | CC="$ac_cv_prog_CC" | |
691 | if test -n "$CC"; then | |
692 | echo "$ac_t""$CC" 1>&6 | |
693 | else | |
694 | echo "$ac_t""no" 1>&6 | |
695 | fi | |
696 | ||
697 | if test -z "$CC"; then | |
698 | # Extract the first word of "cc", so it can be a program name with args. | |
699 | set dummy cc; ac_word=$2 | |
700 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5c04f4f7 | 701 | echo "configure:702: checking for $ac_word" >&5 |
a72d2509 MM |
702 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
703 | echo $ac_n "(cached) $ac_c" 1>&6 | |
704 | else | |
705 | if test -n "$CC"; then | |
706 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
707 | else | |
708 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
709 | ac_prog_rejected=no | |
710 | for ac_dir in $PATH; do | |
711 | test -z "$ac_dir" && ac_dir=. | |
712 | if test -f $ac_dir/$ac_word; then | |
713 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
714 | ac_prog_rejected=yes | |
715 | continue | |
716 | fi | |
717 | ac_cv_prog_CC="cc" | |
718 | break | |
719 | fi | |
720 | done | |
721 | IFS="$ac_save_ifs" | |
722 | if test $ac_prog_rejected = yes; then | |
723 | # We found a bogon in the path, so make sure we never use it. | |
724 | set dummy $ac_cv_prog_CC | |
725 | shift | |
726 | if test $# -gt 0; then | |
727 | # We chose a different compiler from the bogus one. | |
728 | # However, it has the same basename, so the bogon will be chosen | |
729 | # first if we set CC to just the basename; use the full file name. | |
730 | shift | |
731 | set dummy "$ac_dir/$ac_word" "$@" | |
732 | shift | |
733 | ac_cv_prog_CC="$@" | |
734 | fi | |
735 | fi | |
736 | fi | |
737 | fi | |
738 | CC="$ac_cv_prog_CC" | |
739 | if test -n "$CC"; then | |
740 | echo "$ac_t""$CC" 1>&6 | |
741 | else | |
742 | echo "$ac_t""no" 1>&6 | |
743 | fi | |
744 | ||
745 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
746 | fi | |
747 | ||
5c04f4f7 MM |
748 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
749 | echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 | |
750 | ||
751 | ac_ext=c | |
752 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
753 | ac_cpp='$CPP $CPPFLAGS' | |
754 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
755 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
756 | cross_compiling=$ac_cv_prog_cc_cross | |
757 | ||
758 | cat > conftest.$ac_ext <<EOF | |
759 | #line 760 "configure" | |
760 | #include "confdefs.h" | |
761 | main(){return(0);} | |
762 | EOF | |
763 | if { (eval echo configure:764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
764 | ac_cv_prog_cc_works=yes | |
765 | # If we can't run a trivial program, we are probably using a cross compiler. | |
766 | if (./conftest; exit) 2>/dev/null; then | |
767 | ac_cv_prog_cc_cross=no | |
768 | else | |
769 | ac_cv_prog_cc_cross=yes | |
770 | fi | |
771 | else | |
772 | echo "configure: failed program was:" >&5 | |
773 | cat conftest.$ac_ext >&5 | |
774 | ac_cv_prog_cc_works=no | |
775 | fi | |
776 | rm -fr conftest* | |
777 | ||
778 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
779 | if test $ac_cv_prog_cc_works = no; then | |
780 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
781 | fi | |
782 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
783 | echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 | |
784 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 | |
785 | cross_compiling=$ac_cv_prog_cc_cross | |
786 | ||
a72d2509 | 787 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
5c04f4f7 | 788 | echo "configure:789: checking whether we are using GNU C" >&5 |
a72d2509 MM |
789 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
790 | echo $ac_n "(cached) $ac_c" 1>&6 | |
791 | else | |
792 | cat > conftest.c <<EOF | |
793 | #ifdef __GNUC__ | |
794 | yes; | |
795 | #endif | |
796 | EOF | |
5c04f4f7 | 797 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
a72d2509 MM |
798 | ac_cv_prog_gcc=yes |
799 | else | |
800 | ac_cv_prog_gcc=no | |
801 | fi | |
802 | fi | |
803 | ||
804 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
5c04f4f7 | 805 | |
a72d2509 MM |
806 | if test $ac_cv_prog_gcc = yes; then |
807 | GCC=yes | |
5c04f4f7 MM |
808 | ac_test_CFLAGS="${CFLAGS+set}" |
809 | ac_save_CFLAGS="$CFLAGS" | |
810 | CFLAGS= | |
811 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
812 | echo "configure:813: checking whether ${CC-cc} accepts -g" >&5 | |
813 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then | |
a72d2509 MM |
814 | echo $ac_n "(cached) $ac_c" 1>&6 |
815 | else | |
816 | echo 'void f(){}' > conftest.c | |
817 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
5c04f4f7 | 818 | ac_cv_prog_cc_g=yes |
a72d2509 | 819 | else |
5c04f4f7 | 820 | ac_cv_prog_cc_g=no |
a72d2509 MM |
821 | fi |
822 | rm -f conftest* | |
823 | ||
824 | fi | |
825 | ||
5c04f4f7 MM |
826 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
827 | if test "$ac_test_CFLAGS" = set; then | |
828 | CFLAGS="$ac_save_CFLAGS" | |
829 | elif test $ac_cv_prog_cc_g = yes; then | |
830 | CFLAGS="-g -O2" | |
831 | else | |
832 | CFLAGS="-O2" | |
a72d2509 MM |
833 | fi |
834 | else | |
835 | GCC= | |
836 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
837 | fi | |
838 | ||
839 | ||
840 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
5c04f4f7 MM |
841 | |
842 | if test "x$cross_compiling" = "xno"; then | |
843 | CC_FOR_BUILD='$(CC)' | |
a72d2509 | 844 | else |
5c04f4f7 | 845 | CC_FOR_BUILD=gcc |
a72d2509 | 846 | fi |
5c04f4f7 MM |
847 | |
848 | ||
849 | # Check whether --enable-sim-alignment or --disable-sim-alignment was given. | |
850 | if test "${enable_sim_alignment+set}" = set; then | |
851 | enableval="$enable_sim_alignment" | |
852 | case "${enableval}" in | |
853 | yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; | |
854 | no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; | |
855 | 0 | default | DEFAULT) sim_alignment="-DWITH_ALIGNMENT=0";; | |
856 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";; | |
857 | esac | |
858 | if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then | |
859 | echo "Setting alignment flags = $sim_alignment" 6>&1 | |
a72d2509 | 860 | fi |
5c04f4f7 MM |
861 | else |
862 | sim_alignment="" | |
a72d2509 MM |
863 | fi |
864 | ||
a72d2509 | 865 | |
5c04f4f7 MM |
866 | # Check whether --enable-sim-assert or --disable-sim-assert was given. |
867 | if test "${enable_sim_assert+set}" = set; then | |
868 | enableval="$enable_sim_assert" | |
869 | case "${enableval}" in | |
870 | yes) sim_assert="-DWITH_ASSERT=1";; | |
871 | no) sim_assert="-DWITH_ASSERT=0";; | |
872 | *) { echo "configure: error: "--enable-sim-assert does not take a value"" 1>&2; exit 1; }; sim_assert="";; | |
873 | esac | |
874 | if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then | |
875 | echo "Setting assert flags = $sim_assert" 6>&1 | |
876 | fi | |
a72d2509 | 877 | else |
5c04f4f7 | 878 | sim_assert="" |
a72d2509 MM |
879 | fi |
880 | ||
5c04f4f7 MM |
881 | |
882 | # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given. | |
883 | if test "${enable_sim_bitsize+set}" = set; then | |
884 | enableval="$enable_sim_bitsize" | |
c494cadd | 885 | case "${enableval}" in |
5c04f4f7 MM |
886 | 32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";; |
887 | *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; }; sim_bitsize="";; | |
c494cadd | 888 | esac |
5c04f4f7 MM |
889 | if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then |
890 | echo "Setting bitsize flags = $sim_bitsize" 6>&1 | |
ba62bb1c | 891 | fi |
c494cadd | 892 | else |
5c04f4f7 | 893 | sim_bitsize="" |
c494cadd MM |
894 | fi |
895 | ||
5c04f4f7 MM |
896 | |
897 | # Check whether --enable-sim-bswap or --disable-sim-bswap was given. | |
898 | if test "${enable_sim_bswap+set}" = set; then | |
899 | enableval="$enable_sim_bswap" | |
73c4941b | 900 | case "${enableval}" in |
5c04f4f7 MM |
901 | yes) sim_bswap="-DWITH_BSWAP=1";; |
902 | no) sim_bswap="-DWITH_BSWAP=0";; | |
903 | *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";; | |
73c4941b | 904 | esac |
5c04f4f7 MM |
905 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then |
906 | echo "Setting bswap flags = $sim_bswap" 6>&1 | |
ba62bb1c | 907 | fi |
73c4941b | 908 | else |
5c04f4f7 | 909 | sim_bswap="" |
73c4941b MM |
910 | fi |
911 | ||
5c04f4f7 MM |
912 | |
913 | # Check whether --enable-sim-cflags or --disable-sim-cflags was given. | |
914 | if test "${enable_sim_cflags+set}" = set; then | |
915 | enableval="$enable_sim_cflags" | |
30c87b55 | 916 | case "${enableval}" in |
5c04f4f7 MM |
917 | yes) sim_cflags="-O2 -fomit-frame-pointer";; |
918 | no) sim_cflags="";; | |
919 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
30c87b55 | 920 | esac |
5c04f4f7 MM |
921 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then |
922 | echo "Setting sim cflags = $sim_cflags" 6>&1 | |
30c87b55 MM |
923 | fi |
924 | else | |
5c04f4f7 | 925 | sim_cflags="" |
30c87b55 MM |
926 | fi |
927 | ||
5c04f4f7 | 928 | |
c494cadd | 929 | # Check whether --enable-sim-config or --disable-sim-config was given. |
1f1e5dd8 MM |
930 | if test "${enable_sim_config+set}" = set; then |
931 | enableval="$enable_sim_config" | |
c494cadd | 932 | case "${enableval}" in |
a3114052 | 933 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-config=file"" 1>&2; exit 1; };; |
813ad010 | 934 | *) if test -f "${srcdir}/${enableval}"; then |
a3114052 | 935 | sim_config="${enableval}"; |
813ad010 | 936 | elif test -f "${srcdir}/${enableval}-config.h"; then |
a3114052 MM |
937 | sim_config="${enableval}-config.h" |
938 | else | |
939 | { echo "configure: error: "Config file $enableval was not found"" 1>&2; exit 1; }; | |
940 | sim_config=std-config.h | |
941 | fi;; | |
c494cadd | 942 | esac |
2bc7869d | 943 | if test x"$silent" != x"yes" && test x"$sim_config" != x""; then |
ba62bb1c MM |
944 | echo "Setting config flags = $sim_config" 6>&1 |
945 | fi | |
c494cadd | 946 | else |
a3114052 MM |
947 | sim_config="std-config.h" |
948 | if test x"$silent" != x"yes"; then | |
949 | echo "Setting config flags = $sim_config" 6>&1 | |
950 | fi | |
c494cadd MM |
951 | fi |
952 | ||
c494cadd | 953 | |
5c04f4f7 MM |
954 | # Check whether --enable-sim-default-model or --disable-sim-default-model was given. |
955 | if test "${enable_sim_default_model+set}" = set; then | |
956 | enableval="$enable_sim_default_model" | |
c494cadd | 957 | case "${enableval}" in |
5c04f4f7 MM |
958 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-default-model=model"" 1>&2; exit 1; };; |
959 | *) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";; | |
c494cadd | 960 | esac |
5c04f4f7 MM |
961 | if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then |
962 | echo "Setting default-model flags = $sim_default_model" 6>&1 | |
ba62bb1c | 963 | fi |
c494cadd | 964 | else |
5c04f4f7 | 965 | sim_model="" |
c494cadd MM |
966 | fi |
967 | ||
5c04f4f7 | 968 | |
c494cadd | 969 | # Check whether --enable-sim-duplicate or --disable-sim-duplicate was given. |
1f1e5dd8 MM |
970 | if test "${enable_sim_duplicate+set}" = set; then |
971 | enableval="$enable_sim_duplicate" | |
c494cadd | 972 | case "${enableval}" in |
30c87b55 | 973 | yes) sim_dup="-E";; |
a3114052 MM |
974 | no) sim_dup="";; |
975 | *) { echo "configure: error: "--enable-sim-duplicate does not take a value"" 1>&2; exit 1; }; sim_dup="";; | |
c494cadd | 976 | esac |
2bc7869d | 977 | if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then |
ba62bb1c MM |
978 | echo "Setting duplicate flags = $sim_dup" 6>&1 |
979 | fi | |
c494cadd | 980 | else |
30c87b55 | 981 | sim_dup="-E" |
2bc7869d MM |
982 | if test x"$silent" != x"yes"; then |
983 | echo "Setting duplicate flags = $sim_dup" 6>&1 | |
984 | fi | |
c494cadd MM |
985 | fi |
986 | ||
5c04f4f7 MM |
987 | |
988 | # Check whether --enable-sim-endian or --disable-sim-endian was given. | |
989 | if test "${enable_sim_endian+set}" = set; then | |
990 | enableval="$enable_sim_endian" | |
30c87b55 | 991 | case "${enableval}" in |
5c04f4f7 MM |
992 | yes) case "$target" in |
993 | *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
994 | *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
995 | *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
996 | esac;; | |
997 | no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
998 | b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
999 | l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
1000 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";; | |
30c87b55 | 1001 | esac |
5c04f4f7 MM |
1002 | if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then |
1003 | echo "Setting endian flags = $sim_endian" 6>&1 | |
30c87b55 MM |
1004 | fi |
1005 | else | |
5c04f4f7 | 1006 | sim_endian="" |
30c87b55 | 1007 | fi |
5c04f4f7 MM |
1008 | |
1009 | ||
1010 | # Check whether --enable-sim-env or --disable-sim-env was given. | |
1011 | if test "${enable_sim_env+set}" = set; then | |
1012 | enableval="$enable_sim_env" | |
1013 | case "${enableval}" in | |
1014 | operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";; | |
1015 | virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";; | |
1016 | user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";; | |
1017 | no) sim_env="-DWITH_ENVIRONMENT=0";; | |
1018 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-env"" 1>&2; exit 1; }; sim_env="";; | |
1019 | esac | |
1020 | if test x"$silent" != x"yes" && test x"$sim_env" != x""; then | |
1021 | echo "Setting env flags = $sim_env" 6>&1 | |
30c87b55 | 1022 | fi |
5c04f4f7 MM |
1023 | else |
1024 | sim_env="" | |
1025 | fi | |
1026 | ||
30c87b55 | 1027 | |
c494cadd | 1028 | # Check whether --enable-sim-filter or --disable-sim-filter was given. |
1f1e5dd8 MM |
1029 | if test "${enable_sim_filter+set}" = set; then |
1030 | enableval="$enable_sim_filter" | |
c494cadd | 1031 | case "${enableval}" in |
a3114052 MM |
1032 | yes) { echo "configure: error: "--enable-sim-filter must be specified with a rule to filter or no"" 1>&2; exit 1; }; sim_filter="";; |
1033 | no) sim_filter="";; | |
30c87b55 | 1034 | *) sim_filter="-F $enableval";; |
c494cadd | 1035 | esac |
2bc7869d | 1036 | if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then |
ba62bb1c MM |
1037 | echo "Setting filter flags = $sim_filter" 6>&1 |
1038 | fi | |
c494cadd | 1039 | else |
5c04f4f7 | 1040 | sim_filter="-F 32,f,o" |
2bc7869d MM |
1041 | if test x"$silent" != x"yes"; then |
1042 | echo "Setting filter flags = $sim_filter" 6>&1 | |
1043 | fi | |
c494cadd MM |
1044 | fi |
1045 | ||
5c04f4f7 MM |
1046 | |
1047 | # Check whether --enable-sim-float or --disable-sim-float was given. | |
1048 | if test "${enable_sim_float+set}" = set; then | |
1049 | enableval="$enable_sim_float" | |
1050 | case "${enableval}" in | |
1051 | yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; | |
1052 | no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; | |
1053 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";; | |
c494cadd | 1054 | esac |
5c04f4f7 MM |
1055 | if test x"$silent" != x"yes" && test x"$sim_float" != x""; then |
1056 | echo "Setting float flags = $sim_float" 6>&1 | |
f2181eff | 1057 | fi |
c494cadd | 1058 | else |
5c04f4f7 | 1059 | sim_float="" |
c494cadd MM |
1060 | fi |
1061 | ||
5c04f4f7 | 1062 | |
2e913166 MM |
1063 | # Check whether --enable-sim-hardware or --disable-sim-hardware was given. |
1064 | if test "${enable_sim_hardware+set}" = set; then | |
1065 | enableval="$enable_sim_hardware" | |
5c04f4f7 | 1066 | hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide" |
2e913166 MM |
1067 | case "${enableval}" in |
1068 | yes) ;; | |
1069 | no) { echo "configure: error: "List of hardware must be specified for --enable-sim-hardware"" 1>&2; exit 1; }; hardware="";; | |
1070 | ,*) hardware="${hardware}${enableval}";; | |
5c04f4f7 MM |
1071 | *,) hardware="${enableval}${hardware}";; |
1072 | *) hardware="${enableval}"'';; | |
2e913166 MM |
1073 | esac |
1074 | sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'` | |
1075 | sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'` | |
1076 | if test x"$silent" != x"yes" && test x"$hardware" != x""; then | |
1077 | echo "Setting hardware to $sim_hw_src, $sim_hw_obj" | |
1078 | fi | |
1079 | else | |
5c04f4f7 | 1080 | hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide" |
2e913166 MM |
1081 | sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'` |
1082 | sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'` | |
1083 | if test x"$silent" != x"yes"; then | |
1084 | echo "Setting hardware to $sim_hw_src, $sim_hw_obj" | |
1085 | fi | |
1086 | fi | |
1087 | ||
1088 | ||
5c04f4f7 MM |
1089 | # Check whether --enable-sim-hostbitsize or --disable-sim-hostbitsize was given. |
1090 | if test "${enable_sim_hostbitsize+set}" = set; then | |
1091 | enableval="$enable_sim_hostbitsize" | |
c494cadd | 1092 | case "${enableval}" in |
5c04f4f7 MM |
1093 | 32|64) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";; |
1094 | *) { echo "configure: error: "--enable-sim-hostbitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; }; sim_hostbitsize="";; | |
c494cadd | 1095 | esac |
5c04f4f7 MM |
1096 | if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then |
1097 | echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1 | |
ba62bb1c | 1098 | fi |
c494cadd | 1099 | else |
5c04f4f7 | 1100 | sim_hostbitsize="" |
c494cadd MM |
1101 | fi |
1102 | ||
2e913166 | 1103 | |
c494cadd | 1104 | # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given. |
1f1e5dd8 MM |
1105 | if test "${enable_sim_hostendian+set}" = set; then |
1106 | enableval="$enable_sim_hostendian" | |
c494cadd MM |
1107 | case "${enableval}" in |
1108 | no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; | |
1109 | b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; | |
1110 | l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; | |
a3114052 | 1111 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";; |
c494cadd | 1112 | esac |
2bc7869d | 1113 | if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then |
ba62bb1c MM |
1114 | echo "Setting hostendian flags = $sim_hostendian" 6>&1 |
1115 | fi | |
c494cadd | 1116 | else |
a72d2509 MM |
1117 | |
1118 | if test "x$cross_compiling" = "xno"; then | |
1119 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 | |
5c04f4f7 | 1120 | echo "configure:1121: checking whether byte ordering is bigendian" >&5 |
a72d2509 MM |
1121 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
1122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1123 | else | |
1124 | ac_cv_c_bigendian=unknown | |
1125 | # See if sys/param.h defines the BYTE_ORDER macro. | |
1126 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1127 | #line 1128 "configure" |
a72d2509 MM |
1128 | #include "confdefs.h" |
1129 | #include <sys/types.h> | |
1130 | #include <sys/param.h> | |
5c04f4f7 | 1131 | int main() { |
a72d2509 MM |
1132 | |
1133 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN | |
1134 | bogus endian macros | |
1135 | #endif | |
1136 | ; return 0; } | |
1137 | EOF | |
5c04f4f7 | 1138 | if { (eval echo configure:1139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a72d2509 MM |
1139 | rm -rf conftest* |
1140 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
1141 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1142 | #line 1143 "configure" |
a72d2509 MM |
1143 | #include "confdefs.h" |
1144 | #include <sys/types.h> | |
1145 | #include <sys/param.h> | |
5c04f4f7 | 1146 | int main() { |
a72d2509 MM |
1147 | |
1148 | #if BYTE_ORDER != BIG_ENDIAN | |
1149 | not big endian | |
1150 | #endif | |
1151 | ; return 0; } | |
1152 | EOF | |
5c04f4f7 | 1153 | if { (eval echo configure:1154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a72d2509 MM |
1154 | rm -rf conftest* |
1155 | ac_cv_c_bigendian=yes | |
1156 | else | |
5c04f4f7 MM |
1157 | echo "configure: failed program was:" >&5 |
1158 | cat conftest.$ac_ext >&5 | |
a72d2509 MM |
1159 | rm -rf conftest* |
1160 | ac_cv_c_bigendian=no | |
1161 | fi | |
1162 | rm -f conftest* | |
5c04f4f7 MM |
1163 | else |
1164 | echo "configure: failed program was:" >&5 | |
1165 | cat conftest.$ac_ext >&5 | |
a72d2509 MM |
1166 | fi |
1167 | rm -f conftest* | |
a72d2509 MM |
1168 | if test $ac_cv_c_bigendian = unknown; then |
1169 | if test "$cross_compiling" = yes; then | |
1170 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } | |
1171 | else | |
5c04f4f7 MM |
1172 | cat > conftest.$ac_ext <<EOF |
1173 | #line 1174 "configure" | |
a72d2509 MM |
1174 | #include "confdefs.h" |
1175 | main () { | |
1176 | /* Are we little or big endian? From Harbison&Steele. */ | |
1177 | union | |
1178 | { | |
1179 | long l; | |
1180 | char c[sizeof (long)]; | |
1181 | } u; | |
1182 | u.l = 1; | |
1183 | exit (u.c[sizeof (long) - 1] == 1); | |
1184 | } | |
1185 | EOF | |
5c04f4f7 MM |
1186 | if { (eval echo configure:1187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
1187 | then | |
a72d2509 MM |
1188 | ac_cv_c_bigendian=no |
1189 | else | |
5c04f4f7 MM |
1190 | echo "configure: failed program was:" >&5 |
1191 | cat conftest.$ac_ext >&5 | |
1192 | rm -fr conftest* | |
a72d2509 MM |
1193 | ac_cv_c_bigendian=yes |
1194 | fi | |
a72d2509 | 1195 | rm -fr conftest* |
5c04f4f7 MM |
1196 | fi |
1197 | ||
a72d2509 MM |
1198 | fi |
1199 | fi | |
1200 | ||
1201 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
1202 | if test $ac_cv_c_bigendian = yes; then | |
1203 | cat >> confdefs.h <<\EOF | |
1204 | #define WORDS_BIGENDIAN 1 | |
1205 | EOF | |
1206 | ||
1207 | fi | |
0c18e3f0 | 1208 | |
a72d2509 MM |
1209 | if test $ac_cv_c_bigendian = yes; then |
1210 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" | |
1211 | else | |
1212 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" | |
1213 | fi | |
1214 | else | |
1215 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" | |
1216 | fi | |
c494cadd MM |
1217 | fi |
1218 | ||
5c04f4f7 MM |
1219 | |
1220 | # Check whether --enable-sim-icache or --disable-sim-icache was given. | |
1221 | if test "${enable_sim_icache+set}" = set; then | |
1222 | enableval="$enable_sim_icache" | |
1223 | icache="-R" | |
1224 | case "${enableval}" in | |
1225 | yes) icache="1024"; sim_icache="-I $icache";; | |
1226 | no) sim_icache="-R";; | |
1227 | *) icache=1024 | |
1228 | sim_icache="-" | |
1229 | for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do | |
1230 | case "$x" in | |
1231 | define) sim_icache="${sim_icache}R";; | |
1232 | semantic) sim_icache="${sim_icache}C";; | |
1233 | insn) sim_icache="${sim_icache}S";; | |
1234 | 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;; | |
1235 | *) { echo "configure: error: "Unknown value $x for --enable-sim-icache"" 1>&2; exit 1; }; sim_icache="";; | |
1236 | esac | |
1237 | done | |
1238 | sim_icache="${sim_icache}I $icache";; | |
1239 | esac | |
1240 | if test x"$silent" != x"yes" && test x"$icache" != x""; then | |
1241 | echo "Setting instruction cache size to $icache ($sim_icache)" | |
1242 | fi | |
1243 | else | |
1244 | sim_icache="-CSRI 1024" | |
1245 | if test x"$silent" != x"yes"; then | |
1246 | echo "Setting instruction cache size to 1024 ($sim_icache)" | |
1247 | fi | |
1248 | fi | |
1249 | ||
1250 | ||
1251 | # Check whether --enable-sim-inline or --disable-sim-inline was given. | |
1252 | if test "${enable_sim_inline+set}" = set; then | |
1253 | enableval="$enable_sim_inline" | |
1254 | sim_inline="" | |
1255 | case "$enableval" in | |
1256 | no) sim_inline="-DDEFAULT_INLINE=0";; | |
1257 | 0) sim_inline="-DDEFAULT_INLINE=0";; | |
1258 | yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";; | |
1259 | 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";; | |
1260 | *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
1261 | new_flag="" | |
1262 | case "$x" in | |
1263 | *_INLINE=*) new_flag="-D$x";; | |
1264 | *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;; | |
1265 | *_INLINE) new_flag="-D$x=ALL_INLINE";; | |
1266 | *) new_flag="-D$x""_INLINE=ALL_INLINE";; | |
1267 | esac | |
1268 | if test x"$sim_inline" = x""; then | |
1269 | sim_inline="$new_flag" | |
1270 | else | |
1271 | sim_inline="$sim_inline $new_flag" | |
1272 | fi | |
1273 | done;; | |
1274 | esac | |
1275 | if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then | |
1276 | echo "Setting inline flags = $sim_inline" 6>&1 | |
1277 | fi | |
1278 | else | |
1279 | if test x"$GCC" != ""; then | |
1280 | sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS" | |
1281 | if test x"$silent" != x"yes"; then | |
1282 | echo "Setting inline flags = $sim_inline" 6>&1 | |
1283 | fi | |
1284 | else | |
1285 | sim_inline="" | |
1286 | fi | |
1287 | fi | |
1288 | ||
1289 | ||
1290 | # Check whether --enable-sim-jump or --disable-sim-jump was given. | |
1291 | if test "${enable_sim_jump+set}" = set; then | |
1292 | enableval="$enable_sim_jump" | |
1293 | case "${enableval}" in | |
1294 | yes) sim_jump="-J";; | |
1295 | no) sim_jump="";; | |
1296 | *) { echo "configure: error: "--enable-sim-jump does not take a value"" 1>&2; exit 1; }; sim_jump="";; | |
1297 | esac | |
1298 | if test x"$silent" != x"yes" && test x"$sim_jump" != x""; then | |
1299 | echo "Setting jump flag = $sim_jump" 6>&1 | |
1300 | fi | |
1301 | else | |
1302 | sim_jump="" | |
1303 | if test x"$silent" != x"yes"; then | |
1304 | echo "Setting jump flag = $sim_jump" 6>&1 | |
1305 | fi | |
1306 | fi | |
1307 | ||
1308 | ||
1309 | # Check whether --enable-sim-line-nr or --disable-sim-line-nr was given. | |
1310 | if test "${enable_sim_line_nr+set}" = set; then | |
1311 | enableval="$enable_sim_line_nr" | |
1312 | case "${enableval}" in | |
1313 | yes) sim_line_nr="";; | |
1314 | no) sim_line_nr="-L";; | |
1315 | *) { echo "configure: error: "--enable-sim-line-nr does not take a value"" 1>&2; exit 1; }; sim_line_nr="";; | |
1316 | esac | |
1317 | if test x"$silent" != x"yes" && test x"$sim_line_nr" != x""; then | |
1318 | echo "Setting warning flags = $sim_line_nr" 6>&1 | |
1319 | fi | |
1320 | else | |
1321 | sim_line_nr="" | |
1322 | fi | |
1323 | ||
1324 | ||
1325 | # Check whether --enable-sim-model or --disable-sim-model was given. | |
1326 | if test "${enable_sim_model+set}" = set; then | |
1327 | enableval="$enable_sim_model" | |
1328 | case "${enableval}" in | |
1329 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-model=model"" 1>&2; exit 1; };; | |
1330 | *) sim_model="-DWITH_MODEL=${enableval}";; | |
1331 | esac | |
1332 | if test x"$silent" != x"yes" && test x"$sim_model" != x""; then | |
1333 | echo "Setting model flags = $sim_model" 6>&1 | |
1334 | fi | |
1335 | else | |
1336 | sim_model="" | |
1337 | fi | |
1338 | ||
1339 | ||
1340 | # Check whether --enable-sim-model-issue or --disable-sim-model-issue was given. | |
1341 | if test "${enable_sim_model_issue+set}" = set; then | |
1342 | enableval="$enable_sim_model_issue" | |
1343 | case "${enableval}" in | |
1344 | yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";; | |
1345 | no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";; | |
1346 | *) { echo "configure: error: "--enable-sim-model-issue does not take a value"" 1>&2; exit 1; }; sim_model_issue="";; | |
1347 | esac | |
1348 | if test x"$silent" != x"yes"; then | |
1349 | echo "Setting model-issue flags = $sim_model_issue" 6>&1 | |
1350 | fi | |
1351 | else | |
1352 | sim_model_issue="" | |
1353 | fi | |
1354 | ||
1355 | ||
1356 | # Check whether --enable-sim-monitor or --disable-sim-monitor was given. | |
1357 | if test "${enable_sim_monitor+set}" = set; then | |
1358 | enableval="$enable_sim_monitor" | |
1359 | case "${enableval}" in | |
1360 | yes) sim_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";; | |
1361 | no) sim_monitor="-DWITH_MON=0";; | |
1362 | instruction) sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";; | |
1363 | memory) sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";; | |
1364 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-mon"" 1>&2; exit 1; }; sim_env="";; | |
1365 | esac | |
1366 | if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then | |
1367 | echo "Setting monitor flags = $sim_monitor" 6>&1 | |
1368 | fi | |
1369 | else | |
1370 | sim_monitor="" | |
1371 | fi | |
1372 | ||
1373 | ||
1374 | # Check whether --enable-sim-opcode or --disable-sim-opcode was given. | |
1375 | if test "${enable_sim_opcode+set}" = set; then | |
1376 | enableval="$enable_sim_opcode" | |
1377 | case "${enableval}" in | |
1378 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-opcode=file"" 1>&2; exit 1; };; | |
1379 | *) if test -f "${srcdir}/${enableval}"; then | |
1380 | sim_opcode="${enableval}" | |
1381 | elif test -f "${srcdir}/ppc-opcode-${enableval}"; then | |
1382 | sim_opcode="ppc-opcode-${enableval}" | |
1383 | else | |
1384 | { echo "configure: error: "File $enableval is not an opcode rules file"" 1>&2; exit 1; }; | |
1385 | sim_opcode="ppc-opcode-complex" | |
1386 | fi;; | |
1387 | esac | |
1388 | if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then | |
1389 | echo "Setting opcode flags = $sim_opcode" 6>&1 | |
1390 | fi | |
1391 | else | |
1392 | sim_opcode="ppc-opcode-complex" | |
1393 | if test x"$silent" != x"yes"; then | |
1394 | echo "Setting opcode flags = $sim_opcode" | |
1395 | fi | |
1396 | fi | |
1397 | ||
1398 | ||
1399 | # Check whether --enable-sim-packages or --disable-sim-packages was given. | |
1400 | if test "${enable_sim_packages+set}" = set; then | |
1401 | enableval="$enable_sim_packages" | |
1402 | packages=disklabel | |
1403 | case "${enableval}" in | |
1404 | yes) ;; | |
1405 | no) { echo "configure: error: "List of packages must be specified for --enable-sim-packages"" 1>&2; exit 1; }; packages="";; | |
1406 | ,*) packages="${packages}${enableval}";; | |
1407 | *,) packages="${enableval}${packages}";; | |
1408 | *) packages="${enableval}"'';; | |
1409 | esac | |
1410 | sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` | |
1411 | sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` | |
1412 | if test x"$silent" != x"yes" && test x"$packages" != x""; then | |
1413 | echo "Setting packages to $sim_pk_src, $sim_pk_obj" | |
1414 | fi | |
1415 | else | |
1416 | packages=disklabel | |
1417 | sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` | |
1418 | sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` | |
1419 | if test x"$silent" != x"yes"; then | |
1420 | echo "Setting packages to $sim_pk_src, $sim_pk_obj" | |
1421 | fi | |
1422 | fi | |
1423 | ||
1424 | ||
1425 | # Check whether --enable-sim-regparm or --disable-sim-regparm was given. | |
1426 | if test "${enable_sim_regparm+set}" = set; then | |
1427 | enableval="$enable_sim_regparm" | |
1428 | case "${enableval}" in | |
1429 | 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";; | |
1430 | no) sim_regparm="" ;; | |
1431 | yes) sim_regparm="-DWITH_REGPARM=3";; | |
1432 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-regparm"" 1>&2; exit 1; }; sim_regparm="";; | |
1433 | esac | |
1434 | if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then | |
1435 | echo "Setting regparm flags = $sim_regparm" 6>&1 | |
1436 | fi | |
1437 | else | |
1438 | sim_regparm="" | |
1439 | fi | |
1440 | ||
1441 | ||
1442 | # Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given. | |
1443 | if test "${enable_sim_reserved_bits+set}" = set; then | |
1444 | enableval="$enable_sim_reserved_bits" | |
1445 | case "${enableval}" in | |
1446 | yes) sim_reserved="-DWITH_RESERVED_BITS=1";; | |
1447 | no) sim_reserved="-DWITH_RESERVED_BITS=0";; | |
1448 | *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved="";; | |
1449 | esac | |
1450 | if test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then | |
1451 | echo "Setting reserved flags = $sim_reserved" 6>&1 | |
1452 | fi | |
1453 | else | |
1454 | sim_reserved="" | |
1455 | fi | |
1456 | ||
1457 | ||
c494cadd | 1458 | # Check whether --enable-sim-smp or --disable-sim-smp was given. |
1f1e5dd8 MM |
1459 | if test "${enable_sim_smp+set}" = set; then |
1460 | enableval="$enable_sim_smp" | |
c494cadd | 1461 | case "${enableval}" in |
30c87b55 MM |
1462 | yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";; |
1463 | no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";; | |
1464 | *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";; | |
c494cadd | 1465 | esac |
2bc7869d | 1466 | if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then |
ba62bb1c MM |
1467 | echo "Setting smp flags = $sim_smp" 6>&1 |
1468 | fi | |
c494cadd | 1469 | else |
30c87b55 | 1470 | sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5" |
2bc7869d MM |
1471 | if test x"$silent" != x"yes"; then |
1472 | echo "Setting smp flags = $sim_smp" 6>&1 | |
1473 | fi | |
c494cadd MM |
1474 | fi |
1475 | ||
f2181eff | 1476 | |
5c04f4f7 MM |
1477 | # Check whether --enable-sim-stdcall or --disable-sim-stdcall was given. |
1478 | if test "${enable_sim_stdcall+set}" = set; then | |
1479 | enableval="$enable_sim_stdcall" | |
c494cadd | 1480 | case "${enableval}" in |
5c04f4f7 MM |
1481 | no) sim_stdcall="" ;; |
1482 | std*) sim_stdcall="-DWITH_STDCALL=1";; | |
1483 | yes) sim_stdcall="-DWITH_STDCALL=1";; | |
1484 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-stdcall"" 1>&2; exit 1; }; sim_stdcall="";; | |
c494cadd | 1485 | esac |
5c04f4f7 MM |
1486 | if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then |
1487 | echo "Setting function call flags = $sim_stdcall" 6>&1 | |
ba62bb1c | 1488 | fi |
c494cadd | 1489 | else |
5c04f4f7 | 1490 | sim_stdcall="" |
c494cadd MM |
1491 | fi |
1492 | ||
5c04f4f7 MM |
1493 | |
1494 | # Check whether --enable-sim-stdio or --disable-sim-stdio was given. | |
1495 | if test "${enable_sim_stdio+set}" = set; then | |
1496 | enableval="$enable_sim_stdio" | |
c494cadd | 1497 | case "${enableval}" in |
5c04f4f7 MM |
1498 | yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; |
1499 | no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; | |
1500 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";; | |
c494cadd | 1501 | esac |
5c04f4f7 MM |
1502 | if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then |
1503 | echo "Setting stdio flags = $sim_stdio" 6>&1 | |
ba62bb1c | 1504 | fi |
c494cadd | 1505 | else |
5c04f4f7 | 1506 | sim_stdio="" |
c494cadd MM |
1507 | fi |
1508 | ||
5c04f4f7 MM |
1509 | |
1510 | # Check whether --enable-sim-switch or --disable-sim-switch was given. | |
1511 | if test "${enable_sim_switch+set}" = set; then | |
1512 | enableval="$enable_sim_switch" | |
c494cadd | 1513 | case "${enableval}" in |
5c04f4f7 MM |
1514 | yes) sim_switch="-s";; |
1515 | no) sim_switch="";; | |
1516 | *) { echo "configure: error: "--enable-sim-switch does not take a value"" 1>&2; exit 1; }; sim_switch="";; | |
c494cadd | 1517 | esac |
5c04f4f7 MM |
1518 | if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then |
1519 | echo "Setting switch flags = $sim_switch" 6>&1 | |
ba62bb1c | 1520 | fi |
c494cadd | 1521 | else |
5c04f4f7 MM |
1522 | sim_switch=""; |
1523 | if test x"$silent" != x"yes"; then | |
1524 | echo "Setting switch flags = $sim_switch" 6>&1 | |
1525 | fi | |
c494cadd MM |
1526 | fi |
1527 | ||
5c04f4f7 | 1528 | |
c494cadd | 1529 | # Check whether --enable-sim-timebase or --disable-sim-timebase was given. |
1f1e5dd8 MM |
1530 | if test "${enable_sim_timebase+set}" = set; then |
1531 | enableval="$enable_sim_timebase" | |
c494cadd MM |
1532 | case "${enableval}" in |
1533 | yes) sim_timebase="-DWITH_TIME_BASE=1";; | |
1534 | no) sim_timebase="-DWITH_TIME_BASE=0";; | |
a3114052 | 1535 | *) { echo "configure: error: "--enable-sim-timebase does not take a value"" 1>&2; exit 1; }; sim_timebase="";; |
c494cadd | 1536 | esac |
2bc7869d | 1537 | if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then |
ba62bb1c MM |
1538 | echo "Setting timebase flags = $sim_timebase" 6>&1 |
1539 | fi | |
c494cadd MM |
1540 | else |
1541 | sim_timebase="" | |
1542 | fi | |
1543 | ||
c494cadd MM |
1544 | |
1545 | # Check whether --enable-sim-trace or --disable-sim-trace was given. | |
1f1e5dd8 MM |
1546 | if test "${enable_sim_trace+set}" = set; then |
1547 | enableval="$enable_sim_trace" | |
c494cadd MM |
1548 | case "${enableval}" in |
1549 | yes) sim_trace="-DWITH_TRACE=1";; | |
1550 | no) sim_trace="-DWITH_TRACE=0";; | |
a3114052 | 1551 | *) { echo "configure: error: "--enable-sim-trace does not take a value"" 1>&2; exit 1; }; sim_trace="";; |
c494cadd | 1552 | esac |
2bc7869d | 1553 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then |
ba62bb1c MM |
1554 | echo "Setting trace flags = $sim_trace" 6>&1 |
1555 | fi | |
c494cadd MM |
1556 | else |
1557 | sim_trace="" | |
1558 | fi | |
1559 | ||
c494cadd | 1560 | |
5c04f4f7 MM |
1561 | # Check whether --enable-sim-warnings or --disable-sim-warnings was given. |
1562 | if test "${enable_sim_warnings+set}" = set; then | |
1563 | enableval="$enable_sim_warnings" | |
73c4941b | 1564 | case "${enableval}" in |
5c04f4f7 MM |
1565 | yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";; |
1566 | no) sim_warnings="-w";; | |
1567 | *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
73c4941b | 1568 | esac |
5c04f4f7 MM |
1569 | if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then |
1570 | echo "Setting warning flags = $sim_warnings" 6>&1 | |
ba62bb1c | 1571 | fi |
73c4941b | 1572 | else |
5c04f4f7 | 1573 | sim_warnings="" |
73c4941b MM |
1574 | fi |
1575 | ||
73c4941b | 1576 | |
5c04f4f7 MM |
1577 | # Check whether --enable-sim-xor-endian or --disable-sim-xor-endian was given. |
1578 | if test "${enable_sim_xor_endian+set}" = set; then | |
1579 | enableval="$enable_sim_xor_endian" | |
f2181eff | 1580 | case "${enableval}" in |
5c04f4f7 MM |
1581 | yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";; |
1582 | no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";; | |
1583 | *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";; | |
f2181eff | 1584 | esac |
5c04f4f7 MM |
1585 | if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then |
1586 | echo "Setting xor-endian flag = $sim_xor_endian" 6>&1 | |
f2181eff MM |
1587 | fi |
1588 | else | |
5c04f4f7 | 1589 | sim_xor_endian="" |
f2181eff MM |
1590 | fi |
1591 | ||
a72d2509 | 1592 | |
4f965b81 MM |
1593 | ac_aux_dir= |
1594 | for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do | |
1595 | if test -f $ac_dir/install-sh; then | |
1596 | ac_aux_dir=$ac_dir | |
1597 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1598 | break | |
1599 | elif test -f $ac_dir/install.sh; then | |
1600 | ac_aux_dir=$ac_dir | |
1601 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1602 | break | |
1603 | fi | |
1604 | done | |
1605 | if test -z "$ac_aux_dir"; then | |
1606 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; } | |
1607 | fi | |
1608 | ac_config_guess=$ac_aux_dir/config.guess | |
1609 | ac_config_sub=$ac_aux_dir/config.sub | |
1610 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1611 | ||
1612 | ||
1613 | # Do some error checking and defaulting for the host and target type. | |
1614 | # The inputs are: | |
1615 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1616 | # | |
1617 | # The rules are: | |
1618 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1f1e5dd8 | 1619 | # same time. |
4f965b81 MM |
1620 | # 2. Host defaults to nonopt. |
1621 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1622 | # as determined by config.guess. | |
1623 | # 4. Target and build default to nonopt. | |
1624 | # 5. If nonopt is not specified, then target and build default to host. | |
1625 | ||
1626 | # The aliases save the names the user supplied, while $host etc. | |
1627 | # will get canonicalized. | |
1628 | case $host---$target---$nonopt in | |
1629 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1630 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1631 | esac | |
1632 | ||
1633 | ||
1634 | # Make sure we can run config.sub. | |
1635 | if $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1636 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1637 | fi | |
1638 | ||
1639 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
5c04f4f7 | 1640 | echo "configure:1641: checking host system type" >&5 |
4f965b81 MM |
1641 | |
1642 | host_alias=$host | |
1643 | case "$host_alias" in | |
1644 | NONE) | |
1645 | case $nonopt in | |
1646 | NONE) | |
1647 | if host_alias=`$ac_config_guess`; then : | |
1648 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1649 | fi ;; | |
1650 | *) host_alias=$nonopt ;; | |
1651 | esac ;; | |
1652 | esac | |
1653 | ||
1654 | host=`$ac_config_sub $host_alias` | |
5c04f4f7 MM |
1655 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1656 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1657 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
4f965b81 MM |
1658 | echo "$ac_t""$host" 1>&6 |
1659 | ||
1660 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
5c04f4f7 | 1661 | echo "configure:1662: checking target system type" >&5 |
4f965b81 MM |
1662 | |
1663 | target_alias=$target | |
1664 | case "$target_alias" in | |
1665 | NONE) | |
1666 | case $nonopt in | |
1667 | NONE) target_alias=$host_alias ;; | |
1668 | *) target_alias=$nonopt ;; | |
1669 | esac ;; | |
1670 | esac | |
1671 | ||
1672 | target=`$ac_config_sub $target_alias` | |
5c04f4f7 MM |
1673 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1674 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1675 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
4f965b81 MM |
1676 | echo "$ac_t""$target" 1>&6 |
1677 | ||
1678 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
5c04f4f7 | 1679 | echo "configure:1680: checking build system type" >&5 |
4f965b81 MM |
1680 | |
1681 | build_alias=$build | |
1682 | case "$build_alias" in | |
1683 | NONE) | |
1684 | case $nonopt in | |
1685 | NONE) build_alias=$host_alias ;; | |
1686 | *) build_alias=$nonopt ;; | |
1687 | esac ;; | |
1688 | esac | |
1689 | ||
1690 | build=`$ac_config_sub $build_alias` | |
5c04f4f7 MM |
1691 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1692 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1693 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
4f965b81 MM |
1694 | echo "$ac_t""$build" 1>&6 |
1695 | ||
1696 | test "$host_alias" != "$target_alias" && | |
1697 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1698 | NONENONEs,x,x, && | |
1699 | program_prefix=${target_alias}- | |
1700 | ||
1701 | if test "$program_transform_name" = s,x,x,; then | |
1702 | program_transform_name= | |
1703 | else | |
1f1e5dd8 MM |
1704 | # Double any \ or $. echo might interpret backslashes. |
1705 | cat <<\EOF_SED > conftestsed | |
1706 | s,\\,\\\\,g; s,\$,$$,g | |
1707 | EOF_SED | |
4f965b81 MM |
1708 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
1709 | rm -f conftestsed | |
1710 | fi | |
1711 | test "$program_prefix" != NONE && | |
1712 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1713 | # Use a double $ so make ignores it. | |
1714 | test "$program_suffix" != NONE && | |
1715 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1716 | ||
1717 | # sed with no file args requires a program. | |
1718 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1719 | ||
1720 | ||
1721 | . ${srcdir}/../../bfd/configure.host | |
a72d2509 | 1722 | |
c494cadd MM |
1723 | |
1724 | ||
0c18e3f0 | 1725 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
5c04f4f7 | 1726 | echo "configure:1727: checking for st_blksize in struct stat" >&5 |
0c18e3f0 MM |
1727 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
1728 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1729 | else | |
1730 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1731 | #line 1732 "configure" |
0c18e3f0 MM |
1732 | #include "confdefs.h" |
1733 | #include <sys/types.h> | |
1734 | #include <sys/stat.h> | |
5c04f4f7 | 1735 | int main() { |
0c18e3f0 MM |
1736 | struct stat s; s.st_blksize; |
1737 | ; return 0; } | |
1738 | EOF | |
5c04f4f7 | 1739 | if { (eval echo configure:1740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
1740 | rm -rf conftest* |
1741 | ac_cv_struct_st_blksize=yes | |
1742 | else | |
5c04f4f7 MM |
1743 | echo "configure: failed program was:" >&5 |
1744 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
1745 | rm -rf conftest* |
1746 | ac_cv_struct_st_blksize=no | |
1747 | fi | |
1748 | rm -f conftest* | |
0c18e3f0 MM |
1749 | fi |
1750 | ||
1751 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 | |
1752 | if test $ac_cv_struct_st_blksize = yes; then | |
1753 | cat >> confdefs.h <<\EOF | |
1754 | #define HAVE_ST_BLKSIZE 1 | |
1755 | EOF | |
1756 | ||
1757 | fi | |
1758 | ||
1759 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 | |
5c04f4f7 | 1760 | echo "configure:1761: checking for st_blocks in struct stat" >&5 |
0c18e3f0 MM |
1761 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
1762 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1763 | else | |
1764 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1765 | #line 1766 "configure" |
0c18e3f0 MM |
1766 | #include "confdefs.h" |
1767 | #include <sys/types.h> | |
1768 | #include <sys/stat.h> | |
5c04f4f7 | 1769 | int main() { |
0c18e3f0 MM |
1770 | struct stat s; s.st_blocks; |
1771 | ; return 0; } | |
1772 | EOF | |
5c04f4f7 | 1773 | if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
1774 | rm -rf conftest* |
1775 | ac_cv_struct_st_blocks=yes | |
1776 | else | |
5c04f4f7 MM |
1777 | echo "configure: failed program was:" >&5 |
1778 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
1779 | rm -rf conftest* |
1780 | ac_cv_struct_st_blocks=no | |
1781 | fi | |
1782 | rm -f conftest* | |
0c18e3f0 MM |
1783 | fi |
1784 | ||
1785 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 | |
1786 | if test $ac_cv_struct_st_blocks = yes; then | |
1787 | cat >> confdefs.h <<\EOF | |
1788 | #define HAVE_ST_BLOCKS 1 | |
1789 | EOF | |
1790 | ||
1791 | else | |
1792 | LIBOBJS="$LIBOBJS fileblocks.o" | |
1793 | fi | |
1794 | ||
1795 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 | |
5c04f4f7 | 1796 | echo "configure:1797: checking for st_rdev in struct stat" >&5 |
0c18e3f0 MM |
1797 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
1798 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1799 | else | |
1800 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1801 | #line 1802 "configure" |
0c18e3f0 MM |
1802 | #include "confdefs.h" |
1803 | #include <sys/types.h> | |
1804 | #include <sys/stat.h> | |
5c04f4f7 | 1805 | int main() { |
0c18e3f0 MM |
1806 | struct stat s; s.st_rdev; |
1807 | ; return 0; } | |
1808 | EOF | |
5c04f4f7 | 1809 | if { (eval echo configure:1810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
1810 | rm -rf conftest* |
1811 | ac_cv_struct_st_rdev=yes | |
1812 | else | |
5c04f4f7 MM |
1813 | echo "configure: failed program was:" >&5 |
1814 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
1815 | rm -rf conftest* |
1816 | ac_cv_struct_st_rdev=no | |
1817 | fi | |
1818 | rm -f conftest* | |
0c18e3f0 MM |
1819 | fi |
1820 | ||
1821 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 | |
1822 | if test $ac_cv_struct_st_rdev = yes; then | |
1823 | cat >> confdefs.h <<\EOF | |
1824 | #define HAVE_ST_RDEV 1 | |
1825 | EOF | |
1826 | ||
1827 | fi | |
1828 | ||
1829 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 | |
5c04f4f7 | 1830 | echo "configure:1831: checking whether struct tm is in sys/time.h or time.h" >&5 |
0c18e3f0 MM |
1831 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
1832 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1833 | else | |
1834 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1835 | #line 1836 "configure" |
0c18e3f0 MM |
1836 | #include "confdefs.h" |
1837 | #include <sys/types.h> | |
1838 | #include <time.h> | |
5c04f4f7 | 1839 | int main() { |
0c18e3f0 MM |
1840 | struct tm *tp; tp->tm_sec; |
1841 | ; return 0; } | |
1842 | EOF | |
5c04f4f7 | 1843 | if { (eval echo configure:1844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
1844 | rm -rf conftest* |
1845 | ac_cv_struct_tm=time.h | |
1846 | else | |
5c04f4f7 MM |
1847 | echo "configure: failed program was:" >&5 |
1848 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
1849 | rm -rf conftest* |
1850 | ac_cv_struct_tm=sys/time.h | |
1851 | fi | |
1852 | rm -f conftest* | |
0c18e3f0 MM |
1853 | fi |
1854 | ||
1855 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 | |
1856 | if test $ac_cv_struct_tm = sys/time.h; then | |
1857 | cat >> confdefs.h <<\EOF | |
1858 | #define TM_IN_SYS_TIME 1 | |
1859 | EOF | |
1860 | ||
1861 | fi | |
1862 | ||
1863 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 | |
5c04f4f7 | 1864 | echo "configure:1865: checking for tm_zone in struct tm" >&5 |
0c18e3f0 MM |
1865 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
1866 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1867 | else | |
1868 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1869 | #line 1870 "configure" |
0c18e3f0 MM |
1870 | #include "confdefs.h" |
1871 | #include <sys/types.h> | |
1872 | #include <$ac_cv_struct_tm> | |
5c04f4f7 | 1873 | int main() { |
0c18e3f0 MM |
1874 | struct tm tm; tm.tm_zone; |
1875 | ; return 0; } | |
1876 | EOF | |
5c04f4f7 | 1877 | if { (eval echo configure:1878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
1878 | rm -rf conftest* |
1879 | ac_cv_struct_tm_zone=yes | |
1880 | else | |
5c04f4f7 MM |
1881 | echo "configure: failed program was:" >&5 |
1882 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
1883 | rm -rf conftest* |
1884 | ac_cv_struct_tm_zone=no | |
1885 | fi | |
1886 | rm -f conftest* | |
0c18e3f0 MM |
1887 | fi |
1888 | ||
1889 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 | |
1890 | if test "$ac_cv_struct_tm_zone" = yes; then | |
1891 | cat >> confdefs.h <<\EOF | |
1892 | #define HAVE_TM_ZONE 1 | |
1893 | EOF | |
1894 | ||
1895 | else | |
1896 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 | |
5c04f4f7 | 1897 | echo "configure:1898: checking for tzname" >&5 |
0c18e3f0 MM |
1898 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
1899 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1900 | else | |
1901 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1902 | #line 1903 "configure" |
0c18e3f0 MM |
1903 | #include "confdefs.h" |
1904 | #include <time.h> | |
1905 | #ifndef tzname /* For SGI. */ | |
1906 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ | |
1907 | #endif | |
5c04f4f7 | 1908 | int main() { |
0c18e3f0 MM |
1909 | atoi(*tzname); |
1910 | ; return 0; } | |
1911 | EOF | |
5c04f4f7 | 1912 | if { (eval echo configure:1913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
0c18e3f0 MM |
1913 | rm -rf conftest* |
1914 | ac_cv_var_tzname=yes | |
1915 | else | |
5c04f4f7 MM |
1916 | echo "configure: failed program was:" >&5 |
1917 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
1918 | rm -rf conftest* |
1919 | ac_cv_var_tzname=no | |
1920 | fi | |
1921 | rm -f conftest* | |
0c18e3f0 MM |
1922 | fi |
1923 | ||
1924 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 | |
1925 | if test $ac_cv_var_tzname = yes; then | |
1926 | cat >> confdefs.h <<\EOF | |
1927 | #define HAVE_TZNAME 1 | |
1928 | EOF | |
1929 | ||
1930 | fi | |
1931 | fi | |
1932 | ||
1933 | ||
4b935ed4 | 1934 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
5c04f4f7 | 1935 | echo "configure:1936: checking how to run the C preprocessor" >&5 |
4b935ed4 MM |
1936 | # On Suns, sometimes $CPP names a directory. |
1937 | if test -n "$CPP" && test -d "$CPP"; then | |
1938 | CPP= | |
1939 | fi | |
1940 | if test -z "$CPP"; then | |
1941 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1943 | else | |
1944 | # This must be in double quotes, not single quotes, because CPP may get | |
1945 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1946 | CPP="${CC-cc} -E" | |
1947 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1948 | # not just through cpp. | |
1949 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1950 | #line 1951 "configure" |
4b935ed4 MM |
1951 | #include "confdefs.h" |
1952 | #include <assert.h> | |
1953 | Syntax Error | |
1954 | EOF | |
a72d2509 | 1955 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5c04f4f7 | 1956 | { (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b935ed4 MM |
1957 | ac_err=`grep -v '^ *+' conftest.out` |
1958 | if test -z "$ac_err"; then | |
1959 | : | |
1960 | else | |
1961 | echo "$ac_err" >&5 | |
5c04f4f7 MM |
1962 | echo "configure: failed program was:" >&5 |
1963 | cat conftest.$ac_ext >&5 | |
4b935ed4 MM |
1964 | rm -rf conftest* |
1965 | CPP="${CC-cc} -E -traditional-cpp" | |
1966 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 1967 | #line 1968 "configure" |
4b935ed4 MM |
1968 | #include "confdefs.h" |
1969 | #include <assert.h> | |
1970 | Syntax Error | |
1971 | EOF | |
a72d2509 | 1972 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5c04f4f7 | 1973 | { (eval echo configure:1974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b935ed4 MM |
1974 | ac_err=`grep -v '^ *+' conftest.out` |
1975 | if test -z "$ac_err"; then | |
1976 | : | |
1977 | else | |
1978 | echo "$ac_err" >&5 | |
5c04f4f7 MM |
1979 | echo "configure: failed program was:" >&5 |
1980 | cat conftest.$ac_ext >&5 | |
4b935ed4 MM |
1981 | rm -rf conftest* |
1982 | CPP=/lib/cpp | |
1983 | fi | |
1984 | rm -f conftest* | |
1985 | fi | |
1986 | rm -f conftest* | |
1987 | ac_cv_prog_CPP="$CPP" | |
1988 | fi | |
1989 | CPP="$ac_cv_prog_CPP" | |
1990 | else | |
1991 | ac_cv_prog_CPP="$CPP" | |
1992 | fi | |
1993 | echo "$ac_t""$CPP" 1>&6 | |
1994 | ||
78c09e4a | 1995 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
5c04f4f7 | 1996 | echo "configure:1997: checking for uid_t in sys/types.h" >&5 |
78c09e4a JM |
1997 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
1998 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1999 | else | |
2000 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2001 | #line 2002 "configure" |
78c09e4a JM |
2002 | #include "confdefs.h" |
2003 | #include <sys/types.h> | |
2004 | EOF | |
2005 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2006 | egrep "uid_t" >/dev/null 2>&1; then | |
2007 | rm -rf conftest* | |
2008 | ac_cv_type_uid_t=yes | |
2009 | else | |
2010 | rm -rf conftest* | |
2011 | ac_cv_type_uid_t=no | |
2012 | fi | |
2013 | rm -f conftest* | |
2014 | ||
2015 | fi | |
2016 | ||
2017 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
2018 | if test $ac_cv_type_uid_t = no; then | |
2019 | cat >> confdefs.h <<\EOF | |
2020 | #define uid_t int | |
2021 | EOF | |
2022 | ||
2023 | cat >> confdefs.h <<\EOF | |
2024 | #define gid_t int | |
2025 | EOF | |
2026 | ||
2027 | fi | |
2028 | ||
2029 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
5c04f4f7 | 2030 | echo "configure:2031: checking type of array argument to getgroups" >&5 |
78c09e4a JM |
2031 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
2032 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2033 | else | |
2034 | if test "$cross_compiling" = yes; then | |
2035 | ac_cv_type_getgroups=cross | |
2036 | else | |
5c04f4f7 MM |
2037 | cat > conftest.$ac_ext <<EOF |
2038 | #line 2039 "configure" | |
78c09e4a JM |
2039 | #include "confdefs.h" |
2040 | ||
2041 | /* Thanks to Mike Rendell for this test. */ | |
2042 | #include <sys/types.h> | |
2043 | #define NGID 256 | |
2044 | #undef MAX | |
2045 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
2046 | main() | |
2047 | { | |
2048 | gid_t gidset[NGID]; | |
2049 | int i, n; | |
2050 | union { gid_t gval; long lval; } val; | |
2051 | ||
2052 | val.lval = -1; | |
2053 | for (i = 0; i < NGID; i++) | |
2054 | gidset[i] = val.gval; | |
2055 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
2056 | gidset); | |
2057 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
2058 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
2059 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
2060 | } | |
2061 | ||
2062 | EOF | |
5c04f4f7 MM |
2063 | if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
2064 | then | |
78c09e4a JM |
2065 | ac_cv_type_getgroups=gid_t |
2066 | else | |
5c04f4f7 MM |
2067 | echo "configure: failed program was:" >&5 |
2068 | cat conftest.$ac_ext >&5 | |
2069 | rm -fr conftest* | |
78c09e4a JM |
2070 | ac_cv_type_getgroups=int |
2071 | fi | |
78c09e4a | 2072 | rm -fr conftest* |
5c04f4f7 MM |
2073 | fi |
2074 | ||
78c09e4a JM |
2075 | if test $ac_cv_type_getgroups = cross; then |
2076 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2077 | #line 2078 "configure" |
78c09e4a JM |
2078 | #include "confdefs.h" |
2079 | #include <unistd.h> | |
2080 | EOF | |
2081 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2082 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
2083 | rm -rf conftest* | |
2084 | ac_cv_type_getgroups=gid_t | |
2085 | else | |
2086 | rm -rf conftest* | |
2087 | ac_cv_type_getgroups=int | |
2088 | fi | |
2089 | rm -f conftest* | |
2090 | ||
2091 | fi | |
2092 | fi | |
2093 | ||
2094 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
2095 | cat >> confdefs.h <<EOF | |
2096 | #define GETGROUPS_T $ac_cv_type_getgroups | |
2097 | EOF | |
2098 | ||
2099 | ||
2100 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
5c04f4f7 | 2101 | echo "configure:2102: checking for ANSI C header files" >&5 |
78c09e4a JM |
2102 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2103 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2104 | else | |
2105 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2106 | #line 2107 "configure" |
78c09e4a JM |
2107 | #include "confdefs.h" |
2108 | #include <stdlib.h> | |
2109 | #include <stdarg.h> | |
2110 | #include <string.h> | |
2111 | #include <float.h> | |
2112 | EOF | |
2113 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5c04f4f7 | 2114 | { (eval echo configure:2115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
78c09e4a JM |
2115 | ac_err=`grep -v '^ *+' conftest.out` |
2116 | if test -z "$ac_err"; then | |
2117 | rm -rf conftest* | |
2118 | ac_cv_header_stdc=yes | |
2119 | else | |
2120 | echo "$ac_err" >&5 | |
5c04f4f7 MM |
2121 | echo "configure: failed program was:" >&5 |
2122 | cat conftest.$ac_ext >&5 | |
78c09e4a JM |
2123 | rm -rf conftest* |
2124 | ac_cv_header_stdc=no | |
2125 | fi | |
2126 | rm -f conftest* | |
2127 | ||
2128 | if test $ac_cv_header_stdc = yes; then | |
2129 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2130 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2131 | #line 2132 "configure" |
78c09e4a JM |
2132 | #include "confdefs.h" |
2133 | #include <string.h> | |
2134 | EOF | |
2135 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2136 | egrep "memchr" >/dev/null 2>&1; then | |
2137 | : | |
2138 | else | |
2139 | rm -rf conftest* | |
2140 | ac_cv_header_stdc=no | |
2141 | fi | |
2142 | rm -f conftest* | |
2143 | ||
2144 | fi | |
2145 | ||
2146 | if test $ac_cv_header_stdc = yes; then | |
2147 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2148 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2149 | #line 2150 "configure" |
78c09e4a JM |
2150 | #include "confdefs.h" |
2151 | #include <stdlib.h> | |
2152 | EOF | |
2153 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2154 | egrep "free" >/dev/null 2>&1; then | |
2155 | : | |
2156 | else | |
2157 | rm -rf conftest* | |
2158 | ac_cv_header_stdc=no | |
2159 | fi | |
2160 | rm -f conftest* | |
2161 | ||
2162 | fi | |
2163 | ||
2164 | if test $ac_cv_header_stdc = yes; then | |
2165 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2166 | if test "$cross_compiling" = yes; then | |
2167 | : | |
2168 | else | |
5c04f4f7 MM |
2169 | cat > conftest.$ac_ext <<EOF |
2170 | #line 2171 "configure" | |
78c09e4a JM |
2171 | #include "confdefs.h" |
2172 | #include <ctype.h> | |
2173 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2174 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2175 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2176 | int main () { int i; for (i = 0; i < 256; i++) | |
2177 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2178 | exit (0); } | |
2179 | ||
2180 | EOF | |
5c04f4f7 MM |
2181 | if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
2182 | then | |
78c09e4a JM |
2183 | : |
2184 | else | |
5c04f4f7 MM |
2185 | echo "configure: failed program was:" >&5 |
2186 | cat conftest.$ac_ext >&5 | |
2187 | rm -fr conftest* | |
78c09e4a JM |
2188 | ac_cv_header_stdc=no |
2189 | fi | |
78c09e4a | 2190 | rm -fr conftest* |
5c04f4f7 MM |
2191 | fi |
2192 | ||
78c09e4a JM |
2193 | fi |
2194 | fi | |
2195 | ||
2196 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2197 | if test $ac_cv_header_stdc = yes; then | |
2198 | cat >> confdefs.h <<\EOF | |
2199 | #define STDC_HEADERS 1 | |
2200 | EOF | |
2201 | ||
2202 | fi | |
2203 | ||
2204 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 | |
5c04f4f7 | 2205 | echo "configure:2206: checking for mode_t" >&5 |
78c09e4a JM |
2206 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
2207 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2208 | else | |
2209 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2210 | #line 2211 "configure" |
78c09e4a JM |
2211 | #include "confdefs.h" |
2212 | #include <sys/types.h> | |
2213 | #if STDC_HEADERS | |
2214 | #include <stdlib.h> | |
5c04f4f7 | 2215 | #include <stddef.h> |
78c09e4a JM |
2216 | #endif |
2217 | EOF | |
2218 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 2219 | egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
2220 | rm -rf conftest* |
2221 | ac_cv_type_mode_t=yes | |
2222 | else | |
2223 | rm -rf conftest* | |
2224 | ac_cv_type_mode_t=no | |
2225 | fi | |
2226 | rm -f conftest* | |
2227 | ||
2228 | fi | |
2229 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 | |
2230 | if test $ac_cv_type_mode_t = no; then | |
2231 | cat >> confdefs.h <<\EOF | |
2232 | #define mode_t int | |
2233 | EOF | |
2234 | ||
2235 | fi | |
2236 | ||
2237 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
5c04f4f7 | 2238 | echo "configure:2239: checking for off_t" >&5 |
78c09e4a JM |
2239 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
2240 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2241 | else | |
2242 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2243 | #line 2244 "configure" |
78c09e4a JM |
2244 | #include "confdefs.h" |
2245 | #include <sys/types.h> | |
2246 | #if STDC_HEADERS | |
2247 | #include <stdlib.h> | |
5c04f4f7 | 2248 | #include <stddef.h> |
78c09e4a JM |
2249 | #endif |
2250 | EOF | |
2251 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 2252 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
2253 | rm -rf conftest* |
2254 | ac_cv_type_off_t=yes | |
2255 | else | |
2256 | rm -rf conftest* | |
2257 | ac_cv_type_off_t=no | |
2258 | fi | |
2259 | rm -f conftest* | |
2260 | ||
2261 | fi | |
2262 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
2263 | if test $ac_cv_type_off_t = no; then | |
2264 | cat >> confdefs.h <<\EOF | |
2265 | #define off_t long | |
2266 | EOF | |
2267 | ||
2268 | fi | |
2269 | ||
2270 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 | |
5c04f4f7 | 2271 | echo "configure:2272: checking for pid_t" >&5 |
78c09e4a JM |
2272 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
2273 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2274 | else | |
2275 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2276 | #line 2277 "configure" |
78c09e4a JM |
2277 | #include "confdefs.h" |
2278 | #include <sys/types.h> | |
2279 | #if STDC_HEADERS | |
2280 | #include <stdlib.h> | |
5c04f4f7 | 2281 | #include <stddef.h> |
78c09e4a JM |
2282 | #endif |
2283 | EOF | |
2284 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 2285 | egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
2286 | rm -rf conftest* |
2287 | ac_cv_type_pid_t=yes | |
2288 | else | |
2289 | rm -rf conftest* | |
2290 | ac_cv_type_pid_t=no | |
2291 | fi | |
2292 | rm -f conftest* | |
2293 | ||
2294 | fi | |
2295 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
2296 | if test $ac_cv_type_pid_t = no; then | |
2297 | cat >> confdefs.h <<\EOF | |
2298 | #define pid_t int | |
2299 | EOF | |
2300 | ||
2301 | fi | |
2302 | ||
2303 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
5c04f4f7 | 2304 | echo "configure:2305: checking return type of signal handlers" >&5 |
78c09e4a JM |
2305 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
2306 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2307 | else | |
2308 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2309 | #line 2310 "configure" |
78c09e4a JM |
2310 | #include "confdefs.h" |
2311 | #include <sys/types.h> | |
2312 | #include <signal.h> | |
2313 | #ifdef signal | |
2314 | #undef signal | |
2315 | #endif | |
2316 | #ifdef __cplusplus | |
2317 | extern "C" void (*signal (int, void (*)(int)))(int); | |
2318 | #else | |
2319 | void (*signal ()) (); | |
2320 | #endif | |
2321 | ||
5c04f4f7 | 2322 | int main() { |
78c09e4a JM |
2323 | int i; |
2324 | ; return 0; } | |
2325 | EOF | |
5c04f4f7 | 2326 | if { (eval echo configure:2327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
78c09e4a JM |
2327 | rm -rf conftest* |
2328 | ac_cv_type_signal=void | |
2329 | else | |
5c04f4f7 MM |
2330 | echo "configure: failed program was:" >&5 |
2331 | cat conftest.$ac_ext >&5 | |
78c09e4a JM |
2332 | rm -rf conftest* |
2333 | ac_cv_type_signal=int | |
2334 | fi | |
2335 | rm -f conftest* | |
78c09e4a JM |
2336 | fi |
2337 | ||
2338 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
2339 | cat >> confdefs.h <<EOF | |
2340 | #define RETSIGTYPE $ac_cv_type_signal | |
2341 | EOF | |
2342 | ||
2343 | ||
2344 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
5c04f4f7 | 2345 | echo "configure:2346: checking for size_t" >&5 |
78c09e4a JM |
2346 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
2347 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2348 | else | |
2349 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2350 | #line 2351 "configure" |
78c09e4a JM |
2351 | #include "confdefs.h" |
2352 | #include <sys/types.h> | |
2353 | #if STDC_HEADERS | |
2354 | #include <stdlib.h> | |
5c04f4f7 | 2355 | #include <stddef.h> |
78c09e4a JM |
2356 | #endif |
2357 | EOF | |
2358 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 2359 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
2360 | rm -rf conftest* |
2361 | ac_cv_type_size_t=yes | |
2362 | else | |
2363 | rm -rf conftest* | |
2364 | ac_cv_type_size_t=no | |
2365 | fi | |
2366 | rm -f conftest* | |
2367 | ||
2368 | fi | |
2369 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
2370 | if test $ac_cv_type_size_t = no; then | |
2371 | cat >> confdefs.h <<\EOF | |
2372 | #define size_t unsigned | |
2373 | EOF | |
2374 | ||
2375 | fi | |
2376 | ||
2377 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
5c04f4f7 | 2378 | echo "configure:2379: checking for uid_t in sys/types.h" >&5 |
78c09e4a JM |
2379 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
2380 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2381 | else | |
2382 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2383 | #line 2384 "configure" |
78c09e4a JM |
2384 | #include "confdefs.h" |
2385 | #include <sys/types.h> | |
2386 | EOF | |
2387 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2388 | egrep "uid_t" >/dev/null 2>&1; then | |
2389 | rm -rf conftest* | |
2390 | ac_cv_type_uid_t=yes | |
2391 | else | |
2392 | rm -rf conftest* | |
2393 | ac_cv_type_uid_t=no | |
2394 | fi | |
2395 | rm -f conftest* | |
2396 | ||
2397 | fi | |
2398 | ||
2399 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
2400 | if test $ac_cv_type_uid_t = no; then | |
2401 | cat >> confdefs.h <<\EOF | |
2402 | #define uid_t int | |
2403 | EOF | |
2404 | ||
2405 | cat >> confdefs.h <<\EOF | |
2406 | #define gid_t int | |
2407 | EOF | |
2408 | ||
2409 | fi | |
2410 | ||
2411 | ||
5c04f4f7 | 2412 | for ac_func in access 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 |
78c09e4a JM |
2413 | do |
2414 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5c04f4f7 | 2415 | echo "configure:2416: checking for $ac_func" >&5 |
78c09e4a JM |
2416 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2417 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2418 | else | |
2419 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2420 | #line 2421 "configure" |
78c09e4a JM |
2421 | #include "confdefs.h" |
2422 | /* System header to define __stub macros and hopefully few prototypes, | |
2423 | which can conflict with char $ac_func(); below. */ | |
2424 | #include <assert.h> | |
2425 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2426 | /* We use char because int might match the return type of a gcc2 | |
2427 | builtin and then its argument prototype would still apply. */ | |
2428 | char $ac_func(); | |
2429 | ||
5c04f4f7 | 2430 | int main() { |
78c09e4a JM |
2431 | |
2432 | /* The GNU C library defines this for functions which it implements | |
2433 | to always fail with ENOSYS. Some functions are actually named | |
2434 | something starting with __ and the normal name is an alias. */ | |
2435 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2436 | choke me | |
2437 | #else | |
2438 | $ac_func(); | |
2439 | #endif | |
2440 | ||
2441 | ; return 0; } | |
2442 | EOF | |
5c04f4f7 | 2443 | if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
78c09e4a JM |
2444 | rm -rf conftest* |
2445 | eval "ac_cv_func_$ac_func=yes" | |
2446 | else | |
5c04f4f7 MM |
2447 | echo "configure: failed program was:" >&5 |
2448 | cat conftest.$ac_ext >&5 | |
78c09e4a JM |
2449 | rm -rf conftest* |
2450 | eval "ac_cv_func_$ac_func=no" | |
2451 | fi | |
2452 | rm -f conftest* | |
78c09e4a | 2453 | fi |
5c04f4f7 | 2454 | |
78c09e4a JM |
2455 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2456 | echo "$ac_t""yes" 1>&6 | |
2457 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2458 | cat >> confdefs.h <<EOF | |
2459 | #define $ac_tr_func 1 | |
2460 | EOF | |
2461 | ||
2462 | else | |
2463 | echo "$ac_t""no" 1>&6 | |
2464 | fi | |
2465 | done | |
2466 | ||
2467 | ||
88f1eac4 | 2468 | for 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 | 2469 | do |
5c04f4f7 | 2470 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
4b935ed4 | 2471 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
5c04f4f7 | 2472 | echo "configure:2473: checking for $ac_hdr" >&5 |
4b935ed4 MM |
2473 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2475 | else | |
2476 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2477 | #line 2478 "configure" |
4b935ed4 MM |
2478 | #include "confdefs.h" |
2479 | #include <$ac_hdr> | |
2480 | EOF | |
a72d2509 | 2481 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5c04f4f7 | 2482 | { (eval echo configure:2483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b935ed4 MM |
2483 | ac_err=`grep -v '^ *+' conftest.out` |
2484 | if test -z "$ac_err"; then | |
2485 | rm -rf conftest* | |
2486 | eval "ac_cv_header_$ac_safe=yes" | |
2487 | else | |
2488 | echo "$ac_err" >&5 | |
5c04f4f7 MM |
2489 | echo "configure: failed program was:" >&5 |
2490 | cat conftest.$ac_ext >&5 | |
4b935ed4 MM |
2491 | rm -rf conftest* |
2492 | eval "ac_cv_header_$ac_safe=no" | |
2493 | fi | |
2494 | rm -f conftest* | |
2495 | fi | |
2496 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2497 | echo "$ac_t""yes" 1>&6 | |
5c04f4f7 | 2498 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4b935ed4 MM |
2499 | cat >> confdefs.h <<EOF |
2500 | #define $ac_tr_hdr 1 | |
2501 | EOF | |
2502 | ||
2503 | else | |
2504 | echo "$ac_t""no" 1>&6 | |
2505 | fi | |
2506 | done | |
2507 | ||
7393a6f0 MM |
2508 | ac_header_dirent=no |
2509 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
2510 | do | |
5c04f4f7 | 2511 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
7393a6f0 | 2512 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
5c04f4f7 | 2513 | echo "configure:2514: checking for $ac_hdr that defines DIR" >&5 |
7393a6f0 MM |
2514 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
2515 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2516 | else | |
2517 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2518 | #line 2519 "configure" |
7393a6f0 MM |
2519 | #include "confdefs.h" |
2520 | #include <sys/types.h> | |
2521 | #include <$ac_hdr> | |
5c04f4f7 | 2522 | int main() { |
7393a6f0 MM |
2523 | DIR *dirp = 0; |
2524 | ; return 0; } | |
2525 | EOF | |
5c04f4f7 | 2526 | if { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7393a6f0 MM |
2527 | rm -rf conftest* |
2528 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
2529 | else | |
5c04f4f7 MM |
2530 | echo "configure: failed program was:" >&5 |
2531 | cat conftest.$ac_ext >&5 | |
7393a6f0 MM |
2532 | rm -rf conftest* |
2533 | eval "ac_cv_header_dirent_$ac_safe=no" | |
2534 | fi | |
2535 | rm -f conftest* | |
7393a6f0 MM |
2536 | fi |
2537 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
2538 | echo "$ac_t""yes" 1>&6 | |
5c04f4f7 | 2539 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
7393a6f0 MM |
2540 | cat >> confdefs.h <<EOF |
2541 | #define $ac_tr_hdr 1 | |
2542 | EOF | |
2543 | ac_header_dirent=$ac_hdr; break | |
2544 | else | |
2545 | echo "$ac_t""no" 1>&6 | |
2546 | fi | |
2547 | done | |
2548 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
2549 | if test $ac_header_dirent = dirent.h; then | |
5c04f4f7 MM |
2550 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
2551 | echo "configure:2552: checking for opendir in -ldir" >&5 | |
2552 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` | |
7393a6f0 MM |
2553 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2554 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2555 | else | |
2556 | ac_save_LIBS="$LIBS" | |
2557 | LIBS="-ldir $LIBS" | |
2558 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2559 | #line 2560 "configure" |
7393a6f0 | 2560 | #include "confdefs.h" |
88f1eac4 MM |
2561 | /* Override any gcc2 internal prototype to avoid an error. */ |
2562 | /* We use char because int might match the return type of a gcc2 | |
2563 | builtin and then its argument prototype would still apply. */ | |
2564 | char opendir(); | |
7393a6f0 | 2565 | |
5c04f4f7 | 2566 | int main() { |
7393a6f0 MM |
2567 | opendir() |
2568 | ; return 0; } | |
2569 | EOF | |
5c04f4f7 | 2570 | if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
7393a6f0 MM |
2571 | rm -rf conftest* |
2572 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2573 | else | |
5c04f4f7 MM |
2574 | echo "configure: failed program was:" >&5 |
2575 | cat conftest.$ac_ext >&5 | |
7393a6f0 MM |
2576 | rm -rf conftest* |
2577 | eval "ac_cv_lib_$ac_lib_var=no" | |
2578 | fi | |
2579 | rm -f conftest* | |
2580 | LIBS="$ac_save_LIBS" | |
2581 | ||
2582 | fi | |
2583 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2584 | echo "$ac_t""yes" 1>&6 | |
2585 | LIBS="$LIBS -ldir" | |
2586 | else | |
2587 | echo "$ac_t""no" 1>&6 | |
2588 | fi | |
2589 | ||
2590 | else | |
5c04f4f7 MM |
2591 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
2592 | echo "configure:2593: checking for opendir in -lx" >&5 | |
2593 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` | |
7393a6f0 MM |
2594 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2595 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2596 | else | |
2597 | ac_save_LIBS="$LIBS" | |
2598 | LIBS="-lx $LIBS" | |
2599 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2600 | #line 2601 "configure" |
7393a6f0 | 2601 | #include "confdefs.h" |
88f1eac4 MM |
2602 | /* Override any gcc2 internal prototype to avoid an error. */ |
2603 | /* We use char because int might match the return type of a gcc2 | |
2604 | builtin and then its argument prototype would still apply. */ | |
2605 | char opendir(); | |
7393a6f0 | 2606 | |
5c04f4f7 | 2607 | int main() { |
7393a6f0 MM |
2608 | opendir() |
2609 | ; return 0; } | |
2610 | EOF | |
5c04f4f7 | 2611 | if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
7393a6f0 MM |
2612 | rm -rf conftest* |
2613 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2614 | else | |
5c04f4f7 MM |
2615 | echo "configure: failed program was:" >&5 |
2616 | cat conftest.$ac_ext >&5 | |
7393a6f0 MM |
2617 | rm -rf conftest* |
2618 | eval "ac_cv_lib_$ac_lib_var=no" | |
2619 | fi | |
2620 | rm -f conftest* | |
2621 | LIBS="$ac_save_LIBS" | |
2622 | ||
2623 | fi | |
2624 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2625 | echo "$ac_t""yes" 1>&6 | |
2626 | LIBS="$LIBS -lx" | |
2627 | else | |
2628 | echo "$ac_t""no" 1>&6 | |
2629 | fi | |
2630 | ||
2631 | fi | |
30c87b55 MM |
2632 | |
2633 | ||
2634 | sim_termio="" | |
2635 | echo $ac_n "checking for struct termios""... $ac_c" 1>&6 | |
5c04f4f7 | 2636 | echo "configure:2637: checking for struct termios" >&5 |
30c87b55 MM |
2637 | if eval "test \"`echo '$''{'ac_cv_termios_struct'+set}'`\" = set"; then |
2638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2639 | else | |
2640 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2641 | #line 2642 "configure" |
30c87b55 MM |
2642 | #include "confdefs.h" |
2643 | #include <sys/types.h> | |
2644 | #include <sys/termios.h> | |
5c04f4f7 | 2645 | int main() { |
30c87b55 MM |
2646 | static struct termios x; |
2647 | x.c_iflag = 0; | |
2648 | x.c_oflag = 0; | |
2649 | x.c_cflag = 0; | |
2650 | x.c_lflag = 0; | |
2651 | x.c_cc[NCCS] = 0; | |
2652 | ; return 0; } | |
2653 | EOF | |
5c04f4f7 | 2654 | if { (eval echo configure:2655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
2655 | rm -rf conftest* |
2656 | ac_cv_termios_struct=yes | |
2657 | else | |
5c04f4f7 MM |
2658 | echo "configure: failed program was:" >&5 |
2659 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
2660 | rm -rf conftest* |
2661 | ac_cv_termios_struct=no | |
2662 | fi | |
2663 | rm -f conftest* | |
30c87b55 MM |
2664 | fi |
2665 | ||
2666 | echo "$ac_t""$ac_cv_termios_struct" 1>&6 | |
2667 | if test $ac_cv_termios_struct = yes; then | |
2668 | sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE" | |
2669 | fi | |
2670 | ||
2671 | if test "$ac_cv_termios_struct" = "yes"; then | |
2672 | echo $ac_n "checking for c_line field in struct termios""... $ac_c" 1>&6 | |
5c04f4f7 | 2673 | echo "configure:2674: checking for c_line field in struct termios" >&5 |
30c87b55 MM |
2674 | if eval "test \"`echo '$''{'ac_cv_termios_cline'+set}'`\" = set"; then |
2675 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2676 | else | |
2677 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2678 | #line 2679 "configure" |
30c87b55 MM |
2679 | #include "confdefs.h" |
2680 | #include <sys/types.h> | |
2681 | #include <sys/termios.h> | |
5c04f4f7 | 2682 | int main() { |
30c87b55 MM |
2683 | static struct termios x; x.c_line = 0; |
2684 | ; return 0; } | |
2685 | EOF | |
5c04f4f7 | 2686 | if { (eval echo configure:2687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
2687 | rm -rf conftest* |
2688 | ac_cv_termios_cline=yes | |
2689 | else | |
5c04f4f7 MM |
2690 | echo "configure: failed program was:" >&5 |
2691 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
2692 | rm -rf conftest* |
2693 | ac_cv_termios_cline=no | |
2694 | fi | |
2695 | rm -f conftest* | |
30c87b55 MM |
2696 | fi |
2697 | ||
2698 | ||
2699 | echo "$ac_t""$ac_cv_termios_cline" 1>&6 | |
2700 | if test $ac_cv_termios_cline = yes; then | |
2701 | sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE" | |
2702 | fi | |
2703 | else | |
2704 | ac_cv_termios_cline=no | |
2705 | fi | |
2706 | ||
2707 | if test "$ac_cv_termios_struct" != "yes"; then | |
2708 | echo $ac_n "checking for struct termio""... $ac_c" 1>&6 | |
5c04f4f7 | 2709 | echo "configure:2710: checking for struct termio" >&5 |
30c87b55 MM |
2710 | if eval "test \"`echo '$''{'ac_cv_termio_struct'+set}'`\" = set"; then |
2711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2712 | else | |
2713 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2714 | #line 2715 "configure" |
30c87b55 MM |
2715 | #include "confdefs.h" |
2716 | #include <sys/types.h> | |
2717 | #include <sys/termio.h> | |
5c04f4f7 | 2718 | int main() { |
30c87b55 MM |
2719 | static struct termio x; |
2720 | x.c_iflag = 0; | |
2721 | x.c_oflag = 0; | |
2722 | x.c_cflag = 0; | |
2723 | x.c_lflag = 0; | |
2724 | x.c_cc[NCC] = 0; | |
2725 | ; return 0; } | |
2726 | EOF | |
5c04f4f7 | 2727 | if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
2728 | rm -rf conftest* |
2729 | ac_cv_termio_struct=yes | |
2730 | else | |
5c04f4f7 MM |
2731 | echo "configure: failed program was:" >&5 |
2732 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
2733 | rm -rf conftest* |
2734 | ac_cv_termio_struct=no | |
2735 | fi | |
2736 | rm -f conftest* | |
30c87b55 MM |
2737 | fi |
2738 | ||
2739 | echo "$ac_t""$ac_cv_termio_struct" 1>&6 | |
2740 | if test $ac_cv_termio_struct = yes; then | |
2741 | sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE" | |
2742 | fi | |
2743 | else | |
2744 | ac_cv_termio_struct=no | |
2745 | fi | |
2746 | ||
2747 | if test "$ac_cv_termio_struct" = "yes"; then | |
2748 | echo $ac_n "checking for c_line field in struct termio""... $ac_c" 1>&6 | |
5c04f4f7 | 2749 | echo "configure:2750: checking for c_line field in struct termio" >&5 |
30c87b55 MM |
2750 | if eval "test \"`echo '$''{'ac_cv_termio_cline'+set}'`\" = set"; then |
2751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2752 | else | |
2753 | cat > conftest.$ac_ext <<EOF | |
5c04f4f7 | 2754 | #line 2755 "configure" |
30c87b55 MM |
2755 | #include "confdefs.h" |
2756 | #include <sys/types.h> | |
2757 | #include <sys/termio.h> | |
5c04f4f7 | 2758 | int main() { |
30c87b55 MM |
2759 | static struct termio x; x.c_line = 0; |
2760 | ; return 0; } | |
2761 | EOF | |
5c04f4f7 | 2762 | if { (eval echo configure:2763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
2763 | rm -rf conftest* |
2764 | ac_cv_termio_cline=yes | |
2765 | else | |
5c04f4f7 MM |
2766 | echo "configure: failed program was:" >&5 |
2767 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
2768 | rm -rf conftest* |
2769 | ac_cv_termio_cline=no | |
2770 | fi | |
2771 | rm -f conftest* | |
30c87b55 MM |
2772 | fi |
2773 | ||
2774 | ||
2775 | echo "$ac_t""$ac_cv_termio_cline" 1>&6 | |
2776 | if test $ac_cv_termio_cline = yes; then | |
2777 | sim_termio="$sim_termio -DHAVE_TERMIO_CLINE" | |
2778 | fi | |
2779 | else | |
2780 | ac_cv_termio_cline=no | |
2781 | fi | |
2782 | ||
5c04f4f7 MM |
2783 | sim_devzero="" |
2784 | echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6 | |
2785 | echo "configure:2786: checking for /dev/zero" >&5 | |
2786 | if eval "test \"`echo '$''{'ac_cv_devzero'+set}'`\" = set"; then | |
2787 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2788 | else | |
2789 | if test "$cross_compiling" = yes; then | |
2790 | ac_cv_devzero=no | |
2791 | else | |
2792 | cat > conftest.$ac_ext <<EOF | |
2793 | #line 2794 "configure" | |
2794 | #include "confdefs.h" | |
2795 | #include <fcntl.h> | |
2796 | main () { | |
2797 | char buf[2048]; | |
2798 | int i; | |
2799 | int fd = open ("/dev/zero", O_RDONLY); | |
2800 | if (fd < 0) | |
2801 | return 1; | |
2802 | for (i = 0; i < sizeof (buf); i++) | |
2803 | buf[i] = 1; | |
2804 | if (read (fd, buf, sizeof (buf)) != sizeof (buf)) | |
2805 | return 1; | |
2806 | for (i = 0; i < sizeof (buf); i++) | |
2807 | if (buf[i]) | |
2808 | return 1; | |
2809 | return 0; | |
2810 | } | |
2811 | EOF | |
2812 | if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
2813 | then | |
2814 | ac_cv_devzero=yes | |
2815 | else | |
2816 | echo "configure: failed program was:" >&5 | |
2817 | cat conftest.$ac_ext >&5 | |
2818 | rm -fr conftest* | |
2819 | ac_cv_devzero=no | |
2820 | fi | |
2821 | rm -fr conftest* | |
2822 | fi | |
2823 | ||
2824 | fi | |
2825 | ||
2826 | echo "$ac_t""$ac_cv_devzero" 1>&6 | |
2827 | if test $ac_cv_devzero = yes; then | |
2828 | sim_devzero="-DHAVE_DEVZERO" | |
2829 | else | |
2830 | sim_devzero="" | |
2831 | fi | |
2832 | ||
d2e3d3af MM |
2833 | echo $ac_n "checking for common simulator directory""... $ac_c" 1>&6 |
2834 | echo "configure:2835: checking for common simulator directory" >&5 | |
cef84fb3 | 2835 | if test -f "${srcdir}/../common/callback.c"; then |
d2e3d3af MM |
2836 | echo "$ac_t""yes" 1>&6 |
2837 | sim_callback="callback.o targ-map.o" | |
54973b80 | 2838 | sim_targ_vals="targ-vals.h targ-map.c targ-vals.def" |
d2e3d3af MM |
2839 | else |
2840 | echo "$ac_t""no" 1>&6 | |
2841 | sim_callback="" | |
54973b80 | 2842 | sim_targ_vals="" |
d2e3d3af MM |
2843 | fi |
2844 | ||
30c87b55 MM |
2845 | |
2846 | ||
2847 | ||
2848 | AR=${AR-ar} | |
2849 | ||
2850 | # Extract the first word of "ranlib", so it can be a program name with args. | |
2851 | set dummy ranlib; ac_word=$2 | |
2852 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
54973b80 | 2853 | echo "configure:2854: checking for $ac_word" >&5 |
30c87b55 MM |
2854 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2855 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2856 | else | |
2857 | if test -n "$RANLIB"; then | |
2858 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2859 | else | |
2860 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2861 | for ac_dir in $PATH; do | |
2862 | test -z "$ac_dir" && ac_dir=. | |
2863 | if test -f $ac_dir/$ac_word; then | |
2864 | ac_cv_prog_RANLIB="ranlib" | |
2865 | break | |
2866 | fi | |
2867 | done | |
2868 | IFS="$ac_save_ifs" | |
2869 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
2870 | fi | |
2871 | fi | |
2872 | RANLIB="$ac_cv_prog_RANLIB" | |
2873 | if test -n "$RANLIB"; then | |
2874 | echo "$ac_t""$RANLIB" 1>&6 | |
2875 | else | |
2876 | echo "$ac_t""no" 1>&6 | |
2877 | fi | |
2878 | ||
2879 | ||
2880 | ||
2881 | ||
2882 | ||
2883 | ||
2884 | ||
2885 | ||
2886 | ||
2887 | ||
2888 | ||
2889 | ||
2890 | ||
2891 | ||
2892 | ||
2893 | ||
2894 | ||
2895 | ||
2896 | ||
2897 | ||
2898 | ||
2899 | ||
2900 | ||
2901 | ||
2902 | ||
2903 | ||
2904 | ||
2e913166 MM |
2905 | |
2906 | ||
2907 | ||
2908 | ||
2909 | ||
2910 | ||
30c87b55 MM |
2911 | |
2912 | ||
2913 | ||
2914 | ||
2915 | ||
5c04f4f7 | 2916 | |
d2e3d3af | 2917 | |
54973b80 | 2918 | |
7393a6f0 | 2919 | |
4f965b81 MM |
2920 | |
2921 | trap '' 1 2 15 | |
2922 | cat > confcache <<\EOF | |
2923 | # This file is a shell script that caches the results of configure | |
2924 | # tests run on this system so they can be shared between configure | |
2925 | # scripts and configure runs. It is not useful on other systems. | |
2926 | # If it contains results you don't want to keep, you may remove or edit it. | |
2927 | # | |
2928 | # By default, configure uses ./config.cache as the cache file, | |
2929 | # creating it if it does not exist already. You can give configure | |
2930 | # the --cache-file=FILE option to use a different cache file; that is | |
2931 | # what configure does when it calls configure scripts in | |
2932 | # subdirectories, so they share the cache. | |
2933 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
2934 | # config.status only pays attention to the cache file if you give it the | |
2935 | # --recheck option to rerun configure. | |
2936 | # | |
2937 | EOF | |
5c04f4f7 MM |
2938 | # The following way of writing the cache mishandles newlines in values, |
2939 | # but we know of no workaround that is simple, portable, and efficient. | |
2940 | # So, don't put newlines in cache variables' values. | |
4f965b81 MM |
2941 | # Ultrix sh set writes to stderr and can't be redirected directly, |
2942 | # and sets the high bit in the cache file unless we assign to the vars. | |
2943 | (set) 2>&1 | | |
5c04f4f7 MM |
2944 | case `(ac_space=' '; set) 2>&1` in |
2945 | *ac_space=\ *) | |
2946 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
2947 | # turns \\\\ into \\, and sed turns \\ into \). | |
2948 | sed -n \ | |
2949 | -e "s/'/'\\\\''/g" \ | |
2950 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
2951 | ;; | |
2952 | *) | |
2953 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
2954 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
2955 | ;; | |
2956 | esac >> confcache | |
4f965b81 MM |
2957 | if cmp -s $cache_file confcache; then |
2958 | : | |
2959 | else | |
2960 | if test -w $cache_file; then | |
2961 | echo "updating cache $cache_file" | |
2962 | cat confcache > $cache_file | |
2963 | else | |
2964 | echo "not updating unwritable cache $cache_file" | |
2965 | fi | |
2966 | fi | |
2967 | rm -f confcache | |
2968 | ||
2969 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
2970 | ||
2971 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
2972 | # Let make expand exec_prefix. | |
2973 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2974 | ||
2975 | # Any assignment to VPATH causes Sun make to only execute | |
2976 | # the first set of double-colon rules, so remove it if not needed. | |
2977 | # If there is a colon in the path, we need to keep it. | |
2978 | if test "x$srcdir" = x.; then | |
2979 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
2980 | fi | |
2981 | ||
2982 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
2983 | ||
4b935ed4 | 2984 | DEFS=-DHAVE_CONFIG_H |
4f965b81 MM |
2985 | |
2986 | # Without the "./", some shells look in PATH for config.status. | |
2987 | : ${CONFIG_STATUS=./config.status} | |
2988 | ||
2989 | echo creating $CONFIG_STATUS | |
2990 | rm -f $CONFIG_STATUS | |
2991 | cat > $CONFIG_STATUS <<EOF | |
2992 | #! /bin/sh | |
2993 | # Generated automatically by configure. | |
2994 | # Run this file to recreate the current configuration. | |
2995 | # This directory was configured as follows, | |
2996 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
2997 | # | |
2998 | # $0 $ac_configure_args | |
2999 | # | |
3000 | # Compiler output produced by configure, useful for debugging | |
3001 | # configure, is in ./config.log if it exists. | |
3002 | ||
3003 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
3004 | for ac_option | |
3005 | do | |
3006 | case "\$ac_option" in | |
3007 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
3008 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
3009 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
3010 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
5c04f4f7 | 3011 | echo "$CONFIG_STATUS generated by autoconf version 2.12" |
4f965b81 MM |
3012 | exit 0 ;; |
3013 | -help | --help | --hel | --he | --h) | |
3014 | echo "\$ac_cs_usage"; exit 0 ;; | |
3015 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
3016 | esac | |
3017 | done | |
3018 | ||
3019 | ac_given_srcdir=$srcdir | |
78c09e4a | 3020 | ac_given_INSTALL="$INSTALL" |
4f965b81 | 3021 | |
4b935ed4 | 3022 | trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1f1e5dd8 MM |
3023 | EOF |
3024 | cat >> $CONFIG_STATUS <<EOF | |
4f965b81 | 3025 | |
1f1e5dd8 MM |
3026 | # Protect against being on the right side of a sed subst in config.status. |
3027 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
3028 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
4f965b81 MM |
3029 | $ac_vpsub |
3030 | $extrasub | |
3031 | s%@CFLAGS@%$CFLAGS%g | |
3032 | s%@CPPFLAGS@%$CPPFLAGS%g | |
3033 | s%@CXXFLAGS@%$CXXFLAGS%g | |
3034 | s%@DEFS@%$DEFS%g | |
3035 | s%@LDFLAGS@%$LDFLAGS%g | |
3036 | s%@LIBS@%$LIBS%g | |
3037 | s%@exec_prefix@%$exec_prefix%g | |
3038 | s%@prefix@%$prefix%g | |
3039 | s%@program_transform_name@%$program_transform_name%g | |
1f1e5dd8 MM |
3040 | s%@bindir@%$bindir%g |
3041 | s%@sbindir@%$sbindir%g | |
3042 | s%@libexecdir@%$libexecdir%g | |
3043 | s%@datadir@%$datadir%g | |
3044 | s%@sysconfdir@%$sysconfdir%g | |
3045 | s%@sharedstatedir@%$sharedstatedir%g | |
3046 | s%@localstatedir@%$localstatedir%g | |
3047 | s%@libdir@%$libdir%g | |
3048 | s%@includedir@%$includedir%g | |
3049 | s%@oldincludedir@%$oldincludedir%g | |
3050 | s%@infodir@%$infodir%g | |
3051 | s%@mandir@%$mandir%g | |
78c09e4a JM |
3052 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3053 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
30c87b55 | 3054 | s%@CC@%$CC%g |
4f965b81 MM |
3055 | s%@host@%$host%g |
3056 | s%@host_alias@%$host_alias%g | |
3057 | s%@host_cpu@%$host_cpu%g | |
3058 | s%@host_vendor@%$host_vendor%g | |
3059 | s%@host_os@%$host_os%g | |
3060 | s%@target@%$target%g | |
3061 | s%@target_alias@%$target_alias%g | |
3062 | s%@target_cpu@%$target_cpu%g | |
3063 | s%@target_vendor@%$target_vendor%g | |
3064 | s%@target_os@%$target_os%g | |
3065 | s%@build@%$build%g | |
3066 | s%@build_alias@%$build_alias%g | |
3067 | s%@build_cpu@%$build_cpu%g | |
3068 | s%@build_vendor@%$build_vendor%g | |
3069 | s%@build_os@%$build_os%g | |
30c87b55 MM |
3070 | s%@LIBOBJS@%$LIBOBJS%g |
3071 | s%@CPP@%$CPP%g | |
a72d2509 | 3072 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
4b935ed4 MM |
3073 | s%@HDEFINES@%$HDEFINES%g |
3074 | s%@AR@%$AR%g | |
3075 | s%@RANLIB@%$RANLIB%g | |
c494cadd | 3076 | s%@sim_cflags@%$sim_cflags%g |
73c4941b | 3077 | s%@sim_warnings@%$sim_warnings%g |
30c87b55 | 3078 | s%@sim_line_nr@%$sim_line_nr%g |
c494cadd MM |
3079 | s%@sim_config@%$sim_config%g |
3080 | s%@sim_opcode@%$sim_opcode%g | |
3081 | s%@sim_switch@%$sim_switch%g | |
3082 | s%@sim_dup@%$sim_dup%g | |
30c87b55 | 3083 | s%@sim_jump@%$sim_jump%g |
c494cadd MM |
3084 | s%@sim_filter@%$sim_filter%g |
3085 | s%@sim_icache@%$sim_icache%g | |
2e913166 MM |
3086 | s%@sim_hw_src@%$sim_hw_src%g |
3087 | s%@sim_hw_obj@%$sim_hw_obj%g | |
3088 | s%@sim_pk_src@%$sim_pk_src%g | |
3089 | s%@sim_pk_obj@%$sim_pk_obj%g | |
c494cadd MM |
3090 | s%@sim_inline@%$sim_inline%g |
3091 | s%@sim_bswap@%$sim_bswap%g | |
3092 | s%@sim_endian@%$sim_endian%g | |
2e913166 MM |
3093 | s%@sim_regparm@%$sim_regparm%g |
3094 | s%@sim_stdcall@%$sim_stdcall%g | |
f2181eff | 3095 | s%@sim_xor_endian@%$sim_xor_endian%g |
c494cadd MM |
3096 | s%@sim_hostendian@%$sim_hostendian%g |
3097 | s%@sim_smp@%$sim_smp%g | |
30c87b55 | 3098 | s%@sim_igen_smp@%$sim_igen_smp%g |
c494cadd MM |
3099 | s%@sim_bitsize@%$sim_bitsize%g |
3100 | s%@sim_hostbitsize@%$sim_hostbitsize%g | |
3101 | s%@sim_env@%$sim_env%g | |
3102 | s%@sim_timebase@%$sim_timebase%g | |
3103 | s%@sim_alignment@%$sim_alignment%g | |
3104 | s%@sim_float@%$sim_float%g | |
3105 | s%@sim_trace@%$sim_trace%g | |
3106 | s%@sim_assert@%$sim_assert%g | |
a3114052 | 3107 | s%@sim_reserved@%$sim_reserved%g |
c494cadd | 3108 | s%@sim_monitor@%$sim_monitor%g |
73c4941b MM |
3109 | s%@sim_model@%$sim_model%g |
3110 | s%@sim_default_model@%$sim_default_model%g | |
f2181eff | 3111 | s%@sim_model_issue@%$sim_model_issue%g |
a72d2509 | 3112 | s%@sim_stdio@%$sim_stdio%g |
30c87b55 | 3113 | s%@sim_termio@%$sim_termio%g |
5c04f4f7 | 3114 | s%@sim_devzero@%$sim_devzero%g |
d2e3d3af | 3115 | s%@sim_callback@%$sim_callback%g |
54973b80 | 3116 | s%@sim_targ_vals@%$sim_targ_vals%g |
4f965b81 MM |
3117 | |
3118 | CEOF | |
3119 | EOF | |
5c04f4f7 MM |
3120 | |
3121 | cat >> $CONFIG_STATUS <<\EOF | |
3122 | ||
3123 | # Split the substitutions into bite-sized pieces for seds with | |
3124 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
3125 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
3126 | ac_file=1 # Number of current file. | |
3127 | ac_beg=1 # First line for current file. | |
3128 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
3129 | ac_more_lines=: | |
3130 | ac_sed_cmds="" | |
3131 | while $ac_more_lines; do | |
3132 | if test $ac_beg -gt 1; then | |
3133 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
3134 | else | |
3135 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
3136 | fi | |
3137 | if test ! -s conftest.s$ac_file; then | |
3138 | ac_more_lines=false | |
3139 | rm -f conftest.s$ac_file | |
3140 | else | |
3141 | if test -z "$ac_sed_cmds"; then | |
3142 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
3143 | else | |
3144 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
3145 | fi | |
3146 | ac_file=`expr $ac_file + 1` | |
3147 | ac_beg=$ac_end | |
3148 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
3149 | fi | |
3150 | done | |
3151 | if test -z "$ac_sed_cmds"; then | |
3152 | ac_sed_cmds=cat | |
3153 | fi | |
3154 | EOF | |
3155 | ||
4f965b81 MM |
3156 | cat >> $CONFIG_STATUS <<EOF |
3157 | ||
3158 | CONFIG_FILES=\${CONFIG_FILES-"Makefile"} | |
3159 | EOF | |
3160 | cat >> $CONFIG_STATUS <<\EOF | |
3161 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
5c04f4f7 | 3162 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
4f965b81 | 3163 | case "$ac_file" in |
5c04f4f7 | 3164 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
4f965b81 MM |
3165 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3166 | *) ac_file_in="${ac_file}.in" ;; | |
3167 | esac | |
3168 | ||
5c04f4f7 | 3169 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
4f965b81 MM |
3170 | |
3171 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3172 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3173 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3174 | # The file is in a subdirectory. | |
3175 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3176 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
3177 | # A "../" for each directory in $ac_dir_suffix. | |
3178 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
3179 | else | |
3180 | ac_dir_suffix= ac_dots= | |
3181 | fi | |
3182 | ||
3183 | case "$ac_given_srcdir" in | |
3184 | .) srcdir=. | |
3185 | if test -z "$ac_dots"; then top_srcdir=. | |
3186 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
3187 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
3188 | *) # Relative path. | |
3189 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
3190 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
3191 | esac | |
3192 | ||
78c09e4a JM |
3193 | case "$ac_given_INSTALL" in |
3194 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3195 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3196 | esac | |
5c04f4f7 | 3197 | |
4f965b81 MM |
3198 | echo creating "$ac_file" |
3199 | rm -f "$ac_file" | |
3200 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
3201 | case "$ac_file" in | |
3202 | *Makefile*) ac_comsub="1i\\ | |
3203 | # $configure_input" ;; | |
3204 | *) ac_comsub= ;; | |
3205 | esac | |
5c04f4f7 MM |
3206 | |
3207 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
4f965b81 MM |
3208 | sed -e "$ac_comsub |
3209 | s%@configure_input@%$configure_input%g | |
3210 | s%@srcdir@%$srcdir%g | |
3211 | s%@top_srcdir@%$top_srcdir%g | |
78c09e4a | 3212 | s%@INSTALL@%$INSTALL%g |
5c04f4f7 | 3213 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
4f965b81 | 3214 | fi; done |
5c04f4f7 | 3215 | rm -f conftest.s* |
4f965b81 | 3216 | |
4b935ed4 MM |
3217 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
3218 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
3219 | # | |
3220 | # ac_d sets the value in "#define NAME VALUE" lines. | |
3221 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
3222 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
3223 | ac_dC='\3' | |
3224 | ac_dD='%g' | |
3225 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
3226 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3227 | ac_uB='\([ ]\)%\1#\2define\3' | |
3228 | ac_uC=' ' | |
3229 | ac_uD='\4%g' | |
3230 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
3231 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3232 | ac_eB='$%\1#\2define\3' | |
3233 | ac_eC=' ' | |
3234 | ac_eD='%g' | |
3235 | ||
5c04f4f7 MM |
3236 | if test "${CONFIG_HEADERS+set}" != set; then |
3237 | EOF | |
3238 | cat >> $CONFIG_STATUS <<EOF | |
3239 | CONFIG_HEADERS="config.h:config.in" | |
3240 | EOF | |
3241 | cat >> $CONFIG_STATUS <<\EOF | |
3242 | fi | |
4b935ed4 | 3243 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
5c04f4f7 | 3244 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
4b935ed4 | 3245 | case "$ac_file" in |
5c04f4f7 | 3246 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
4b935ed4 MM |
3247 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3248 | *) ac_file_in="${ac_file}.in" ;; | |
3249 | esac | |
3250 | ||
3251 | echo creating $ac_file | |
4f965b81 | 3252 | |
4b935ed4 | 3253 | rm -f conftest.frag conftest.in conftest.out |
5c04f4f7 MM |
3254 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
3255 | cat $ac_file_inputs > conftest.in | |
4f965b81 | 3256 | |
4b935ed4 MM |
3257 | EOF |
3258 | ||
3259 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
3260 | # the proper values into config.h.in to produce config.h. And first: | |
1f1e5dd8 | 3261 | # Protect against being on the right side of a sed subst in config.status. |
4b935ed4 MM |
3262 | # Protect against being in an unquoted here document in config.status. |
3263 | rm -f conftest.vals | |
3264 | cat > conftest.hdr <<\EOF | |
3265 | s/[\\&%]/\\&/g | |
3266 | s%[\\$`]%\\&%g | |
88f1eac4 | 3267 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
4b935ed4 MM |
3268 | s%ac_d%ac_u%gp |
3269 | s%ac_u%ac_e%gp | |
3270 | EOF | |
3271 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
3272 | rm -f conftest.hdr | |
3273 | ||
3274 | # This sed command replaces #undef with comments. This is necessary, for | |
3275 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
3276 | # on some systems where configure will not decide to define it. | |
3277 | cat >> conftest.vals <<\EOF | |
3278 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
3279 | EOF | |
3280 | ||
3281 | # Break up conftest.vals because some shells have a limit on | |
3282 | # the size of here documents, and old seds have small limits too. | |
4b935ed4 MM |
3283 | |
3284 | rm -f conftest.tail | |
3285 | while : | |
3286 | do | |
3287 | ac_lines=`grep -c . conftest.vals` | |
3288 | # grep -c gives empty output for an empty file on some AIX systems. | |
3289 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
3290 | # Write a limited-size here document to conftest.frag. | |
3291 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
3292 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
3293 | echo 'CEOF | |
3294 | sed -f conftest.frag conftest.in > conftest.out | |
3295 | rm -f conftest.in | |
3296 | mv conftest.out conftest.in | |
3297 | ' >> $CONFIG_STATUS | |
3298 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
3299 | rm -f conftest.vals | |
3300 | mv conftest.tail conftest.vals | |
3301 | done | |
3302 | rm -f conftest.vals | |
3303 | ||
3304 | cat >> $CONFIG_STATUS <<\EOF | |
3305 | rm -f conftest.frag conftest.h | |
3306 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
3307 | cat conftest.in >> conftest.h | |
3308 | rm -f conftest.in | |
3309 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
3310 | echo "$ac_file is unchanged" | |
3311 | rm -f conftest.h | |
3312 | else | |
88f1eac4 MM |
3313 | # Remove last slash and all that follows it. Not all systems have dirname. |
3314 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3315 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3316 | # The file is in a subdirectory. | |
3317 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3318 | fi | |
4b935ed4 MM |
3319 | rm -f $ac_file |
3320 | mv conftest.h $ac_file | |
3321 | fi | |
3322 | fi; done | |
3323 | ||
5c04f4f7 MM |
3324 | EOF |
3325 | cat >> $CONFIG_STATUS <<EOF | |
4b935ed4 | 3326 | |
5c04f4f7 MM |
3327 | EOF |
3328 | cat >> $CONFIG_STATUS <<\EOF | |
4b935ed4 | 3329 | case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac |
4f965b81 MM |
3330 | exit 0 |
3331 | EOF | |
3332 | chmod +x $CONFIG_STATUS | |
3333 | rm -fr confdefs* $ac_clean_files | |
3334 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
3335 |