Commit | Line | Data |
---|---|---|
4f965b81 MM |
1 | #! /bin/sh |
2 | ||
a2eb9d27 TT |
3 | |
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
10 | ||
11 | ||
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | ||
21 | ||
22 | ||
23 | ||
24 | ||
25 | ||
26 | ||
27 | ||
28 | ||
29 | ||
30 | ||
31 | ||
32 | ||
33 | ||
34 | ||
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
45 | sim_inline="-DDEFAULT_INLINE=0" | |
46 | ||
47 | ||
48 | ||
49 | ||
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | ||
56 | ||
57 | ||
58 | ||
59 | ||
60 | ||
61 | ||
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
70 | ||
71 | ||
72 | ||
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 | # This file is derived from `gettext.m4'. The difference is that the | |
82 | # included macros assume Cygnus-style source and build trees. | |
83 | ||
84 | # Macro to add for using GNU gettext. | |
85 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
86 | # | |
87 | # This file file be copied and used freely without restrictions. It can | |
88 | # be used in projects which are not available under the GNU Public License | |
89 | # but which still want to provide support for the GNU gettext functionality. | |
90 | # Please note that the actual code is *not* freely available. | |
91 | ||
92 | # serial 3 | |
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | # Search path for a program which passes the given test. | |
99 | # Ulrich Drepper <drepper@cygnus.com>, 1996. | |
100 | # | |
101 | # This file file be copied and used freely without restrictions. It can | |
102 | # be used in projects which are not available under the GNU Public License | |
103 | # but which still want to provide support for the GNU gettext functionality. | |
104 | # Please note that the actual code is *not* freely available. | |
105 | ||
106 | # serial 1 | |
107 | ||
108 | ||
109 | ||
110 | # Check whether LC_MESSAGES is available in <locale.h>. | |
111 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
112 | # | |
113 | # This file file be copied and used freely without restrictions. It can | |
114 | # be used in projects which are not available under the GNU Public License | |
115 | # but which still want to provide support for the GNU gettext functionality. | |
116 | # Please note that the actual code is *not* freely available. | |
117 | ||
118 | # serial 1 | |
119 | ||
120 | ||
121 | ||
8c59a22d GN |
122 | # Check to see if we're running under Cygwin32, without using |
123 | # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes". | |
124 | # Otherwise set it to "no". | |
125 | ||
126 | ||
127 | ||
128 | # Check to see if we're running under Win32, without using | |
129 | # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe". | |
130 | # Otherwise set it to "". | |
131 | ||
132 | ||
133 | ||
134 | ||
135 | # Check to see if we're running under Cygwin32, without using | |
136 | # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes". | |
137 | # Otherwise set it to "no". | |
138 | ||
139 | ||
140 | ||
141 | # Check to see if we're running under Win32, without using | |
142 | # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe". | |
143 | # Otherwise set it to "". | |
144 | ||
145 | ||
59fb3497 | 146 | |
4f965b81 | 147 | # Guess values for system-dependent variables and create Makefiles. |
d865fb6e | 148 | # Generated automatically using autoconf version 2.12.1 |
88f1eac4 | 149 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
4f965b81 MM |
150 | # |
151 | # This configure script is free software; the Free Software Foundation | |
152 | # gives unlimited permission to copy, distribute and modify it. | |
153 | ||
154 | # Defaults: | |
155 | ac_help= | |
156 | ac_default_prefix=/usr/local | |
157 | # Any additions from configure.in: | |
a2eb9d27 TT |
158 | ac_help="$ac_help |
159 | --disable-nls do not use Native Language Support" | |
160 | ac_help="$ac_help | |
161 | --with-included-gettext use the GNU gettext library included here" | |
c494cadd | 162 | ac_help="$ac_help |
5c04f4f7 | 163 | --enable-sim-alignment=align Specify strict or nonstrict alignment." |
c494cadd | 164 | ac_help="$ac_help |
5c04f4f7 | 165 | --enable-sim-assert Specify whether to perform random assertions." |
30c87b55 | 166 | ac_help="$ac_help |
5c04f4f7 | 167 | --enable-sim-bitsize=n Specify target bitsize (32 or 64)." |
c494cadd | 168 | ac_help="$ac_help |
5c04f4f7 | 169 | --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums." |
c494cadd | 170 | ac_help="$ac_help |
5c04f4f7 | 171 | --enable-sim-cflags=opts Extra CFLAGS for use in building simulator" |
c494cadd | 172 | ac_help="$ac_help |
5c04f4f7 | 173 | --enable-sim-config=file Override default config file" |
d865fb6e MM |
174 | ac_help="$ac_help |
175 | --enable-sim-decode-mechanism=which Specify the instruction decode mechanism." | |
5c04f4f7 MM |
176 | ac_help="$ac_help |
177 | --enable-sim-default-model=which Specify default PowerPC to model." | |
c494cadd | 178 | ac_help="$ac_help |
73c4941b | 179 | --enable-sim-duplicate Expand (duplicate) semantic functions." |
30c87b55 | 180 | ac_help="$ac_help |
5c04f4f7 MM |
181 | --enable-sim-endian=endian Specify target byte endian orientation." |
182 | ac_help="$ac_help | |
183 | --enable-sim-env=env Specify target environment (operating, virtual, user)." | |
c494cadd | 184 | ac_help="$ac_help |
73c4941b | 185 | --enable-sim-filter=rule Specify filter rules." |
c494cadd | 186 | ac_help="$ac_help |
5c04f4f7 | 187 | --enable-sim-float Specify whether to use host floating point or simulate." |
2e913166 MM |
188 | ac_help="$ac_help |
189 | --enable-sim-hardware=list Specify the hardware to be included in the build." | |
190 | ac_help="$ac_help | |
5c04f4f7 | 191 | --enable-sim-hostbitsize=32|64 Specify host bitsize (32 or 64)." |
c494cadd | 192 | ac_help="$ac_help |
d865fb6e | 193 | --enable-sim-hostendian=end Specify host byte endian orientation." |
2e913166 | 194 | ac_help="$ac_help |
5c04f4f7 | 195 | --enable-sim-icache=size Specify instruction-decode cache size and type." |
2e913166 | 196 | ac_help="$ac_help |
5c04f4f7 | 197 | --enable-sim-inline=inlines Specify which functions should be inlined." |
c494cadd | 198 | ac_help="$ac_help |
5c04f4f7 | 199 | --enable-sim-jump Jump between semantic code (instead of call/return)." |
c494cadd | 200 | ac_help="$ac_help |
5c04f4f7 | 201 | --enable-sim-line-nr=opts Generate extra CPP code that references source rather than generated code" |
f2181eff | 202 | ac_help="$ac_help |
5c04f4f7 | 203 | --enable-sim-model=which Specify PowerPC to model." |
c494cadd | 204 | ac_help="$ac_help |
5c04f4f7 | 205 | --enable-sim-model-issue Specify whether to simulate model specific actions" |
c494cadd | 206 | ac_help="$ac_help |
5c04f4f7 | 207 | --enable-sim-monitor=mon Specify whether to enable monitoring events." |
c494cadd | 208 | ac_help="$ac_help |
5c04f4f7 | 209 | --enable-sim-opcode=which Override default opcode lookup." |
c494cadd | 210 | ac_help="$ac_help |
5c04f4f7 | 211 | --enable-sim-packages=list Specify the packages to be included in the build." |
73c4941b | 212 | ac_help="$ac_help |
5c04f4f7 | 213 | --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific." |
73c4941b | 214 | ac_help="$ac_help |
5c04f4f7 | 215 | --enable-sim-reserved-bits Specify whether to check reserved bits in instruction." |
73c4941b | 216 | ac_help="$ac_help |
5c04f4f7 | 217 | --enable-sim-smp=n Specify number of processors to configure for." |
a3114052 | 218 | ac_help="$ac_help |
5c04f4f7 | 219 | --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific." |
c494cadd | 220 | ac_help="$ac_help |
5c04f4f7 | 221 | --enable-sim-stdio Specify whether to use stdio for console input/output." |
c494cadd | 222 | ac_help="$ac_help |
5c04f4f7 | 223 | --enable-sim-switch Use a switch instead of a table for instruction call." |
c494cadd | 224 | ac_help="$ac_help |
5c04f4f7 | 225 | --enable-sim-timebase Specify whether the PPC timebase is supported." |
73c4941b | 226 | ac_help="$ac_help |
5c04f4f7 | 227 | --enable-sim-trace Specify whether tracing is supported." |
f2181eff | 228 | ac_help="$ac_help |
5c04f4f7 | 229 | --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o" |
a72d2509 | 230 | ac_help="$ac_help |
5c04f4f7 | 231 | --enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8)." |
4f965b81 MM |
232 | |
233 | # Initialize some variables set by options. | |
234 | # The variables have the same names as the options, with | |
235 | # dashes changed to underlines. | |
236 | build=NONE | |
237 | cache_file=./config.cache | |
238 | exec_prefix=NONE | |
239 | host=NONE | |
240 | no_create= | |
241 | nonopt=NONE | |
242 | no_recursion= | |
243 | prefix=NONE | |
244 | program_prefix=NONE | |
245 | program_suffix=NONE | |
246 | program_transform_name=s,x,x, | |
247 | silent= | |
248 | site= | |
249 | srcdir= | |
250 | target=NONE | |
251 | verbose= | |
252 | x_includes=NONE | |
253 | x_libraries=NONE | |
1f1e5dd8 MM |
254 | bindir='${exec_prefix}/bin' |
255 | sbindir='${exec_prefix}/sbin' | |
256 | libexecdir='${exec_prefix}/libexec' | |
257 | datadir='${prefix}/share' | |
258 | sysconfdir='${prefix}/etc' | |
259 | sharedstatedir='${prefix}/com' | |
260 | localstatedir='${prefix}/var' | |
261 | libdir='${exec_prefix}/lib' | |
262 | includedir='${prefix}/include' | |
263 | oldincludedir='/usr/include' | |
264 | infodir='${prefix}/info' | |
265 | mandir='${prefix}/man' | |
4f965b81 MM |
266 | |
267 | # Initialize some other variables. | |
268 | subdirs= | |
1f1e5dd8 | 269 | MFLAGS= MAKEFLAGS= |
d865fb6e | 270 | SHELL=${CONFIG_SHELL-/bin/sh} |
5c04f4f7 MM |
271 | # Maximum number of lines to put in a shell here document. |
272 | ac_max_here_lines=12 | |
4f965b81 MM |
273 | |
274 | ac_prev= | |
275 | for ac_option | |
276 | do | |
277 | ||
278 | # If the previous option needs an argument, assign it. | |
279 | if test -n "$ac_prev"; then | |
280 | eval "$ac_prev=\$ac_option" | |
281 | ac_prev= | |
282 | continue | |
283 | fi | |
284 | ||
285 | case "$ac_option" in | |
286 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
287 | *) ac_optarg= ;; | |
288 | esac | |
289 | ||
290 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
291 | ||
292 | case "$ac_option" in | |
293 | ||
1f1e5dd8 MM |
294 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
295 | ac_prev=bindir ;; | |
296 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
297 | bindir="$ac_optarg" ;; | |
298 | ||
299 | -build | --build | --buil | --bui | --bu) | |
4f965b81 | 300 | ac_prev=build ;; |
1f1e5dd8 | 301 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
4f965b81 MM |
302 | build="$ac_optarg" ;; |
303 | ||
304 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
305 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
306 | ac_prev=cache_file ;; | |
307 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
308 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
309 | cache_file="$ac_optarg" ;; | |
310 | ||
1f1e5dd8 MM |
311 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
312 | ac_prev=datadir ;; | |
313 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
314 | | --da=*) | |
315 | datadir="$ac_optarg" ;; | |
316 | ||
4f965b81 MM |
317 | -disable-* | --disable-*) |
318 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
319 | # Reject names that are not valid shell variable names. | |
320 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
321 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
322 | fi | |
323 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
324 | eval "enable_${ac_feature}=no" ;; | |
325 | ||
326 | -enable-* | --enable-*) | |
327 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
328 | # Reject names that are not valid shell variable names. | |
329 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
330 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
331 | fi | |
332 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
333 | case "$ac_option" in | |
334 | *=*) ;; | |
335 | *) ac_optarg=yes ;; | |
336 | esac | |
337 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
338 | ||
339 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
340 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
341 | | --exec | --exe | --ex) | |
342 | ac_prev=exec_prefix ;; | |
343 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
344 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
345 | | --exec=* | --exe=* | --ex=*) | |
346 | exec_prefix="$ac_optarg" ;; | |
347 | ||
348 | -gas | --gas | --ga | --g) | |
349 | # Obsolete; use --with-gas. | |
350 | with_gas=yes ;; | |
351 | ||
352 | -help | --help | --hel | --he) | |
353 | # Omit some internal or obsolete options to make the list less imposing. | |
354 | # This message is too long to be a string in the A/UX 3.1 sh. | |
355 | cat << EOF | |
356 | Usage: configure [options] [host] | |
357 | Options: [defaults in brackets after descriptions] | |
358 | Configuration: | |
359 | --cache-file=FILE cache test results in FILE | |
360 | --help print this message | |
361 | --no-create do not create output files | |
362 | --quiet, --silent do not print \`checking...' messages | |
363 | --version print the version of autoconf that created configure | |
364 | Directory and file names: | |
365 | --prefix=PREFIX install architecture-independent files in PREFIX | |
366 | [$ac_default_prefix] | |
1f1e5dd8 | 367 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
4f965b81 | 368 | [same as prefix] |
1f1e5dd8 MM |
369 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
370 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
371 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
372 | --datadir=DIR read-only architecture-independent data in DIR | |
373 | [PREFIX/share] | |
374 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
375 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
376 | [PREFIX/com] | |
377 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
378 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
379 | --includedir=DIR C header files in DIR [PREFIX/include] | |
380 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
381 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
382 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
4f965b81 MM |
383 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
384 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
385 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1f1e5dd8 MM |
386 | --program-transform-name=PROGRAM |
387 | run sed PROGRAM on installed program names | |
388 | EOF | |
389 | cat << EOF | |
4f965b81 MM |
390 | Host type: |
391 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
392 | --host=HOST configure for HOST [guessed] | |
393 | --target=TARGET configure for TARGET [TARGET=HOST] | |
394 | Features and packages: | |
395 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
396 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
397 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
398 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
399 | --x-includes=DIR X include files are in DIR | |
400 | --x-libraries=DIR X library files are in DIR | |
4f965b81 | 401 | EOF |
1f1e5dd8 MM |
402 | if test -n "$ac_help"; then |
403 | echo "--enable and --with options recognized:$ac_help" | |
404 | fi | |
4f965b81 MM |
405 | exit 0 ;; |
406 | ||
407 | -host | --host | --hos | --ho) | |
408 | ac_prev=host ;; | |
409 | -host=* | --host=* | --hos=* | --ho=*) | |
410 | host="$ac_optarg" ;; | |
411 | ||
1f1e5dd8 MM |
412 | -includedir | --includedir | --includedi | --included | --include \ |
413 | | --includ | --inclu | --incl | --inc) | |
414 | ac_prev=includedir ;; | |
415 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
416 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
417 | includedir="$ac_optarg" ;; | |
418 | ||
419 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
420 | ac_prev=infodir ;; | |
421 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
422 | infodir="$ac_optarg" ;; | |
423 | ||
424 | -libdir | --libdir | --libdi | --libd) | |
425 | ac_prev=libdir ;; | |
426 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
427 | libdir="$ac_optarg" ;; | |
428 | ||
429 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
430 | | --libexe | --libex | --libe) | |
431 | ac_prev=libexecdir ;; | |
432 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
433 | | --libexe=* | --libex=* | --libe=*) | |
434 | libexecdir="$ac_optarg" ;; | |
435 | ||
436 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
437 | | --localstate | --localstat | --localsta | --localst \ | |
438 | | --locals | --local | --loca | --loc | --lo) | |
439 | ac_prev=localstatedir ;; | |
440 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
441 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
442 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
443 | localstatedir="$ac_optarg" ;; | |
444 | ||
445 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
446 | ac_prev=mandir ;; | |
447 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
448 | mandir="$ac_optarg" ;; | |
449 | ||
4f965b81 MM |
450 | -nfp | --nfp | --nf) |
451 | # Obsolete; use --without-fp. | |
452 | with_fp=no ;; | |
453 | ||
454 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
455 | | --no-cr | --no-c) | |
456 | no_create=yes ;; | |
457 | ||
458 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
459 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
460 | no_recursion=yes ;; | |
461 | ||
1f1e5dd8 MM |
462 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
463 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
464 | | --oldin | --oldi | --old | --ol | --o) | |
465 | ac_prev=oldincludedir ;; | |
466 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
467 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
468 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
469 | oldincludedir="$ac_optarg" ;; | |
470 | ||
4f965b81 MM |
471 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
472 | ac_prev=prefix ;; | |
473 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
474 | prefix="$ac_optarg" ;; | |
475 | ||
476 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
477 | | --program-pre | --program-pr | --program-p) | |
478 | ac_prev=program_prefix ;; | |
479 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
480 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
481 | program_prefix="$ac_optarg" ;; | |
482 | ||
483 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
484 | | --program-suf | --program-su | --program-s) | |
485 | ac_prev=program_suffix ;; | |
486 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
487 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
488 | program_suffix="$ac_optarg" ;; | |
489 | ||
490 | -program-transform-name | --program-transform-name \ | |
491 | | --program-transform-nam | --program-transform-na \ | |
492 | | --program-transform-n | --program-transform- \ | |
493 | | --program-transform | --program-transfor \ | |
494 | | --program-transfo | --program-transf \ | |
495 | | --program-trans | --program-tran \ | |
496 | | --progr-tra | --program-tr | --program-t) | |
497 | ac_prev=program_transform_name ;; | |
498 | -program-transform-name=* | --program-transform-name=* \ | |
499 | | --program-transform-nam=* | --program-transform-na=* \ | |
500 | | --program-transform-n=* | --program-transform-=* \ | |
501 | | --program-transform=* | --program-transfor=* \ | |
502 | | --program-transfo=* | --program-transf=* \ | |
503 | | --program-trans=* | --program-tran=* \ | |
504 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
505 | program_transform_name="$ac_optarg" ;; | |
506 | ||
507 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
508 | | -silent | --silent | --silen | --sile | --sil) | |
509 | silent=yes ;; | |
510 | ||
1f1e5dd8 MM |
511 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
512 | ac_prev=sbindir ;; | |
513 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
514 | | --sbi=* | --sb=*) | |
515 | sbindir="$ac_optarg" ;; | |
516 | ||
517 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
518 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
519 | | --sharedst | --shareds | --shared | --share | --shar \ | |
520 | | --sha | --sh) | |
521 | ac_prev=sharedstatedir ;; | |
522 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
523 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
524 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
525 | | --sha=* | --sh=*) | |
526 | sharedstatedir="$ac_optarg" ;; | |
527 | ||
4f965b81 MM |
528 | -site | --site | --sit) |
529 | ac_prev=site ;; | |
530 | -site=* | --site=* | --sit=*) | |
531 | site="$ac_optarg" ;; | |
532 | ||
533 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
534 | ac_prev=srcdir ;; | |
535 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
536 | srcdir="$ac_optarg" ;; | |
537 | ||
1f1e5dd8 MM |
538 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
539 | | --syscon | --sysco | --sysc | --sys | --sy) | |
540 | ac_prev=sysconfdir ;; | |
541 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
542 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
543 | sysconfdir="$ac_optarg" ;; | |
544 | ||
4f965b81 MM |
545 | -target | --target | --targe | --targ | --tar | --ta | --t) |
546 | ac_prev=target ;; | |
547 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
548 | target="$ac_optarg" ;; | |
549 | ||
550 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
551 | verbose=yes ;; | |
552 | ||
553 | -version | --version | --versio | --versi | --vers) | |
d865fb6e | 554 | echo "configure generated by autoconf version 2.12.1" |
4f965b81 MM |
555 | exit 0 ;; |
556 | ||
557 | -with-* | --with-*) | |
558 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
559 | # Reject names that are not valid shell variable names. | |
560 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
561 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
562 | fi | |
563 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
564 | case "$ac_option" in | |
565 | *=*) ;; | |
566 | *) ac_optarg=yes ;; | |
567 | esac | |
568 | eval "with_${ac_package}='$ac_optarg'" ;; | |
569 | ||
570 | -without-* | --without-*) | |
571 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
572 | # Reject names that are not valid shell variable names. | |
573 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
574 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
575 | fi | |
576 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
577 | eval "with_${ac_package}=no" ;; | |
578 | ||
579 | --x) | |
580 | # Obsolete; use --with-x. | |
581 | with_x=yes ;; | |
582 | ||
583 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
584 | | --x-incl | --x-inc | --x-in | --x-i) | |
585 | ac_prev=x_includes ;; | |
586 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
587 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
588 | x_includes="$ac_optarg" ;; | |
589 | ||
590 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
591 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
592 | ac_prev=x_libraries ;; | |
593 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
594 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
595 | x_libraries="$ac_optarg" ;; | |
596 | ||
597 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
598 | ;; | |
599 | ||
1f1e5dd8 | 600 | *) |
4f965b81 MM |
601 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
602 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
603 | fi | |
604 | if test "x$nonopt" != xNONE; then | |
605 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
606 | fi | |
607 | nonopt="$ac_option" | |
608 | ;; | |
609 | ||
610 | esac | |
611 | done | |
612 | ||
613 | if test -n "$ac_prev"; then | |
614 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
615 | fi | |
616 | ||
617 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
618 | ||
619 | # File descriptor usage: | |
620 | # 0 standard input | |
621 | # 1 file creation | |
622 | # 2 errors and warnings | |
623 | # 3 some systems may open it to /dev/tty | |
624 | # 4 used on the Kubota Titan | |
625 | # 6 checking for... messages and results | |
626 | # 5 compiler messages saved in config.log | |
627 | if test "$silent" = yes; then | |
628 | exec 6>/dev/null | |
629 | else | |
630 | exec 6>&1 | |
631 | fi | |
632 | exec 5>./config.log | |
633 | ||
634 | echo "\ | |
635 | This file contains any messages produced by compilers while | |
636 | running configure, to aid debugging if configure makes a mistake. | |
637 | " 1>&5 | |
638 | ||
639 | # Strip out --no-create and --no-recursion so they do not pile up. | |
640 | # Also quote any args containing shell metacharacters. | |
641 | ac_configure_args= | |
642 | for ac_arg | |
643 | do | |
644 | case "$ac_arg" in | |
645 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
646 | | --no-cr | --no-c) ;; | |
647 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
648 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
649 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
650 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
651 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
652 | esac | |
653 | done | |
654 | ||
655 | # NLS nuisances. | |
5c04f4f7 MM |
656 | # Only set these to C if already set. These must not be set unconditionally |
657 | # because not all systems understand e.g. LANG=C (notably SCO). | |
658 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
659 | # Non-C LC_CTYPE values break the ctype check. | |
4f965b81 | 660 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
5c04f4f7 MM |
661 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
662 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
663 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
4f965b81 MM |
664 | |
665 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
666 | rm -rf conftest* confdefs.h | |
667 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
668 | echo > confdefs.h | |
669 | ||
670 | # A filename unique to this package, relative to the directory that | |
671 | # configure is in, which we can look for to find out if srcdir is correct. | |
672 | ac_unique_file=Makefile.in | |
673 | ||
674 | # Find the source files, if location was not specified. | |
675 | if test -z "$srcdir"; then | |
676 | ac_srcdir_defaulted=yes | |
677 | # Try the directory containing this script, then its parent. | |
678 | ac_prog=$0 | |
679 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
680 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
681 | srcdir=$ac_confdir | |
682 | if test ! -r $srcdir/$ac_unique_file; then | |
683 | srcdir=.. | |
684 | fi | |
685 | else | |
686 | ac_srcdir_defaulted=no | |
687 | fi | |
688 | if test ! -r $srcdir/$ac_unique_file; then | |
689 | if test "$ac_srcdir_defaulted" = yes; then | |
690 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
691 | else | |
692 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
693 | fi | |
694 | fi | |
695 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
696 | ||
697 | # Prefer explicitly selected file to automatically selected ones. | |
698 | if test -z "$CONFIG_SITE"; then | |
699 | if test "x$prefix" != xNONE; then | |
700 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
701 | else | |
702 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
703 | fi | |
704 | fi | |
705 | for ac_site_file in $CONFIG_SITE; do | |
706 | if test -r "$ac_site_file"; then | |
707 | echo "loading site script $ac_site_file" | |
708 | . "$ac_site_file" | |
709 | fi | |
710 | done | |
711 | ||
712 | if test -r "$cache_file"; then | |
713 | echo "loading cache $cache_file" | |
714 | . $cache_file | |
715 | else | |
716 | echo "creating cache $cache_file" | |
717 | > $cache_file | |
718 | fi | |
719 | ||
720 | ac_ext=c | |
721 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
a72d2509 MM |
722 | ac_cpp='$CPP $CPPFLAGS' |
723 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
724 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
5c04f4f7 | 725 | cross_compiling=$ac_cv_prog_cc_cross |
4f965b81 MM |
726 | |
727 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
728 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
729 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
730 | ac_n= ac_c=' | |
731 | ' ac_t=' ' | |
732 | else | |
733 | ac_n=-n ac_c= ac_t= | |
734 | fi | |
735 | else | |
736 | ac_n= ac_c='\c' ac_t= | |
737 | fi | |
738 | ||
739 | ||
740 | ||
30c87b55 MM |
741 | ac_aux_dir= |
742 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
743 | if test -f $ac_dir/install-sh; then | |
744 | ac_aux_dir=$ac_dir | |
745 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
746 | break | |
747 | elif test -f $ac_dir/install.sh; then | |
748 | ac_aux_dir=$ac_dir | |
749 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
750 | break | |
751 | fi | |
752 | done | |
753 | if test -z "$ac_aux_dir"; then | |
754 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
755 | fi | |
756 | ac_config_guess=$ac_aux_dir/config.guess | |
757 | ac_config_sub=$ac_aux_dir/config.sub | |
758 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
759 | ||
760 | # Find a good install program. We prefer a C program (faster), | |
761 | # so one script is as good as another. But avoid the broken or | |
762 | # incompatible versions: | |
763 | # SysV /etc/install, /usr/sbin/install | |
764 | # SunOS /usr/etc/install | |
765 | # IRIX /sbin/install | |
766 | # AIX /bin/install | |
d865fb6e | 767 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
30c87b55 MM |
768 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
769 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
770 | # ./install, which can be erroneously created by make from ./install.sh. | |
771 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
8c59a22d | 772 | echo "configure:773: checking for a BSD compatible install" >&5 |
30c87b55 MM |
773 | if test -z "$INSTALL"; then |
774 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
776 | else | |
5c04f4f7 | 777 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
30c87b55 MM |
778 | for ac_dir in $PATH; do |
779 | # Account for people who put trailing slashes in PATH elements. | |
780 | case "$ac_dir/" in | |
781 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
782 | *) | |
783 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
d865fb6e MM |
784 | # Don't use installbsd from OSF since it installs stuff as root |
785 | # by default. | |
786 | for ac_prog in ginstall scoinst install; do | |
30c87b55 MM |
787 | if test -f $ac_dir/$ac_prog; then |
788 | if test $ac_prog = install && | |
789 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
790 | # AIX install. It has an incompatible calling convention. | |
30c87b55 MM |
791 | : |
792 | else | |
793 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
794 | break 2 | |
795 | fi | |
796 | fi | |
797 | done | |
798 | ;; | |
799 | esac | |
800 | done | |
5c04f4f7 | 801 | IFS="$ac_save_IFS" |
30c87b55 MM |
802 | |
803 | fi | |
804 | if test "${ac_cv_path_install+set}" = set; then | |
805 | INSTALL="$ac_cv_path_install" | |
806 | else | |
807 | # As a last resort, use the slow shell script. We don't cache a | |
808 | # path for INSTALL within a source directory, because that will | |
809 | # break other packages using the cache if that directory is | |
810 | # removed, or if the path is relative. | |
811 | INSTALL="$ac_install_sh" | |
812 | fi | |
813 | fi | |
814 | echo "$ac_t""$INSTALL" 1>&6 | |
815 | ||
816 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
817 | # It thinks the first close brace ends the variable substitution. | |
818 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
819 | ||
820 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
821 | ||
a72d2509 MM |
822 | # Extract the first word of "gcc", so it can be a program name with args. |
823 | set dummy gcc; ac_word=$2 | |
824 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 825 | echo "configure:826: checking for $ac_word" >&5 |
a72d2509 MM |
826 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
828 | else | |
829 | if test -n "$CC"; then | |
830 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
831 | else | |
832 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
833 | for ac_dir in $PATH; do | |
834 | test -z "$ac_dir" && ac_dir=. | |
835 | if test -f $ac_dir/$ac_word; then | |
836 | ac_cv_prog_CC="gcc" | |
837 | break | |
838 | fi | |
839 | done | |
840 | IFS="$ac_save_ifs" | |
841 | fi | |
842 | fi | |
843 | CC="$ac_cv_prog_CC" | |
844 | if test -n "$CC"; then | |
845 | echo "$ac_t""$CC" 1>&6 | |
846 | else | |
847 | echo "$ac_t""no" 1>&6 | |
848 | fi | |
849 | ||
850 | if test -z "$CC"; then | |
851 | # Extract the first word of "cc", so it can be a program name with args. | |
852 | set dummy cc; ac_word=$2 | |
853 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 854 | echo "configure:855: checking for $ac_word" >&5 |
a72d2509 MM |
855 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
857 | else | |
858 | if test -n "$CC"; then | |
859 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
860 | else | |
861 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
862 | ac_prog_rejected=no | |
863 | for ac_dir in $PATH; do | |
864 | test -z "$ac_dir" && ac_dir=. | |
865 | if test -f $ac_dir/$ac_word; then | |
866 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
867 | ac_prog_rejected=yes | |
868 | continue | |
869 | fi | |
870 | ac_cv_prog_CC="cc" | |
871 | break | |
872 | fi | |
873 | done | |
874 | IFS="$ac_save_ifs" | |
875 | if test $ac_prog_rejected = yes; then | |
876 | # We found a bogon in the path, so make sure we never use it. | |
877 | set dummy $ac_cv_prog_CC | |
878 | shift | |
879 | if test $# -gt 0; then | |
880 | # We chose a different compiler from the bogus one. | |
881 | # However, it has the same basename, so the bogon will be chosen | |
882 | # first if we set CC to just the basename; use the full file name. | |
883 | shift | |
884 | set dummy "$ac_dir/$ac_word" "$@" | |
885 | shift | |
886 | ac_cv_prog_CC="$@" | |
887 | fi | |
888 | fi | |
889 | fi | |
890 | fi | |
891 | CC="$ac_cv_prog_CC" | |
892 | if test -n "$CC"; then | |
893 | echo "$ac_t""$CC" 1>&6 | |
894 | else | |
895 | echo "$ac_t""no" 1>&6 | |
896 | fi | |
897 | ||
898 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
899 | fi | |
900 | ||
5c04f4f7 | 901 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
8c59a22d | 902 | echo "configure:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
5c04f4f7 MM |
903 | |
904 | ac_ext=c | |
905 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
906 | ac_cpp='$CPP $CPPFLAGS' | |
907 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
908 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
909 | cross_compiling=$ac_cv_prog_cc_cross | |
910 | ||
911 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 912 | #line 913 "configure" |
5c04f4f7 MM |
913 | #include "confdefs.h" |
914 | main(){return(0);} | |
915 | EOF | |
8c59a22d | 916 | if { (eval echo configure:917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
5c04f4f7 MM |
917 | ac_cv_prog_cc_works=yes |
918 | # If we can't run a trivial program, we are probably using a cross compiler. | |
919 | if (./conftest; exit) 2>/dev/null; then | |
920 | ac_cv_prog_cc_cross=no | |
921 | else | |
922 | ac_cv_prog_cc_cross=yes | |
923 | fi | |
924 | else | |
925 | echo "configure: failed program was:" >&5 | |
926 | cat conftest.$ac_ext >&5 | |
927 | ac_cv_prog_cc_works=no | |
928 | fi | |
929 | rm -fr conftest* | |
930 | ||
931 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
932 | if test $ac_cv_prog_cc_works = no; then | |
933 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
934 | fi | |
935 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
8c59a22d | 936 | echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
5c04f4f7 MM |
937 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
938 | cross_compiling=$ac_cv_prog_cc_cross | |
939 | ||
a72d2509 | 940 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
8c59a22d | 941 | echo "configure:942: checking whether we are using GNU C" >&5 |
a72d2509 MM |
942 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
943 | echo $ac_n "(cached) $ac_c" 1>&6 | |
944 | else | |
945 | cat > conftest.c <<EOF | |
946 | #ifdef __GNUC__ | |
947 | yes; | |
948 | #endif | |
949 | EOF | |
8c59a22d | 950 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
a72d2509 MM |
951 | ac_cv_prog_gcc=yes |
952 | else | |
953 | ac_cv_prog_gcc=no | |
954 | fi | |
955 | fi | |
956 | ||
a2eb9d27 TT |
957 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
958 | ||
959 | if test $ac_cv_prog_gcc = yes; then | |
960 | GCC=yes | |
961 | ac_test_CFLAGS="${CFLAGS+set}" | |
962 | ac_save_CFLAGS="$CFLAGS" | |
963 | CFLAGS= | |
964 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
8c59a22d | 965 | echo "configure:966: checking whether ${CC-cc} accepts -g" >&5 |
a2eb9d27 TT |
966 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
967 | echo $ac_n "(cached) $ac_c" 1>&6 | |
968 | else | |
969 | echo 'void f(){}' > conftest.c | |
970 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
971 | ac_cv_prog_cc_g=yes | |
972 | else | |
973 | ac_cv_prog_cc_g=no | |
974 | fi | |
975 | rm -f conftest* | |
976 | ||
977 | fi | |
978 | ||
979 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
980 | if test "$ac_test_CFLAGS" = set; then | |
981 | CFLAGS="$ac_save_CFLAGS" | |
982 | elif test $ac_cv_prog_cc_g = yes; then | |
983 | CFLAGS="-g -O2" | |
984 | else | |
985 | CFLAGS="-O2" | |
986 | fi | |
987 | else | |
988 | GCC= | |
989 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
990 | fi | |
991 | ||
992 | ||
993 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
a2eb9d27 TT |
994 | if test "x$cross_compiling" = "xno"; then |
995 | CC_FOR_BUILD='$(CC)' | |
996 | else | |
997 | CC_FOR_BUILD=gcc | |
998 | fi | |
999 | ||
1000 | ALL_LINGUAS= | |
1001 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
8c59a22d | 1002 | echo "configure:1003: checking how to run the C preprocessor" >&5 |
a2eb9d27 TT |
1003 | # On Suns, sometimes $CPP names a directory. |
1004 | if test -n "$CPP" && test -d "$CPP"; then | |
1005 | CPP= | |
1006 | fi | |
1007 | if test -z "$CPP"; then | |
1008 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1009 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1010 | else | |
1011 | # This must be in double quotes, not single quotes, because CPP may get | |
1012 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1013 | CPP="${CC-cc} -E" | |
1014 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1015 | # not just through cpp. | |
1016 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1017 | #line 1018 "configure" |
a2eb9d27 TT |
1018 | #include "confdefs.h" |
1019 | #include <assert.h> | |
1020 | Syntax Error | |
1021 | EOF | |
1022 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8c59a22d | 1023 | { (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a2eb9d27 TT |
1024 | ac_err=`grep -v '^ *+' conftest.out` |
1025 | if test -z "$ac_err"; then | |
1026 | : | |
1027 | else | |
1028 | echo "$ac_err" >&5 | |
1029 | echo "configure: failed program was:" >&5 | |
1030 | cat conftest.$ac_ext >&5 | |
1031 | rm -rf conftest* | |
1032 | CPP="${CC-cc} -E -traditional-cpp" | |
1033 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1034 | #line 1035 "configure" |
a2eb9d27 TT |
1035 | #include "confdefs.h" |
1036 | #include <assert.h> | |
1037 | Syntax Error | |
1038 | EOF | |
1039 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8c59a22d | 1040 | { (eval echo configure:1041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a2eb9d27 TT |
1041 | ac_err=`grep -v '^ *+' conftest.out` |
1042 | if test -z "$ac_err"; then | |
1043 | : | |
1044 | else | |
1045 | echo "$ac_err" >&5 | |
1046 | echo "configure: failed program was:" >&5 | |
1047 | cat conftest.$ac_ext >&5 | |
1048 | rm -rf conftest* | |
1049 | CPP=/lib/cpp | |
1050 | fi | |
1051 | rm -f conftest* | |
1052 | fi | |
1053 | rm -f conftest* | |
1054 | ac_cv_prog_CPP="$CPP" | |
1055 | fi | |
1056 | CPP="$ac_cv_prog_CPP" | |
1057 | else | |
1058 | ac_cv_prog_CPP="$CPP" | |
1059 | fi | |
1060 | echo "$ac_t""$CPP" 1>&6 | |
1061 | ||
1062 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
8c59a22d | 1063 | echo "configure:1064: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
a2eb9d27 TT |
1064 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1065 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1066 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1067 | else | |
1068 | cat > conftestmake <<\EOF | |
1069 | all: | |
1070 | @echo 'ac_maketemp="${MAKE}"' | |
1071 | EOF | |
1072 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1073 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1074 | if test -n "$ac_maketemp"; then | |
1075 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1076 | else | |
1077 | eval ac_cv_prog_make_${ac_make}_set=no | |
1078 | fi | |
1079 | rm -f conftestmake | |
1080 | fi | |
1081 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1082 | echo "$ac_t""yes" 1>&6 | |
1083 | SET_MAKE= | |
1084 | else | |
1085 | echo "$ac_t""no" 1>&6 | |
1086 | SET_MAKE="MAKE=${MAKE-make}" | |
1087 | fi | |
1088 | ||
1089 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1090 | set dummy ranlib; ac_word=$2 | |
1091 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 1092 | echo "configure:1093: checking for $ac_word" >&5 |
a2eb9d27 TT |
1093 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1094 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1095 | else | |
1096 | if test -n "$RANLIB"; then | |
1097 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1098 | else | |
1099 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1100 | for ac_dir in $PATH; do | |
1101 | test -z "$ac_dir" && ac_dir=. | |
1102 | if test -f $ac_dir/$ac_word; then | |
1103 | ac_cv_prog_RANLIB="ranlib" | |
1104 | break | |
1105 | fi | |
1106 | done | |
1107 | IFS="$ac_save_ifs" | |
1108 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1109 | fi | |
1110 | fi | |
1111 | RANLIB="$ac_cv_prog_RANLIB" | |
1112 | if test -n "$RANLIB"; then | |
1113 | echo "$ac_t""$RANLIB" 1>&6 | |
1114 | else | |
1115 | echo "$ac_t""no" 1>&6 | |
1116 | fi | |
1117 | ||
1118 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
8c59a22d | 1119 | echo "configure:1120: checking for POSIXized ISC" >&5 |
a2eb9d27 TT |
1120 | if test -d /etc/conf/kconfig.d && |
1121 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
1122 | then | |
1123 | echo "$ac_t""yes" 1>&6 | |
1124 | ISC=yes # If later tests want to check for ISC. | |
1125 | cat >> confdefs.h <<\EOF | |
1126 | #define _POSIX_SOURCE 1 | |
1127 | EOF | |
1128 | ||
1129 | if test "$GCC" = yes; then | |
1130 | CC="$CC -posix" | |
1131 | else | |
1132 | CC="$CC -Xp" | |
1133 | fi | |
1134 | else | |
1135 | echo "$ac_t""no" 1>&6 | |
1136 | ISC= | |
1137 | fi | |
1138 | ||
1139 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
8c59a22d | 1140 | echo "configure:1141: checking for ANSI C header files" >&5 |
a2eb9d27 TT |
1141 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1142 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1143 | else | |
1144 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1145 | #line 1146 "configure" |
a2eb9d27 TT |
1146 | #include "confdefs.h" |
1147 | #include <stdlib.h> | |
1148 | #include <stdarg.h> | |
1149 | #include <string.h> | |
1150 | #include <float.h> | |
1151 | EOF | |
1152 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8c59a22d | 1153 | { (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a2eb9d27 TT |
1154 | ac_err=`grep -v '^ *+' conftest.out` |
1155 | if test -z "$ac_err"; then | |
1156 | rm -rf conftest* | |
1157 | ac_cv_header_stdc=yes | |
1158 | else | |
1159 | echo "$ac_err" >&5 | |
1160 | echo "configure: failed program was:" >&5 | |
1161 | cat conftest.$ac_ext >&5 | |
1162 | rm -rf conftest* | |
1163 | ac_cv_header_stdc=no | |
1164 | fi | |
1165 | rm -f conftest* | |
1166 | ||
1167 | if test $ac_cv_header_stdc = yes; then | |
1168 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1169 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1170 | #line 1171 "configure" |
a2eb9d27 TT |
1171 | #include "confdefs.h" |
1172 | #include <string.h> | |
1173 | EOF | |
1174 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1175 | egrep "memchr" >/dev/null 2>&1; then | |
1176 | : | |
1177 | else | |
1178 | rm -rf conftest* | |
1179 | ac_cv_header_stdc=no | |
1180 | fi | |
1181 | rm -f conftest* | |
1182 | ||
1183 | fi | |
1184 | ||
1185 | if test $ac_cv_header_stdc = yes; then | |
1186 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1187 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1188 | #line 1189 "configure" |
a2eb9d27 TT |
1189 | #include "confdefs.h" |
1190 | #include <stdlib.h> | |
1191 | EOF | |
1192 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1193 | egrep "free" >/dev/null 2>&1; then | |
1194 | : | |
1195 | else | |
1196 | rm -rf conftest* | |
1197 | ac_cv_header_stdc=no | |
1198 | fi | |
1199 | rm -f conftest* | |
1200 | ||
1201 | fi | |
1202 | ||
1203 | if test $ac_cv_header_stdc = yes; then | |
1204 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1205 | if test "$cross_compiling" = yes; then | |
1206 | : | |
1207 | else | |
1208 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1209 | #line 1210 "configure" |
a2eb9d27 TT |
1210 | #include "confdefs.h" |
1211 | #include <ctype.h> | |
1212 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1213 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1214 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1215 | int main () { int i; for (i = 0; i < 256; i++) | |
1216 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1217 | exit (0); } | |
1218 | ||
1219 | EOF | |
8c59a22d | 1220 | if { (eval echo configure:1221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
a2eb9d27 TT |
1221 | then |
1222 | : | |
1223 | else | |
1224 | echo "configure: failed program was:" >&5 | |
1225 | cat conftest.$ac_ext >&5 | |
1226 | rm -fr conftest* | |
1227 | ac_cv_header_stdc=no | |
1228 | fi | |
1229 | rm -fr conftest* | |
1230 | fi | |
1231 | ||
1232 | fi | |
1233 | fi | |
1234 | ||
1235 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1236 | if test $ac_cv_header_stdc = yes; then | |
1237 | cat >> confdefs.h <<\EOF | |
1238 | #define STDC_HEADERS 1 | |
1239 | EOF | |
1240 | ||
1241 | fi | |
1242 | ||
1243 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
8c59a22d | 1244 | echo "configure:1245: checking for working const" >&5 |
a2eb9d27 TT |
1245 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1247 | else | |
1248 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1249 | #line 1250 "configure" |
a2eb9d27 TT |
1250 | #include "confdefs.h" |
1251 | ||
1252 | int main() { | |
1253 | ||
1254 | /* Ultrix mips cc rejects this. */ | |
1255 | typedef int charset[2]; const charset x; | |
1256 | /* SunOS 4.1.1 cc rejects this. */ | |
1257 | char const *const *ccp; | |
1258 | char **p; | |
1259 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1260 | struct point {int x, y;}; | |
1261 | static struct point const zero = {0,0}; | |
1262 | /* AIX XL C 1.02.0.0 rejects this. | |
1263 | It does not let you subtract one const X* pointer from another in an arm | |
1264 | of an if-expression whose if-part is not a constant expression */ | |
1265 | const char *g = "string"; | |
1266 | ccp = &g + (g ? g-g : 0); | |
1267 | /* HPUX 7.0 cc rejects these. */ | |
1268 | ++ccp; | |
1269 | p = (char**) ccp; | |
1270 | ccp = (char const *const *) p; | |
1271 | { /* SCO 3.2v4 cc rejects this. */ | |
1272 | char *t; | |
1273 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1274 | ||
1275 | *t++ = 0; | |
1276 | } | |
1277 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1278 | int x[] = {25, 17}; | |
1279 | const int *foo = &x[0]; | |
1280 | ++foo; | |
1281 | } | |
1282 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1283 | typedef const int *iptr; | |
1284 | iptr p = 0; | |
1285 | ++p; | |
1286 | } | |
1287 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1288 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1289 | struct s { int j; const int *ap[3]; }; | |
1290 | struct s *b; b->j = 5; | |
1291 | } | |
1292 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1293 | const int foo = 10; | |
1294 | } | |
1295 | ||
1296 | ; return 0; } | |
1297 | EOF | |
8c59a22d | 1298 | if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a2eb9d27 TT |
1299 | rm -rf conftest* |
1300 | ac_cv_c_const=yes | |
1301 | else | |
1302 | echo "configure: failed program was:" >&5 | |
1303 | cat conftest.$ac_ext >&5 | |
1304 | rm -rf conftest* | |
1305 | ac_cv_c_const=no | |
1306 | fi | |
1307 | rm -f conftest* | |
1308 | fi | |
1309 | ||
1310 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1311 | if test $ac_cv_c_const = no; then | |
1312 | cat >> confdefs.h <<\EOF | |
1313 | #define const | |
1314 | EOF | |
1315 | ||
1316 | fi | |
1317 | ||
1318 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
8c59a22d | 1319 | echo "configure:1320: checking for inline" >&5 |
a2eb9d27 TT |
1320 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1321 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1322 | else | |
1323 | ac_cv_c_inline=no | |
1324 | for ac_kw in inline __inline__ __inline; do | |
1325 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1326 | #line 1327 "configure" |
a2eb9d27 TT |
1327 | #include "confdefs.h" |
1328 | ||
1329 | int main() { | |
1330 | } $ac_kw foo() { | |
1331 | ; return 0; } | |
1332 | EOF | |
8c59a22d | 1333 | if { (eval echo configure:1334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a2eb9d27 TT |
1334 | rm -rf conftest* |
1335 | ac_cv_c_inline=$ac_kw; break | |
1336 | else | |
1337 | echo "configure: failed program was:" >&5 | |
1338 | cat conftest.$ac_ext >&5 | |
1339 | fi | |
1340 | rm -f conftest* | |
1341 | done | |
1342 | ||
1343 | fi | |
1344 | ||
1345 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1346 | case "$ac_cv_c_inline" in | |
1347 | inline | yes) ;; | |
1348 | no) cat >> confdefs.h <<\EOF | |
1349 | #define inline | |
1350 | EOF | |
1351 | ;; | |
1352 | *) cat >> confdefs.h <<EOF | |
1353 | #define inline $ac_cv_c_inline | |
1354 | EOF | |
1355 | ;; | |
1356 | esac | |
1357 | ||
1358 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
8c59a22d | 1359 | echo "configure:1360: checking for off_t" >&5 |
a2eb9d27 TT |
1360 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1361 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1362 | else | |
1363 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1364 | #line 1365 "configure" |
a2eb9d27 TT |
1365 | #include "confdefs.h" |
1366 | #include <sys/types.h> | |
1367 | #if STDC_HEADERS | |
1368 | #include <stdlib.h> | |
1369 | #include <stddef.h> | |
1370 | #endif | |
1371 | EOF | |
1372 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1373 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1374 | rm -rf conftest* | |
1375 | ac_cv_type_off_t=yes | |
1376 | else | |
1377 | rm -rf conftest* | |
1378 | ac_cv_type_off_t=no | |
1379 | fi | |
1380 | rm -f conftest* | |
1381 | ||
1382 | fi | |
1383 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1384 | if test $ac_cv_type_off_t = no; then | |
1385 | cat >> confdefs.h <<\EOF | |
1386 | #define off_t long | |
1387 | EOF | |
1388 | ||
1389 | fi | |
1390 | ||
1391 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
8c59a22d | 1392 | echo "configure:1393: checking for size_t" >&5 |
a2eb9d27 TT |
1393 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1395 | else | |
1396 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1397 | #line 1398 "configure" |
a2eb9d27 TT |
1398 | #include "confdefs.h" |
1399 | #include <sys/types.h> | |
1400 | #if STDC_HEADERS | |
1401 | #include <stdlib.h> | |
1402 | #include <stddef.h> | |
1403 | #endif | |
1404 | EOF | |
1405 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1406 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1407 | rm -rf conftest* | |
1408 | ac_cv_type_size_t=yes | |
1409 | else | |
1410 | rm -rf conftest* | |
1411 | ac_cv_type_size_t=no | |
1412 | fi | |
1413 | rm -f conftest* | |
1414 | ||
1415 | fi | |
1416 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1417 | if test $ac_cv_type_size_t = no; then | |
1418 | cat >> confdefs.h <<\EOF | |
1419 | #define size_t unsigned | |
1420 | EOF | |
1421 | ||
1422 | fi | |
1423 | ||
1424 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1425 | # for constant arguments. Useless! | |
1426 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
8c59a22d | 1427 | echo "configure:1428: checking for working alloca.h" >&5 |
a2eb9d27 TT |
1428 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1429 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1430 | else | |
1431 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1432 | #line 1433 "configure" |
a2eb9d27 TT |
1433 | #include "confdefs.h" |
1434 | #include <alloca.h> | |
1435 | int main() { | |
1436 | char *p = alloca(2 * sizeof(int)); | |
1437 | ; return 0; } | |
1438 | EOF | |
8c59a22d | 1439 | if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
1440 | rm -rf conftest* |
1441 | ac_cv_header_alloca_h=yes | |
1442 | else | |
1443 | echo "configure: failed program was:" >&5 | |
1444 | cat conftest.$ac_ext >&5 | |
1445 | rm -rf conftest* | |
1446 | ac_cv_header_alloca_h=no | |
1447 | fi | |
1448 | rm -f conftest* | |
1449 | fi | |
1450 | ||
1451 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1452 | if test $ac_cv_header_alloca_h = yes; then | |
1453 | cat >> confdefs.h <<\EOF | |
1454 | #define HAVE_ALLOCA_H 1 | |
1455 | EOF | |
1456 | ||
1457 | fi | |
1458 | ||
1459 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
8c59a22d | 1460 | echo "configure:1461: checking for alloca" >&5 |
a2eb9d27 TT |
1461 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1462 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1463 | else | |
1464 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1465 | #line 1466 "configure" |
a2eb9d27 TT |
1466 | #include "confdefs.h" |
1467 | ||
1468 | #ifdef __GNUC__ | |
1469 | # define alloca __builtin_alloca | |
1470 | #else | |
1471 | # if HAVE_ALLOCA_H | |
1472 | # include <alloca.h> | |
1473 | # else | |
1474 | # ifdef _AIX | |
1475 | #pragma alloca | |
1476 | # else | |
1477 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1478 | char *alloca (); | |
1479 | # endif | |
1480 | # endif | |
1481 | # endif | |
1482 | #endif | |
1483 | ||
1484 | int main() { | |
1485 | char *p = (char *) alloca(1); | |
1486 | ; return 0; } | |
1487 | EOF | |
8c59a22d | 1488 | if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
1489 | rm -rf conftest* |
1490 | ac_cv_func_alloca_works=yes | |
1491 | else | |
1492 | echo "configure: failed program was:" >&5 | |
1493 | cat conftest.$ac_ext >&5 | |
1494 | rm -rf conftest* | |
1495 | ac_cv_func_alloca_works=no | |
1496 | fi | |
1497 | rm -f conftest* | |
1498 | fi | |
1499 | ||
1500 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1501 | if test $ac_cv_func_alloca_works = yes; then | |
1502 | cat >> confdefs.h <<\EOF | |
1503 | #define HAVE_ALLOCA 1 | |
1504 | EOF | |
1505 | ||
1506 | fi | |
1507 | ||
1508 | if test $ac_cv_func_alloca_works = no; then | |
1509 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1510 | # that cause trouble. Some versions do not even contain alloca or | |
1511 | # contain a buggy version. If you still want to use their alloca, | |
1512 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1513 | ALLOCA=alloca.o | |
1514 | cat >> confdefs.h <<\EOF | |
1515 | #define C_ALLOCA 1 | |
1516 | EOF | |
1517 | ||
1518 | ||
1519 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
8c59a22d | 1520 | echo "configure:1521: checking whether alloca needs Cray hooks" >&5 |
a2eb9d27 TT |
1521 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1522 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1523 | else | |
1524 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1525 | #line 1526 "configure" |
a2eb9d27 TT |
1526 | #include "confdefs.h" |
1527 | #if defined(CRAY) && ! defined(CRAY2) | |
1528 | webecray | |
1529 | #else | |
1530 | wenotbecray | |
1531 | #endif | |
1532 | ||
1533 | EOF | |
1534 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1535 | egrep "webecray" >/dev/null 2>&1; then | |
1536 | rm -rf conftest* | |
1537 | ac_cv_os_cray=yes | |
1538 | else | |
1539 | rm -rf conftest* | |
1540 | ac_cv_os_cray=no | |
1541 | fi | |
1542 | rm -f conftest* | |
1543 | ||
1544 | fi | |
1545 | ||
1546 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1547 | if test $ac_cv_os_cray = yes; then | |
1548 | for ac_func in _getb67 GETB67 getb67; do | |
1549 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8c59a22d | 1550 | echo "configure:1551: checking for $ac_func" >&5 |
a2eb9d27 TT |
1551 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1552 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1553 | else | |
1554 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1555 | #line 1556 "configure" |
a2eb9d27 TT |
1556 | #include "confdefs.h" |
1557 | /* System header to define __stub macros and hopefully few prototypes, | |
1558 | which can conflict with char $ac_func(); below. */ | |
1559 | #include <assert.h> | |
1560 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1561 | /* We use char because int might match the return type of a gcc2 | |
1562 | builtin and then its argument prototype would still apply. */ | |
1563 | char $ac_func(); | |
1564 | ||
1565 | int main() { | |
1566 | ||
1567 | /* The GNU C library defines this for functions which it implements | |
1568 | to always fail with ENOSYS. Some functions are actually named | |
1569 | something starting with __ and the normal name is an alias. */ | |
1570 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1571 | choke me | |
1572 | #else | |
1573 | $ac_func(); | |
1574 | #endif | |
1575 | ||
1576 | ; return 0; } | |
1577 | EOF | |
8c59a22d | 1578 | if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
1579 | rm -rf conftest* |
1580 | eval "ac_cv_func_$ac_func=yes" | |
1581 | else | |
1582 | echo "configure: failed program was:" >&5 | |
1583 | cat conftest.$ac_ext >&5 | |
1584 | rm -rf conftest* | |
1585 | eval "ac_cv_func_$ac_func=no" | |
1586 | fi | |
1587 | rm -f conftest* | |
1588 | fi | |
1589 | ||
1590 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1591 | echo "$ac_t""yes" 1>&6 | |
1592 | cat >> confdefs.h <<EOF | |
1593 | #define CRAY_STACKSEG_END $ac_func | |
1594 | EOF | |
1595 | ||
1596 | break | |
1597 | else | |
1598 | echo "$ac_t""no" 1>&6 | |
1599 | fi | |
1600 | ||
1601 | done | |
1602 | fi | |
1603 | ||
1604 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
8c59a22d | 1605 | echo "configure:1606: checking stack direction for C alloca" >&5 |
a2eb9d27 TT |
1606 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1607 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1608 | else | |
1609 | if test "$cross_compiling" = yes; then | |
1610 | ac_cv_c_stack_direction=0 | |
1611 | else | |
1612 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1613 | #line 1614 "configure" |
a2eb9d27 TT |
1614 | #include "confdefs.h" |
1615 | find_stack_direction () | |
1616 | { | |
1617 | static char *addr = 0; | |
1618 | auto char dummy; | |
1619 | if (addr == 0) | |
1620 | { | |
1621 | addr = &dummy; | |
1622 | return find_stack_direction (); | |
1623 | } | |
1624 | else | |
1625 | return (&dummy > addr) ? 1 : -1; | |
1626 | } | |
1627 | main () | |
1628 | { | |
1629 | exit (find_stack_direction() < 0); | |
1630 | } | |
1631 | EOF | |
8c59a22d | 1632 | if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
a2eb9d27 TT |
1633 | then |
1634 | ac_cv_c_stack_direction=1 | |
1635 | else | |
1636 | echo "configure: failed program was:" >&5 | |
1637 | cat conftest.$ac_ext >&5 | |
1638 | rm -fr conftest* | |
1639 | ac_cv_c_stack_direction=-1 | |
1640 | fi | |
1641 | rm -fr conftest* | |
1642 | fi | |
1643 | ||
1644 | fi | |
1645 | ||
1646 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1647 | cat >> confdefs.h <<EOF | |
1648 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1649 | EOF | |
1650 | ||
1651 | fi | |
1652 | ||
1653 | for ac_hdr in unistd.h | |
1654 | do | |
1655 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1656 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8c59a22d | 1657 | echo "configure:1658: checking for $ac_hdr" >&5 |
a2eb9d27 TT |
1658 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1659 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1660 | else | |
1661 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1662 | #line 1663 "configure" |
a2eb9d27 TT |
1663 | #include "confdefs.h" |
1664 | #include <$ac_hdr> | |
1665 | EOF | |
1666 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8c59a22d | 1667 | { (eval echo configure:1668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a2eb9d27 TT |
1668 | ac_err=`grep -v '^ *+' conftest.out` |
1669 | if test -z "$ac_err"; then | |
1670 | rm -rf conftest* | |
1671 | eval "ac_cv_header_$ac_safe=yes" | |
1672 | else | |
1673 | echo "$ac_err" >&5 | |
1674 | echo "configure: failed program was:" >&5 | |
1675 | cat conftest.$ac_ext >&5 | |
1676 | rm -rf conftest* | |
1677 | eval "ac_cv_header_$ac_safe=no" | |
1678 | fi | |
1679 | rm -f conftest* | |
1680 | fi | |
1681 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1682 | echo "$ac_t""yes" 1>&6 | |
1683 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1684 | cat >> confdefs.h <<EOF | |
1685 | #define $ac_tr_hdr 1 | |
1686 | EOF | |
1687 | ||
1688 | else | |
1689 | echo "$ac_t""no" 1>&6 | |
1690 | fi | |
1691 | done | |
1692 | ||
1693 | for ac_func in getpagesize | |
1694 | do | |
1695 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8c59a22d | 1696 | echo "configure:1697: checking for $ac_func" >&5 |
a2eb9d27 TT |
1697 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1698 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1699 | else | |
1700 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1701 | #line 1702 "configure" |
a2eb9d27 TT |
1702 | #include "confdefs.h" |
1703 | /* System header to define __stub macros and hopefully few prototypes, | |
1704 | which can conflict with char $ac_func(); below. */ | |
1705 | #include <assert.h> | |
1706 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1707 | /* We use char because int might match the return type of a gcc2 | |
1708 | builtin and then its argument prototype would still apply. */ | |
1709 | char $ac_func(); | |
1710 | ||
1711 | int main() { | |
1712 | ||
1713 | /* The GNU C library defines this for functions which it implements | |
1714 | to always fail with ENOSYS. Some functions are actually named | |
1715 | something starting with __ and the normal name is an alias. */ | |
1716 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1717 | choke me | |
1718 | #else | |
1719 | $ac_func(); | |
1720 | #endif | |
1721 | ||
1722 | ; return 0; } | |
1723 | EOF | |
8c59a22d | 1724 | if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
1725 | rm -rf conftest* |
1726 | eval "ac_cv_func_$ac_func=yes" | |
1727 | else | |
1728 | echo "configure: failed program was:" >&5 | |
1729 | cat conftest.$ac_ext >&5 | |
1730 | rm -rf conftest* | |
1731 | eval "ac_cv_func_$ac_func=no" | |
1732 | fi | |
1733 | rm -f conftest* | |
1734 | fi | |
1735 | ||
1736 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1737 | echo "$ac_t""yes" 1>&6 | |
1738 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1739 | cat >> confdefs.h <<EOF | |
1740 | #define $ac_tr_func 1 | |
1741 | EOF | |
1742 | ||
1743 | else | |
1744 | echo "$ac_t""no" 1>&6 | |
1745 | fi | |
1746 | done | |
1747 | ||
1748 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
8c59a22d | 1749 | echo "configure:1750: checking for working mmap" >&5 |
a2eb9d27 TT |
1750 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
1751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1752 | else | |
1753 | if test "$cross_compiling" = yes; then | |
1754 | ac_cv_func_mmap_fixed_mapped=no | |
1755 | else | |
1756 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1757 | #line 1758 "configure" |
a2eb9d27 TT |
1758 | #include "confdefs.h" |
1759 | ||
1760 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1761 | Here is a matrix of mmap possibilities: | |
1762 | mmap private not fixed | |
1763 | mmap private fixed at somewhere currently unmapped | |
1764 | mmap private fixed at somewhere already mapped | |
1765 | mmap shared not fixed | |
1766 | mmap shared fixed at somewhere currently unmapped | |
1767 | mmap shared fixed at somewhere already mapped | |
1768 | For private mappings, we should verify that changes cannot be read() | |
1769 | back from the file, nor mmap's back from the file at a different | |
1770 | address. (There have been systems where private was not correctly | |
1771 | implemented like the infamous i386 svr4.0, and systems where the | |
1772 | VM page cache was not coherent with the filesystem buffer cache | |
1773 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1774 | For shared mappings, we should conversely verify that changes get | |
1775 | propogated back to all the places they're supposed to be. | |
1776 | ||
1777 | Grep wants private fixed already mapped. | |
1778 | The main things grep needs to know about mmap are: | |
1779 | * does it exist and is it safe to write into the mmap'd area | |
1780 | * how to use it (BSD variants) */ | |
1781 | #include <sys/types.h> | |
1782 | #include <fcntl.h> | |
1783 | #include <sys/mman.h> | |
1784 | ||
1785 | /* This mess was copied from the GNU getpagesize.h. */ | |
1786 | #ifndef HAVE_GETPAGESIZE | |
1787 | # ifdef HAVE_UNISTD_H | |
1788 | # include <unistd.h> | |
1789 | # endif | |
1790 | ||
1791 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1792 | # ifndef HAVE_SYS_PARAM_H | |
1793 | # define HAVE_SYS_PARAM_H 1 | |
1794 | # endif | |
1795 | ||
1796 | # ifdef _SC_PAGESIZE | |
1797 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1798 | # else /* no _SC_PAGESIZE */ | |
1799 | # ifdef HAVE_SYS_PARAM_H | |
1800 | # include <sys/param.h> | |
1801 | # ifdef EXEC_PAGESIZE | |
1802 | # define getpagesize() EXEC_PAGESIZE | |
1803 | # else /* no EXEC_PAGESIZE */ | |
1804 | # ifdef NBPG | |
1805 | # define getpagesize() NBPG * CLSIZE | |
1806 | # ifndef CLSIZE | |
1807 | # define CLSIZE 1 | |
1808 | # endif /* no CLSIZE */ | |
1809 | # else /* no NBPG */ | |
1810 | # ifdef NBPC | |
1811 | # define getpagesize() NBPC | |
1812 | # else /* no NBPC */ | |
1813 | # ifdef PAGESIZE | |
1814 | # define getpagesize() PAGESIZE | |
1815 | # endif /* PAGESIZE */ | |
1816 | # endif /* no NBPC */ | |
1817 | # endif /* no NBPG */ | |
1818 | # endif /* no EXEC_PAGESIZE */ | |
1819 | # else /* no HAVE_SYS_PARAM_H */ | |
1820 | # define getpagesize() 8192 /* punt totally */ | |
1821 | # endif /* no HAVE_SYS_PARAM_H */ | |
1822 | # endif /* no _SC_PAGESIZE */ | |
1823 | ||
1824 | #endif /* no HAVE_GETPAGESIZE */ | |
1825 | ||
1826 | #ifdef __cplusplus | |
1827 | extern "C" { void *malloc(unsigned); } | |
1828 | #else | |
1829 | char *malloc(); | |
1830 | #endif | |
1831 | ||
1832 | int | |
1833 | main() | |
1834 | { | |
1835 | char *data, *data2, *data3; | |
1836 | int i, pagesize; | |
1837 | int fd; | |
1838 | ||
1839 | pagesize = getpagesize(); | |
1840 | ||
1841 | /* | |
1842 | * First, make a file with some known garbage in it. | |
1843 | */ | |
1844 | data = malloc(pagesize); | |
1845 | if (!data) | |
1846 | exit(1); | |
1847 | for (i = 0; i < pagesize; ++i) | |
1848 | *(data + i) = rand(); | |
1849 | umask(0); | |
1850 | fd = creat("conftestmmap", 0600); | |
1851 | if (fd < 0) | |
1852 | exit(1); | |
1853 | if (write(fd, data, pagesize) != pagesize) | |
1854 | exit(1); | |
1855 | close(fd); | |
1856 | ||
1857 | /* | |
1858 | * Next, try to mmap the file at a fixed address which | |
1859 | * already has something else allocated at it. If we can, | |
1860 | * also make sure that we see the same garbage. | |
1861 | */ | |
1862 | fd = open("conftestmmap", O_RDWR); | |
1863 | if (fd < 0) | |
1864 | exit(1); | |
1865 | data2 = malloc(2 * pagesize); | |
1866 | if (!data2) | |
1867 | exit(1); | |
1868 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1869 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1870 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1871 | exit(1); | |
1872 | for (i = 0; i < pagesize; ++i) | |
1873 | if (*(data + i) != *(data2 + i)) | |
1874 | exit(1); | |
1875 | ||
1876 | /* | |
1877 | * Finally, make sure that changes to the mapped area | |
1878 | * do not percolate back to the file as seen by read(). | |
1879 | * (This is a bug on some variants of i386 svr4.0.) | |
1880 | */ | |
1881 | for (i = 0; i < pagesize; ++i) | |
1882 | *(data2 + i) = *(data2 + i) + 1; | |
1883 | data3 = malloc(pagesize); | |
1884 | if (!data3) | |
1885 | exit(1); | |
1886 | if (read(fd, data3, pagesize) != pagesize) | |
1887 | exit(1); | |
1888 | for (i = 0; i < pagesize; ++i) | |
1889 | if (*(data + i) != *(data3 + i)) | |
1890 | exit(1); | |
1891 | close(fd); | |
1892 | unlink("conftestmmap"); | |
1893 | exit(0); | |
1894 | } | |
1895 | ||
1896 | EOF | |
8c59a22d | 1897 | if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
a2eb9d27 TT |
1898 | then |
1899 | ac_cv_func_mmap_fixed_mapped=yes | |
1900 | else | |
1901 | echo "configure: failed program was:" >&5 | |
1902 | cat conftest.$ac_ext >&5 | |
1903 | rm -fr conftest* | |
1904 | ac_cv_func_mmap_fixed_mapped=no | |
1905 | fi | |
1906 | rm -fr conftest* | |
1907 | fi | |
1908 | ||
1909 | fi | |
1910 | ||
1911 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1912 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1913 | cat >> confdefs.h <<\EOF | |
1914 | #define HAVE_MMAP 1 | |
1915 | EOF | |
1916 | ||
1917 | fi | |
1918 | ||
1919 | ||
1920 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1921 | unistd.h values.h sys/param.h | |
1922 | do | |
1923 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1924 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
8c59a22d | 1925 | echo "configure:1926: checking for $ac_hdr" >&5 |
a2eb9d27 TT |
1926 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1927 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1928 | else | |
1929 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1930 | #line 1931 "configure" |
a2eb9d27 TT |
1931 | #include "confdefs.h" |
1932 | #include <$ac_hdr> | |
1933 | EOF | |
1934 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8c59a22d | 1935 | { (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a2eb9d27 TT |
1936 | ac_err=`grep -v '^ *+' conftest.out` |
1937 | if test -z "$ac_err"; then | |
1938 | rm -rf conftest* | |
1939 | eval "ac_cv_header_$ac_safe=yes" | |
1940 | else | |
1941 | echo "$ac_err" >&5 | |
1942 | echo "configure: failed program was:" >&5 | |
1943 | cat conftest.$ac_ext >&5 | |
1944 | rm -rf conftest* | |
1945 | eval "ac_cv_header_$ac_safe=no" | |
1946 | fi | |
1947 | rm -f conftest* | |
1948 | fi | |
1949 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1950 | echo "$ac_t""yes" 1>&6 | |
1951 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1952 | cat >> confdefs.h <<EOF | |
1953 | #define $ac_tr_hdr 1 | |
1954 | EOF | |
1955 | ||
1956 | else | |
1957 | echo "$ac_t""no" 1>&6 | |
1958 | fi | |
1959 | done | |
1960 | ||
1961 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
1962 | __argz_count __argz_stringify __argz_next | |
1963 | do | |
1964 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8c59a22d | 1965 | echo "configure:1966: checking for $ac_func" >&5 |
a2eb9d27 TT |
1966 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1967 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1968 | else | |
1969 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 1970 | #line 1971 "configure" |
a2eb9d27 TT |
1971 | #include "confdefs.h" |
1972 | /* System header to define __stub macros and hopefully few prototypes, | |
1973 | which can conflict with char $ac_func(); below. */ | |
1974 | #include <assert.h> | |
1975 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1976 | /* We use char because int might match the return type of a gcc2 | |
1977 | builtin and then its argument prototype would still apply. */ | |
1978 | char $ac_func(); | |
1979 | ||
1980 | int main() { | |
1981 | ||
1982 | /* The GNU C library defines this for functions which it implements | |
1983 | to always fail with ENOSYS. Some functions are actually named | |
1984 | something starting with __ and the normal name is an alias. */ | |
1985 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1986 | choke me | |
1987 | #else | |
1988 | $ac_func(); | |
1989 | #endif | |
1990 | ||
1991 | ; return 0; } | |
1992 | EOF | |
8c59a22d | 1993 | if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
1994 | rm -rf conftest* |
1995 | eval "ac_cv_func_$ac_func=yes" | |
1996 | else | |
1997 | echo "configure: failed program was:" >&5 | |
1998 | cat conftest.$ac_ext >&5 | |
1999 | rm -rf conftest* | |
2000 | eval "ac_cv_func_$ac_func=no" | |
2001 | fi | |
2002 | rm -f conftest* | |
2003 | fi | |
2004 | ||
2005 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2006 | echo "$ac_t""yes" 1>&6 | |
2007 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2008 | cat >> confdefs.h <<EOF | |
2009 | #define $ac_tr_func 1 | |
2010 | EOF | |
2011 | ||
2012 | else | |
2013 | echo "$ac_t""no" 1>&6 | |
2014 | fi | |
2015 | done | |
2016 | ||
2017 | ||
2018 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2019 | for ac_func in stpcpy | |
2020 | do | |
2021 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8c59a22d | 2022 | echo "configure:2023: checking for $ac_func" >&5 |
a2eb9d27 TT |
2023 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2025 | else | |
2026 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2027 | #line 2028 "configure" |
a2eb9d27 TT |
2028 | #include "confdefs.h" |
2029 | /* System header to define __stub macros and hopefully few prototypes, | |
2030 | which can conflict with char $ac_func(); below. */ | |
2031 | #include <assert.h> | |
2032 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2033 | /* We use char because int might match the return type of a gcc2 | |
2034 | builtin and then its argument prototype would still apply. */ | |
2035 | char $ac_func(); | |
2036 | ||
2037 | int main() { | |
2038 | ||
2039 | /* The GNU C library defines this for functions which it implements | |
2040 | to always fail with ENOSYS. Some functions are actually named | |
2041 | something starting with __ and the normal name is an alias. */ | |
2042 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2043 | choke me | |
2044 | #else | |
2045 | $ac_func(); | |
2046 | #endif | |
2047 | ||
2048 | ; return 0; } | |
2049 | EOF | |
8c59a22d | 2050 | if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
2051 | rm -rf conftest* |
2052 | eval "ac_cv_func_$ac_func=yes" | |
2053 | else | |
2054 | echo "configure: failed program was:" >&5 | |
2055 | cat conftest.$ac_ext >&5 | |
2056 | rm -rf conftest* | |
2057 | eval "ac_cv_func_$ac_func=no" | |
2058 | fi | |
2059 | rm -f conftest* | |
2060 | fi | |
2061 | ||
2062 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2063 | echo "$ac_t""yes" 1>&6 | |
2064 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2065 | cat >> confdefs.h <<EOF | |
2066 | #define $ac_tr_func 1 | |
2067 | EOF | |
2068 | ||
2069 | else | |
2070 | echo "$ac_t""no" 1>&6 | |
2071 | fi | |
2072 | done | |
2073 | ||
2074 | fi | |
2075 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2076 | cat >> confdefs.h <<\EOF | |
2077 | #define HAVE_STPCPY 1 | |
2078 | EOF | |
2079 | ||
2080 | fi | |
2081 | ||
2082 | if test $ac_cv_header_locale_h = yes; then | |
2083 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
8c59a22d | 2084 | echo "configure:2085: checking for LC_MESSAGES" >&5 |
a2eb9d27 TT |
2085 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2086 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2087 | else | |
2088 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2089 | #line 2090 "configure" |
a2eb9d27 TT |
2090 | #include "confdefs.h" |
2091 | #include <locale.h> | |
2092 | int main() { | |
2093 | return LC_MESSAGES | |
2094 | ; return 0; } | |
2095 | EOF | |
8c59a22d | 2096 | if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
2097 | rm -rf conftest* |
2098 | am_cv_val_LC_MESSAGES=yes | |
2099 | else | |
2100 | echo "configure: failed program was:" >&5 | |
2101 | cat conftest.$ac_ext >&5 | |
2102 | rm -rf conftest* | |
2103 | am_cv_val_LC_MESSAGES=no | |
2104 | fi | |
2105 | rm -f conftest* | |
2106 | fi | |
2107 | ||
2108 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2109 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2110 | cat >> confdefs.h <<\EOF | |
2111 | #define HAVE_LC_MESSAGES 1 | |
2112 | EOF | |
2113 | ||
2114 | fi | |
2115 | fi | |
2116 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
8c59a22d | 2117 | echo "configure:2118: checking whether NLS is requested" >&5 |
a2eb9d27 TT |
2118 | # Check whether --enable-nls or --disable-nls was given. |
2119 | if test "${enable_nls+set}" = set; then | |
2120 | enableval="$enable_nls" | |
2121 | USE_NLS=$enableval | |
2122 | else | |
2123 | USE_NLS=yes | |
2124 | fi | |
2125 | ||
2126 | echo "$ac_t""$USE_NLS" 1>&6 | |
2127 | ||
2128 | ||
2129 | USE_INCLUDED_LIBINTL=no | |
2130 | ||
2131 | if test "$USE_NLS" = "yes"; then | |
2132 | cat >> confdefs.h <<\EOF | |
2133 | #define ENABLE_NLS 1 | |
2134 | EOF | |
2135 | ||
2136 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
8c59a22d | 2137 | echo "configure:2138: checking whether included gettext is requested" >&5 |
a2eb9d27 TT |
2138 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2139 | if test "${with_included_gettext+set}" = set; then | |
2140 | withval="$with_included_gettext" | |
2141 | nls_cv_force_use_gnu_gettext=$withval | |
2142 | else | |
2143 | nls_cv_force_use_gnu_gettext=no | |
2144 | fi | |
2145 | ||
2146 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2147 | ||
2148 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2149 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2150 | nls_cv_header_intl= | |
2151 | nls_cv_header_libgt= | |
2152 | CATOBJEXT=NONE | |
2153 | ||
2154 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2155 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
8c59a22d | 2156 | echo "configure:2157: checking for libintl.h" >&5 |
a2eb9d27 TT |
2157 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2159 | else | |
2160 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2161 | #line 2162 "configure" |
a2eb9d27 TT |
2162 | #include "confdefs.h" |
2163 | #include <libintl.h> | |
2164 | EOF | |
2165 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8c59a22d | 2166 | { (eval echo configure:2167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a2eb9d27 TT |
2167 | ac_err=`grep -v '^ *+' conftest.out` |
2168 | if test -z "$ac_err"; then | |
2169 | rm -rf conftest* | |
2170 | eval "ac_cv_header_$ac_safe=yes" | |
2171 | else | |
2172 | echo "$ac_err" >&5 | |
2173 | echo "configure: failed program was:" >&5 | |
2174 | cat conftest.$ac_ext >&5 | |
2175 | rm -rf conftest* | |
2176 | eval "ac_cv_header_$ac_safe=no" | |
2177 | fi | |
2178 | rm -f conftest* | |
2179 | fi | |
2180 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2181 | echo "$ac_t""yes" 1>&6 | |
2182 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
8c59a22d | 2183 | echo "configure:2184: checking for gettext in libc" >&5 |
a2eb9d27 TT |
2184 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2185 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2186 | else | |
2187 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2188 | #line 2189 "configure" |
a2eb9d27 TT |
2189 | #include "confdefs.h" |
2190 | #include <libintl.h> | |
2191 | int main() { | |
2192 | return (int) gettext ("") | |
2193 | ; return 0; } | |
2194 | EOF | |
8c59a22d | 2195 | if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
2196 | rm -rf conftest* |
2197 | gt_cv_func_gettext_libc=yes | |
2198 | else | |
2199 | echo "configure: failed program was:" >&5 | |
2200 | cat conftest.$ac_ext >&5 | |
2201 | rm -rf conftest* | |
2202 | gt_cv_func_gettext_libc=no | |
2203 | fi | |
2204 | rm -f conftest* | |
2205 | fi | |
2206 | ||
2207 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2208 | ||
2209 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2210 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
8c59a22d | 2211 | echo "configure:2212: checking for bindtextdomain in -lintl" >&5 |
a2eb9d27 TT |
2212 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2213 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2214 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2215 | else | |
2216 | ac_save_LIBS="$LIBS" | |
2217 | LIBS="-lintl $LIBS" | |
2218 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2219 | #line 2220 "configure" |
a2eb9d27 TT |
2220 | #include "confdefs.h" |
2221 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2222 | /* We use char because int might match the return type of a gcc2 | |
2223 | builtin and then its argument prototype would still apply. */ | |
2224 | char bindtextdomain(); | |
2225 | ||
2226 | int main() { | |
2227 | bindtextdomain() | |
2228 | ; return 0; } | |
2229 | EOF | |
8c59a22d | 2230 | if { (eval echo configure:2231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
2231 | rm -rf conftest* |
2232 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2233 | else | |
2234 | echo "configure: failed program was:" >&5 | |
2235 | cat conftest.$ac_ext >&5 | |
2236 | rm -rf conftest* | |
2237 | eval "ac_cv_lib_$ac_lib_var=no" | |
2238 | fi | |
2239 | rm -f conftest* | |
2240 | LIBS="$ac_save_LIBS" | |
2241 | ||
2242 | fi | |
2243 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2244 | echo "$ac_t""yes" 1>&6 | |
2245 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
8c59a22d | 2246 | echo "configure:2247: checking for gettext in libintl" >&5 |
a2eb9d27 TT |
2247 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2248 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2249 | else | |
2250 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2251 | #line 2252 "configure" |
a2eb9d27 TT |
2252 | #include "confdefs.h" |
2253 | ||
2254 | int main() { | |
2255 | return (int) gettext ("") | |
2256 | ; return 0; } | |
2257 | EOF | |
8c59a22d | 2258 | if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
2259 | rm -rf conftest* |
2260 | gt_cv_func_gettext_libintl=yes | |
2261 | else | |
2262 | echo "configure: failed program was:" >&5 | |
2263 | cat conftest.$ac_ext >&5 | |
2264 | rm -rf conftest* | |
2265 | gt_cv_func_gettext_libintl=no | |
2266 | fi | |
2267 | rm -f conftest* | |
2268 | fi | |
2269 | ||
2270 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2271 | else | |
2272 | echo "$ac_t""no" 1>&6 | |
2273 | fi | |
2274 | ||
2275 | fi | |
2276 | ||
2277 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2278 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2279 | cat >> confdefs.h <<\EOF | |
2280 | #define HAVE_GETTEXT 1 | |
2281 | EOF | |
2282 | ||
2283 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2284 | set dummy msgfmt; ac_word=$2 | |
2285 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 2286 | echo "configure:2287: checking for $ac_word" >&5 |
a2eb9d27 TT |
2287 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2288 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2289 | else | |
2290 | case "$MSGFMT" in | |
2291 | /*) | |
2292 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2293 | ;; | |
2294 | *) | |
2295 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2296 | for ac_dir in $PATH; do | |
2297 | test -z "$ac_dir" && ac_dir=. | |
2298 | if test -f $ac_dir/$ac_word; then | |
2299 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2300 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2301 | break | |
2302 | fi | |
2303 | fi | |
2304 | done | |
2305 | IFS="$ac_save_ifs" | |
2306 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2307 | ;; | |
2308 | esac | |
2309 | fi | |
2310 | MSGFMT="$ac_cv_path_MSGFMT" | |
2311 | if test -n "$MSGFMT"; then | |
2312 | echo "$ac_t""$MSGFMT" 1>&6 | |
2313 | else | |
2314 | echo "$ac_t""no" 1>&6 | |
2315 | fi | |
2316 | if test "$MSGFMT" != "no"; then | |
2317 | for ac_func in dcgettext | |
2318 | do | |
2319 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8c59a22d | 2320 | echo "configure:2321: checking for $ac_func" >&5 |
a2eb9d27 TT |
2321 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2322 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2323 | else | |
2324 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2325 | #line 2326 "configure" |
a2eb9d27 TT |
2326 | #include "confdefs.h" |
2327 | /* System header to define __stub macros and hopefully few prototypes, | |
2328 | which can conflict with char $ac_func(); below. */ | |
2329 | #include <assert.h> | |
2330 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2331 | /* We use char because int might match the return type of a gcc2 | |
2332 | builtin and then its argument prototype would still apply. */ | |
2333 | char $ac_func(); | |
2334 | ||
2335 | int main() { | |
2336 | ||
2337 | /* The GNU C library defines this for functions which it implements | |
2338 | to always fail with ENOSYS. Some functions are actually named | |
2339 | something starting with __ and the normal name is an alias. */ | |
2340 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2341 | choke me | |
2342 | #else | |
2343 | $ac_func(); | |
2344 | #endif | |
2345 | ||
2346 | ; return 0; } | |
2347 | EOF | |
8c59a22d | 2348 | if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
2349 | rm -rf conftest* |
2350 | eval "ac_cv_func_$ac_func=yes" | |
2351 | else | |
2352 | echo "configure: failed program was:" >&5 | |
2353 | cat conftest.$ac_ext >&5 | |
2354 | rm -rf conftest* | |
2355 | eval "ac_cv_func_$ac_func=no" | |
2356 | fi | |
2357 | rm -f conftest* | |
2358 | fi | |
2359 | ||
2360 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2361 | echo "$ac_t""yes" 1>&6 | |
2362 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2363 | cat >> confdefs.h <<EOF | |
2364 | #define $ac_tr_func 1 | |
2365 | EOF | |
2366 | ||
2367 | else | |
2368 | echo "$ac_t""no" 1>&6 | |
2369 | fi | |
2370 | done | |
2371 | ||
2372 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2373 | set dummy gmsgfmt; ac_word=$2 | |
2374 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 2375 | echo "configure:2376: checking for $ac_word" >&5 |
a2eb9d27 TT |
2376 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2377 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2378 | else | |
2379 | case "$GMSGFMT" in | |
2380 | /*) | |
2381 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2382 | ;; | |
2383 | ?:/*) | |
2384 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2385 | ;; | |
2386 | *) | |
2387 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2388 | for ac_dir in $PATH; do | |
2389 | test -z "$ac_dir" && ac_dir=. | |
2390 | if test -f $ac_dir/$ac_word; then | |
2391 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2392 | break | |
2393 | fi | |
2394 | done | |
2395 | IFS="$ac_save_ifs" | |
2396 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2397 | ;; | |
2398 | esac | |
2399 | fi | |
2400 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2401 | if test -n "$GMSGFMT"; then | |
2402 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2403 | else | |
2404 | echo "$ac_t""no" 1>&6 | |
2405 | fi | |
2406 | ||
2407 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2408 | set dummy xgettext; ac_word=$2 | |
2409 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 2410 | echo "configure:2411: checking for $ac_word" >&5 |
a2eb9d27 TT |
2411 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2412 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2413 | else | |
2414 | case "$XGETTEXT" in | |
2415 | /*) | |
2416 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2417 | ;; | |
2418 | *) | |
2419 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2420 | for ac_dir in $PATH; do | |
2421 | test -z "$ac_dir" && ac_dir=. | |
2422 | if test -f $ac_dir/$ac_word; then | |
2423 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2424 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2425 | break | |
2426 | fi | |
2427 | fi | |
2428 | done | |
2429 | IFS="$ac_save_ifs" | |
2430 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2431 | ;; | |
2432 | esac | |
2433 | fi | |
2434 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2435 | if test -n "$XGETTEXT"; then | |
2436 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2437 | else | |
2438 | echo "$ac_t""no" 1>&6 | |
2439 | fi | |
2440 | ||
2441 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 2442 | #line 2443 "configure" |
a2eb9d27 TT |
2443 | #include "confdefs.h" |
2444 | ||
2445 | int main() { | |
2446 | extern int _nl_msg_cat_cntr; | |
2447 | return _nl_msg_cat_cntr | |
2448 | ; return 0; } | |
2449 | EOF | |
8c59a22d | 2450 | if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
a2eb9d27 TT |
2451 | rm -rf conftest* |
2452 | CATOBJEXT=.gmo | |
2453 | DATADIRNAME=share | |
2454 | else | |
2455 | echo "configure: failed program was:" >&5 | |
2456 | cat conftest.$ac_ext >&5 | |
2457 | rm -rf conftest* | |
2458 | CATOBJEXT=.mo | |
2459 | DATADIRNAME=lib | |
2460 | fi | |
2461 | rm -f conftest* | |
2462 | INSTOBJEXT=.mo | |
2463 | fi | |
2464 | fi | |
2465 | ||
2466 | else | |
2467 | echo "$ac_t""no" 1>&6 | |
2468 | fi | |
2469 | ||
2470 | ||
2471 | ||
2472 | if test "$CATOBJEXT" = "NONE"; then | |
2473 | nls_cv_use_gnu_gettext=yes | |
2474 | fi | |
2475 | fi | |
2476 | ||
2477 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2478 | INTLOBJS="\$(GETTOBJS)" | |
2479 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2480 | set dummy msgfmt; ac_word=$2 | |
2481 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 2482 | echo "configure:2483: checking for $ac_word" >&5 |
a2eb9d27 TT |
2483 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2485 | else | |
2486 | case "$MSGFMT" in | |
2487 | /*) | |
2488 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2489 | ;; | |
2490 | *) | |
2491 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2492 | for ac_dir in $PATH; do | |
2493 | test -z "$ac_dir" && ac_dir=. | |
2494 | if test -f $ac_dir/$ac_word; then | |
2495 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2496 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2497 | break | |
2498 | fi | |
2499 | fi | |
2500 | done | |
2501 | IFS="$ac_save_ifs" | |
2502 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2503 | ;; | |
2504 | esac | |
2505 | fi | |
2506 | MSGFMT="$ac_cv_path_MSGFMT" | |
2507 | if test -n "$MSGFMT"; then | |
2508 | echo "$ac_t""$MSGFMT" 1>&6 | |
2509 | else | |
2510 | echo "$ac_t""no" 1>&6 | |
2511 | fi | |
2512 | ||
2513 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2514 | set dummy gmsgfmt; ac_word=$2 | |
2515 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 2516 | echo "configure:2517: checking for $ac_word" >&5 |
a2eb9d27 TT |
2517 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2518 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2519 | else | |
2520 | case "$GMSGFMT" in | |
2521 | /*) | |
2522 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2523 | ;; | |
2524 | ?:/*) | |
2525 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2526 | ;; | |
2527 | *) | |
2528 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2529 | for ac_dir in $PATH; do | |
2530 | test -z "$ac_dir" && ac_dir=. | |
2531 | if test -f $ac_dir/$ac_word; then | |
2532 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2533 | break | |
2534 | fi | |
2535 | done | |
2536 | IFS="$ac_save_ifs" | |
2537 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2538 | ;; | |
2539 | esac | |
2540 | fi | |
2541 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2542 | if test -n "$GMSGFMT"; then | |
2543 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2544 | else | |
2545 | echo "$ac_t""no" 1>&6 | |
2546 | fi | |
2547 | ||
2548 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2549 | set dummy xgettext; ac_word=$2 | |
2550 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 2551 | echo "configure:2552: checking for $ac_word" >&5 |
a2eb9d27 TT |
2552 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2553 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2554 | else | |
2555 | case "$XGETTEXT" in | |
2556 | /*) | |
2557 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2558 | ;; | |
2559 | *) | |
2560 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2561 | for ac_dir in $PATH; do | |
2562 | test -z "$ac_dir" && ac_dir=. | |
2563 | if test -f $ac_dir/$ac_word; then | |
2564 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2565 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2566 | break | |
2567 | fi | |
2568 | fi | |
2569 | done | |
2570 | IFS="$ac_save_ifs" | |
2571 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2572 | ;; | |
2573 | esac | |
2574 | fi | |
2575 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2576 | if test -n "$XGETTEXT"; then | |
2577 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2578 | else | |
2579 | echo "$ac_t""no" 1>&6 | |
2580 | fi | |
2581 | ||
2582 | ||
2583 | USE_INCLUDED_LIBINTL=yes | |
2584 | CATOBJEXT=.gmo | |
2585 | INSTOBJEXT=.mo | |
2586 | DATADIRNAME=share | |
2587 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2588 | INTLLIBS=$INTLDEPS | |
2589 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2590 | nls_cv_header_intl=libintl.h | |
2591 | nls_cv_header_libgt=libgettext.h | |
2592 | fi | |
5c04f4f7 | 2593 | |
a2eb9d27 TT |
2594 | if test "$XGETTEXT" != ":"; then |
2595 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2596 | : ; | |
2597 | else | |
2598 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2599 | XGETTEXT=":" | |
2600 | fi | |
2601 | fi | |
2602 | ||
2603 | # We need to process the po/ directory. | |
2604 | POSUB=po | |
2605 | else | |
2606 | DATADIRNAME=share | |
2607 | nls_cv_header_intl=libintl.h | |
2608 | nls_cv_header_libgt=libgettext.h | |
2609 | fi | |
2610 | ||
2611 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2612 | # because some of the sources are only built for this goal. | |
2613 | if test "$PACKAGE" = gettext; then | |
2614 | USE_NLS=yes | |
2615 | USE_INCLUDED_LIBINTL=yes | |
2616 | fi | |
2617 | ||
2618 | for lang in $ALL_LINGUAS; do | |
2619 | GMOFILES="$GMOFILES $lang.gmo" | |
2620 | POFILES="$POFILES $lang.po" | |
2621 | done | |
2622 | ||
2623 | ||
2624 | ||
2625 | ||
2626 | ||
2627 | ||
2628 | ||
2629 | ||
2630 | ||
2631 | ||
2632 | ||
2633 | ||
2634 | ||
2635 | ||
2636 | if test "x$CATOBJEXT" != "x"; then | |
2637 | if test "x$ALL_LINGUAS" = "x"; then | |
2638 | LINGUAS= | |
2639 | else | |
2640 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
8c59a22d | 2641 | echo "configure:2642: checking for catalogs to be installed" >&5 |
a2eb9d27 TT |
2642 | NEW_LINGUAS= |
2643 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2644 | case "$ALL_LINGUAS" in | |
2645 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2646 | esac | |
2647 | done | |
2648 | LINGUAS=$NEW_LINGUAS | |
2649 | echo "$ac_t""$LINGUAS" 1>&6 | |
2650 | fi | |
2651 | ||
2652 | if test -n "$LINGUAS"; then | |
2653 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2654 | fi | |
2655 | fi | |
2656 | ||
2657 | if test $ac_cv_header_locale_h = yes; then | |
2658 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2659 | else | |
2660 | INCLUDE_LOCALE_H="\ | |
2661 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2662 | fi | |
2663 | ||
2664 | ||
2665 | if test -f $srcdir/po2tbl.sed.in; then | |
2666 | if test "$CATOBJEXT" = ".cat"; then | |
2667 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2668 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
8c59a22d | 2669 | echo "configure:2670: checking for linux/version.h" >&5 |
a2eb9d27 | 2670 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
a72d2509 MM |
2671 | echo $ac_n "(cached) $ac_c" 1>&6 |
2672 | else | |
a2eb9d27 | 2673 | cat > conftest.$ac_ext <<EOF |
8c59a22d | 2674 | #line 2675 "configure" |
a2eb9d27 TT |
2675 | #include "confdefs.h" |
2676 | #include <linux/version.h> | |
2677 | EOF | |
2678 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
8c59a22d | 2679 | { (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a2eb9d27 TT |
2680 | ac_err=`grep -v '^ *+' conftest.out` |
2681 | if test -z "$ac_err"; then | |
2682 | rm -rf conftest* | |
2683 | eval "ac_cv_header_$ac_safe=yes" | |
a72d2509 | 2684 | else |
a2eb9d27 TT |
2685 | echo "$ac_err" >&5 |
2686 | echo "configure: failed program was:" >&5 | |
2687 | cat conftest.$ac_ext >&5 | |
2688 | rm -rf conftest* | |
2689 | eval "ac_cv_header_$ac_safe=no" | |
a72d2509 MM |
2690 | fi |
2691 | rm -f conftest* | |
a72d2509 | 2692 | fi |
a2eb9d27 TT |
2693 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2694 | echo "$ac_t""yes" 1>&6 | |
2695 | msgformat=linux | |
a72d2509 | 2696 | else |
a2eb9d27 TT |
2697 | echo "$ac_t""no" 1>&6 |
2698 | msgformat=xopen | |
a72d2509 MM |
2699 | fi |
2700 | ||
2701 | ||
a2eb9d27 TT |
2702 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed |
2703 | fi | |
2704 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2705 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2706 | fi | |
2707 | ||
2708 | if test "$PACKAGE" = "gettext"; then | |
2709 | GT_NO="#NO#" | |
2710 | GT_YES= | |
2711 | else | |
2712 | GT_NO= | |
2713 | GT_YES="#YES#" | |
2714 | fi | |
2715 | ||
2716 | ||
2717 | ||
2718 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2719 | ||
2720 | ||
2721 | l= | |
2722 | ||
2723 | ||
2724 | if test -d $srcdir/po; then | |
2725 | test -d po || mkdir po | |
2726 | if test "x$srcdir" != "x."; then | |
2727 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2728 | posrcprefix="$srcdir/" | |
2729 | else | |
2730 | posrcprefix="../$srcdir/" | |
2731 | fi | |
2732 | else | |
2733 | posrcprefix="../" | |
2734 | fi | |
2735 | rm -f po/POTFILES | |
2736 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2737 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2738 | fi | |
2739 | ||
5c04f4f7 MM |
2740 | |
2741 | ||
2742 | # Check whether --enable-sim-alignment or --disable-sim-alignment was given. | |
2743 | if test "${enable_sim_alignment+set}" = set; then | |
2744 | enableval="$enable_sim_alignment" | |
2745 | case "${enableval}" in | |
2746 | yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; | |
2747 | no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; | |
2748 | 0 | default | DEFAULT) sim_alignment="-DWITH_ALIGNMENT=0";; | |
2749 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";; | |
2750 | esac | |
2751 | if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then | |
2752 | echo "Setting alignment flags = $sim_alignment" 6>&1 | |
a72d2509 | 2753 | fi |
5c04f4f7 MM |
2754 | else |
2755 | sim_alignment="" | |
a72d2509 MM |
2756 | fi |
2757 | ||
a72d2509 | 2758 | |
5c04f4f7 MM |
2759 | # Check whether --enable-sim-assert or --disable-sim-assert was given. |
2760 | if test "${enable_sim_assert+set}" = set; then | |
2761 | enableval="$enable_sim_assert" | |
2762 | case "${enableval}" in | |
2763 | yes) sim_assert="-DWITH_ASSERT=1";; | |
2764 | no) sim_assert="-DWITH_ASSERT=0";; | |
2765 | *) { echo "configure: error: "--enable-sim-assert does not take a value"" 1>&2; exit 1; }; sim_assert="";; | |
2766 | esac | |
2767 | if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then | |
2768 | echo "Setting assert flags = $sim_assert" 6>&1 | |
2769 | fi | |
a72d2509 | 2770 | else |
5c04f4f7 | 2771 | sim_assert="" |
a72d2509 MM |
2772 | fi |
2773 | ||
5c04f4f7 MM |
2774 | |
2775 | # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given. | |
2776 | if test "${enable_sim_bitsize+set}" = set; then | |
2777 | enableval="$enable_sim_bitsize" | |
c494cadd | 2778 | case "${enableval}" in |
5c04f4f7 MM |
2779 | 32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";; |
2780 | *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; }; sim_bitsize="";; | |
c494cadd | 2781 | esac |
5c04f4f7 MM |
2782 | if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then |
2783 | echo "Setting bitsize flags = $sim_bitsize" 6>&1 | |
ba62bb1c | 2784 | fi |
c494cadd | 2785 | else |
5c04f4f7 | 2786 | sim_bitsize="" |
c494cadd MM |
2787 | fi |
2788 | ||
5c04f4f7 MM |
2789 | |
2790 | # Check whether --enable-sim-bswap or --disable-sim-bswap was given. | |
2791 | if test "${enable_sim_bswap+set}" = set; then | |
2792 | enableval="$enable_sim_bswap" | |
73c4941b | 2793 | case "${enableval}" in |
5c04f4f7 MM |
2794 | yes) sim_bswap="-DWITH_BSWAP=1";; |
2795 | no) sim_bswap="-DWITH_BSWAP=0";; | |
2796 | *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";; | |
73c4941b | 2797 | esac |
5c04f4f7 MM |
2798 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then |
2799 | echo "Setting bswap flags = $sim_bswap" 6>&1 | |
ba62bb1c | 2800 | fi |
73c4941b | 2801 | else |
5c04f4f7 | 2802 | sim_bswap="" |
73c4941b MM |
2803 | fi |
2804 | ||
5c04f4f7 MM |
2805 | |
2806 | # Check whether --enable-sim-cflags or --disable-sim-cflags was given. | |
2807 | if test "${enable_sim_cflags+set}" = set; then | |
2808 | enableval="$enable_sim_cflags" | |
30c87b55 | 2809 | case "${enableval}" in |
5c04f4f7 MM |
2810 | yes) sim_cflags="-O2 -fomit-frame-pointer";; |
2811 | no) sim_cflags="";; | |
2812 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
30c87b55 | 2813 | esac |
5c04f4f7 MM |
2814 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then |
2815 | echo "Setting sim cflags = $sim_cflags" 6>&1 | |
30c87b55 MM |
2816 | fi |
2817 | else | |
5c04f4f7 | 2818 | sim_cflags="" |
30c87b55 MM |
2819 | fi |
2820 | ||
5c04f4f7 | 2821 | |
c494cadd | 2822 | # Check whether --enable-sim-config or --disable-sim-config was given. |
1f1e5dd8 MM |
2823 | if test "${enable_sim_config+set}" = set; then |
2824 | enableval="$enable_sim_config" | |
c494cadd | 2825 | case "${enableval}" in |
a3114052 | 2826 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-config=file"" 1>&2; exit 1; };; |
813ad010 | 2827 | *) if test -f "${srcdir}/${enableval}"; then |
a3114052 | 2828 | sim_config="${enableval}"; |
813ad010 | 2829 | elif test -f "${srcdir}/${enableval}-config.h"; then |
a3114052 MM |
2830 | sim_config="${enableval}-config.h" |
2831 | else | |
2832 | { echo "configure: error: "Config file $enableval was not found"" 1>&2; exit 1; }; | |
2833 | sim_config=std-config.h | |
2834 | fi;; | |
c494cadd | 2835 | esac |
2bc7869d | 2836 | if test x"$silent" != x"yes" && test x"$sim_config" != x""; then |
ba62bb1c MM |
2837 | echo "Setting config flags = $sim_config" 6>&1 |
2838 | fi | |
c494cadd | 2839 | else |
a3114052 MM |
2840 | sim_config="std-config.h" |
2841 | if test x"$silent" != x"yes"; then | |
2842 | echo "Setting config flags = $sim_config" 6>&1 | |
2843 | fi | |
c494cadd MM |
2844 | fi |
2845 | ||
c494cadd | 2846 | |
d865fb6e MM |
2847 | # Check whether --enable-sim-decode-mechanism or --disable-sim-decode-mechanism was given. |
2848 | if test "${enable_sim_decode_mechanism+set}" = set; then | |
2849 | enableval="$enable_sim_decode_mechanism" | |
2850 | case "${enableval}" in | |
2851 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-decode-mechanism=file"" 1>&2; exit 1; };; | |
2852 | array|switch|padded-switch|goto-switch) sim_decode_mechanism="-T ${enableval}";; | |
2853 | *) { echo "configure: error: "File $enableval is not an opcode rules file"" 1>&2; exit 1; }; | |
2854 | sim_decode_mechanism="switch";; | |
2855 | esac | |
2856 | if test x"$silent" != x"yes" && test x"$sim_decode_mechanism" != x""; then | |
2857 | echo "Setting decode mechanism flags = $sim_decode_mechanism" 6>&1 | |
2858 | fi | |
2859 | else | |
2860 | sim_decode_mechanism="" | |
2861 | if test x"$silent" != x"yes"; then | |
2862 | echo "Setting decode mechanism flags = $sim_decode_mechanism" | |
2863 | fi | |
2864 | fi | |
2865 | ||
2866 | ||
5c04f4f7 MM |
2867 | # Check whether --enable-sim-default-model or --disable-sim-default-model was given. |
2868 | if test "${enable_sim_default_model+set}" = set; then | |
2869 | enableval="$enable_sim_default_model" | |
c494cadd | 2870 | case "${enableval}" in |
5c04f4f7 MM |
2871 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-default-model=model"" 1>&2; exit 1; };; |
2872 | *) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";; | |
c494cadd | 2873 | esac |
5c04f4f7 MM |
2874 | if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then |
2875 | echo "Setting default-model flags = $sim_default_model" 6>&1 | |
ba62bb1c | 2876 | fi |
c494cadd | 2877 | else |
d865fb6e | 2878 | sim_default_model="" |
c494cadd MM |
2879 | fi |
2880 | ||
5c04f4f7 | 2881 | |
c494cadd | 2882 | # Check whether --enable-sim-duplicate or --disable-sim-duplicate was given. |
1f1e5dd8 MM |
2883 | if test "${enable_sim_duplicate+set}" = set; then |
2884 | enableval="$enable_sim_duplicate" | |
c494cadd | 2885 | case "${enableval}" in |
30c87b55 | 2886 | yes) sim_dup="-E";; |
a3114052 MM |
2887 | no) sim_dup="";; |
2888 | *) { echo "configure: error: "--enable-sim-duplicate does not take a value"" 1>&2; exit 1; }; sim_dup="";; | |
c494cadd | 2889 | esac |
2bc7869d | 2890 | if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then |
ba62bb1c MM |
2891 | echo "Setting duplicate flags = $sim_dup" 6>&1 |
2892 | fi | |
c494cadd | 2893 | else |
30c87b55 | 2894 | sim_dup="-E" |
2bc7869d MM |
2895 | if test x"$silent" != x"yes"; then |
2896 | echo "Setting duplicate flags = $sim_dup" 6>&1 | |
2897 | fi | |
c494cadd MM |
2898 | fi |
2899 | ||
5c04f4f7 MM |
2900 | |
2901 | # Check whether --enable-sim-endian or --disable-sim-endian was given. | |
2902 | if test "${enable_sim_endian+set}" = set; then | |
2903 | enableval="$enable_sim_endian" | |
30c87b55 | 2904 | case "${enableval}" in |
5c04f4f7 MM |
2905 | yes) case "$target" in |
2906 | *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
2907 | *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
2908 | *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
2909 | esac;; | |
2910 | no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
2911 | b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
2912 | l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
2913 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";; | |
30c87b55 | 2914 | esac |
5c04f4f7 MM |
2915 | if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then |
2916 | echo "Setting endian flags = $sim_endian" 6>&1 | |
30c87b55 MM |
2917 | fi |
2918 | else | |
5c04f4f7 | 2919 | sim_endian="" |
30c87b55 | 2920 | fi |
5c04f4f7 MM |
2921 | |
2922 | ||
2923 | # Check whether --enable-sim-env or --disable-sim-env was given. | |
2924 | if test "${enable_sim_env+set}" = set; then | |
2925 | enableval="$enable_sim_env" | |
2926 | case "${enableval}" in | |
2927 | operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";; | |
2928 | virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";; | |
2929 | user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";; | |
2930 | no) sim_env="-DWITH_ENVIRONMENT=0";; | |
2931 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-env"" 1>&2; exit 1; }; sim_env="";; | |
2932 | esac | |
2933 | if test x"$silent" != x"yes" && test x"$sim_env" != x""; then | |
2934 | echo "Setting env flags = $sim_env" 6>&1 | |
30c87b55 | 2935 | fi |
5c04f4f7 MM |
2936 | else |
2937 | sim_env="" | |
2938 | fi | |
2939 | ||
30c87b55 | 2940 | |
c494cadd | 2941 | # Check whether --enable-sim-filter or --disable-sim-filter was given. |
1f1e5dd8 MM |
2942 | if test "${enable_sim_filter+set}" = set; then |
2943 | enableval="$enable_sim_filter" | |
c494cadd | 2944 | case "${enableval}" in |
a3114052 MM |
2945 | yes) { echo "configure: error: "--enable-sim-filter must be specified with a rule to filter or no"" 1>&2; exit 1; }; sim_filter="";; |
2946 | no) sim_filter="";; | |
30c87b55 | 2947 | *) sim_filter="-F $enableval";; |
c494cadd | 2948 | esac |
2bc7869d | 2949 | if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then |
ba62bb1c MM |
2950 | echo "Setting filter flags = $sim_filter" 6>&1 |
2951 | fi | |
c494cadd | 2952 | else |
5c04f4f7 | 2953 | sim_filter="-F 32,f,o" |
2bc7869d MM |
2954 | if test x"$silent" != x"yes"; then |
2955 | echo "Setting filter flags = $sim_filter" 6>&1 | |
2956 | fi | |
c494cadd MM |
2957 | fi |
2958 | ||
5c04f4f7 MM |
2959 | |
2960 | # Check whether --enable-sim-float or --disable-sim-float was given. | |
2961 | if test "${enable_sim_float+set}" = set; then | |
2962 | enableval="$enable_sim_float" | |
2963 | case "${enableval}" in | |
2964 | yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; | |
2965 | no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; | |
2966 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";; | |
c494cadd | 2967 | esac |
5c04f4f7 MM |
2968 | if test x"$silent" != x"yes" && test x"$sim_float" != x""; then |
2969 | echo "Setting float flags = $sim_float" 6>&1 | |
f2181eff | 2970 | fi |
c494cadd | 2971 | else |
5c04f4f7 | 2972 | sim_float="" |
c494cadd MM |
2973 | fi |
2974 | ||
5c04f4f7 | 2975 | |
2e913166 MM |
2976 | # Check whether --enable-sim-hardware or --disable-sim-hardware was given. |
2977 | if test "${enable_sim_hardware+set}" = set; then | |
2978 | enableval="$enable_sim_hardware" | |
5c04f4f7 | 2979 | hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide" |
2e913166 MM |
2980 | case "${enableval}" in |
2981 | yes) ;; | |
2982 | no) { echo "configure: error: "List of hardware must be specified for --enable-sim-hardware"" 1>&2; exit 1; }; hardware="";; | |
2983 | ,*) hardware="${hardware}${enableval}";; | |
5c04f4f7 MM |
2984 | *,) hardware="${enableval}${hardware}";; |
2985 | *) hardware="${enableval}"'';; | |
2e913166 MM |
2986 | esac |
2987 | sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'` | |
2988 | sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'` | |
2989 | if test x"$silent" != x"yes" && test x"$hardware" != x""; then | |
2990 | echo "Setting hardware to $sim_hw_src, $sim_hw_obj" | |
2991 | fi | |
2992 | else | |
5c04f4f7 | 2993 | hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide" |
2e913166 MM |
2994 | sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'` |
2995 | sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'` | |
2996 | if test x"$silent" != x"yes"; then | |
2997 | echo "Setting hardware to $sim_hw_src, $sim_hw_obj" | |
2998 | fi | |
2999 | fi | |
3000 | ||
3001 | ||
5c04f4f7 MM |
3002 | # Check whether --enable-sim-hostbitsize or --disable-sim-hostbitsize was given. |
3003 | if test "${enable_sim_hostbitsize+set}" = set; then | |
3004 | enableval="$enable_sim_hostbitsize" | |
c494cadd | 3005 | case "${enableval}" in |
5c04f4f7 MM |
3006 | 32|64) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";; |
3007 | *) { echo "configure: error: "--enable-sim-hostbitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; }; sim_hostbitsize="";; | |
c494cadd | 3008 | esac |
5c04f4f7 MM |
3009 | if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then |
3010 | echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1 | |
ba62bb1c | 3011 | fi |
c494cadd | 3012 | else |
5c04f4f7 | 3013 | sim_hostbitsize="" |
c494cadd MM |
3014 | fi |
3015 | ||
2e913166 | 3016 | |
c494cadd | 3017 | # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given. |
1f1e5dd8 MM |
3018 | if test "${enable_sim_hostendian+set}" = set; then |
3019 | enableval="$enable_sim_hostendian" | |
c494cadd MM |
3020 | case "${enableval}" in |
3021 | no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; | |
3022 | b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; | |
3023 | l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; | |
a3114052 | 3024 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";; |
c494cadd | 3025 | esac |
2bc7869d | 3026 | if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then |
ba62bb1c MM |
3027 | echo "Setting hostendian flags = $sim_hostendian" 6>&1 |
3028 | fi | |
c494cadd | 3029 | else |
a72d2509 MM |
3030 | |
3031 | if test "x$cross_compiling" = "xno"; then | |
3032 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 | |
8c59a22d | 3033 | echo "configure:3034: checking whether byte ordering is bigendian" >&5 |
a72d2509 MM |
3034 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3035 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3036 | else | |
3037 | ac_cv_c_bigendian=unknown | |
3038 | # See if sys/param.h defines the BYTE_ORDER macro. | |
3039 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3040 | #line 3041 "configure" |
a72d2509 MM |
3041 | #include "confdefs.h" |
3042 | #include <sys/types.h> | |
3043 | #include <sys/param.h> | |
5c04f4f7 | 3044 | int main() { |
a72d2509 MM |
3045 | |
3046 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN | |
3047 | bogus endian macros | |
3048 | #endif | |
3049 | ; return 0; } | |
3050 | EOF | |
8c59a22d | 3051 | if { (eval echo configure:3052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a72d2509 MM |
3052 | rm -rf conftest* |
3053 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
3054 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3055 | #line 3056 "configure" |
a72d2509 MM |
3056 | #include "confdefs.h" |
3057 | #include <sys/types.h> | |
3058 | #include <sys/param.h> | |
5c04f4f7 | 3059 | int main() { |
a72d2509 MM |
3060 | |
3061 | #if BYTE_ORDER != BIG_ENDIAN | |
3062 | not big endian | |
3063 | #endif | |
3064 | ; return 0; } | |
3065 | EOF | |
8c59a22d | 3066 | if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
a72d2509 MM |
3067 | rm -rf conftest* |
3068 | ac_cv_c_bigendian=yes | |
3069 | else | |
5c04f4f7 MM |
3070 | echo "configure: failed program was:" >&5 |
3071 | cat conftest.$ac_ext >&5 | |
a72d2509 MM |
3072 | rm -rf conftest* |
3073 | ac_cv_c_bigendian=no | |
3074 | fi | |
3075 | rm -f conftest* | |
5c04f4f7 MM |
3076 | else |
3077 | echo "configure: failed program was:" >&5 | |
3078 | cat conftest.$ac_ext >&5 | |
a72d2509 MM |
3079 | fi |
3080 | rm -f conftest* | |
a72d2509 MM |
3081 | if test $ac_cv_c_bigendian = unknown; then |
3082 | if test "$cross_compiling" = yes; then | |
3083 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } | |
3084 | else | |
5c04f4f7 | 3085 | cat > conftest.$ac_ext <<EOF |
8c59a22d | 3086 | #line 3087 "configure" |
a72d2509 MM |
3087 | #include "confdefs.h" |
3088 | main () { | |
3089 | /* Are we little or big endian? From Harbison&Steele. */ | |
3090 | union | |
3091 | { | |
3092 | long l; | |
3093 | char c[sizeof (long)]; | |
3094 | } u; | |
3095 | u.l = 1; | |
3096 | exit (u.c[sizeof (long) - 1] == 1); | |
3097 | } | |
3098 | EOF | |
8c59a22d | 3099 | if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
5c04f4f7 | 3100 | then |
a72d2509 MM |
3101 | ac_cv_c_bigendian=no |
3102 | else | |
5c04f4f7 MM |
3103 | echo "configure: failed program was:" >&5 |
3104 | cat conftest.$ac_ext >&5 | |
3105 | rm -fr conftest* | |
a72d2509 MM |
3106 | ac_cv_c_bigendian=yes |
3107 | fi | |
a72d2509 | 3108 | rm -fr conftest* |
5c04f4f7 MM |
3109 | fi |
3110 | ||
a72d2509 MM |
3111 | fi |
3112 | fi | |
3113 | ||
3114 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
3115 | if test $ac_cv_c_bigendian = yes; then | |
3116 | cat >> confdefs.h <<\EOF | |
3117 | #define WORDS_BIGENDIAN 1 | |
3118 | EOF | |
3119 | ||
3120 | fi | |
0c18e3f0 | 3121 | |
a72d2509 MM |
3122 | if test $ac_cv_c_bigendian = yes; then |
3123 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" | |
3124 | else | |
3125 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" | |
3126 | fi | |
3127 | else | |
3128 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" | |
3129 | fi | |
c494cadd MM |
3130 | fi |
3131 | ||
5c04f4f7 MM |
3132 | |
3133 | # Check whether --enable-sim-icache or --disable-sim-icache was given. | |
3134 | if test "${enable_sim_icache+set}" = set; then | |
3135 | enableval="$enable_sim_icache" | |
3136 | icache="-R" | |
3137 | case "${enableval}" in | |
3138 | yes) icache="1024"; sim_icache="-I $icache";; | |
3139 | no) sim_icache="-R";; | |
3140 | *) icache=1024 | |
3141 | sim_icache="-" | |
3142 | for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do | |
3143 | case "$x" in | |
3144 | define) sim_icache="${sim_icache}R";; | |
3145 | semantic) sim_icache="${sim_icache}C";; | |
3146 | insn) sim_icache="${sim_icache}S";; | |
3147 | 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;; | |
3148 | *) { echo "configure: error: "Unknown value $x for --enable-sim-icache"" 1>&2; exit 1; }; sim_icache="";; | |
3149 | esac | |
3150 | done | |
3151 | sim_icache="${sim_icache}I $icache";; | |
3152 | esac | |
3153 | if test x"$silent" != x"yes" && test x"$icache" != x""; then | |
3154 | echo "Setting instruction cache size to $icache ($sim_icache)" | |
3155 | fi | |
3156 | else | |
3157 | sim_icache="-CSRI 1024" | |
3158 | if test x"$silent" != x"yes"; then | |
3159 | echo "Setting instruction cache size to 1024 ($sim_icache)" | |
3160 | fi | |
3161 | fi | |
3162 | ||
3163 | ||
3164 | # Check whether --enable-sim-inline or --disable-sim-inline was given. | |
3165 | if test "${enable_sim_inline+set}" = set; then | |
3166 | enableval="$enable_sim_inline" | |
3167 | sim_inline="" | |
3168 | case "$enableval" in | |
3169 | no) sim_inline="-DDEFAULT_INLINE=0";; | |
3170 | 0) sim_inline="-DDEFAULT_INLINE=0";; | |
3171 | yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";; | |
3172 | 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";; | |
3173 | *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
3174 | new_flag="" | |
3175 | case "$x" in | |
3176 | *_INLINE=*) new_flag="-D$x";; | |
3177 | *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;; | |
3178 | *_INLINE) new_flag="-D$x=ALL_INLINE";; | |
3179 | *) new_flag="-D$x""_INLINE=ALL_INLINE";; | |
3180 | esac | |
3181 | if test x"$sim_inline" = x""; then | |
3182 | sim_inline="$new_flag" | |
3183 | else | |
3184 | sim_inline="$sim_inline $new_flag" | |
3185 | fi | |
3186 | done;; | |
3187 | esac | |
3188 | if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then | |
3189 | echo "Setting inline flags = $sim_inline" 6>&1 | |
3190 | fi | |
3191 | else | |
3192 | if test x"$GCC" != ""; then | |
3193 | sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS" | |
3194 | if test x"$silent" != x"yes"; then | |
3195 | echo "Setting inline flags = $sim_inline" 6>&1 | |
3196 | fi | |
3197 | else | |
3198 | sim_inline="" | |
3199 | fi | |
3200 | fi | |
3201 | ||
3202 | ||
3203 | # Check whether --enable-sim-jump or --disable-sim-jump was given. | |
3204 | if test "${enable_sim_jump+set}" = set; then | |
3205 | enableval="$enable_sim_jump" | |
3206 | case "${enableval}" in | |
3207 | yes) sim_jump="-J";; | |
3208 | no) sim_jump="";; | |
3209 | *) { echo "configure: error: "--enable-sim-jump does not take a value"" 1>&2; exit 1; }; sim_jump="";; | |
3210 | esac | |
3211 | if test x"$silent" != x"yes" && test x"$sim_jump" != x""; then | |
3212 | echo "Setting jump flag = $sim_jump" 6>&1 | |
3213 | fi | |
3214 | else | |
3215 | sim_jump="" | |
3216 | if test x"$silent" != x"yes"; then | |
3217 | echo "Setting jump flag = $sim_jump" 6>&1 | |
3218 | fi | |
3219 | fi | |
3220 | ||
3221 | ||
3222 | # Check whether --enable-sim-line-nr or --disable-sim-line-nr was given. | |
3223 | if test "${enable_sim_line_nr+set}" = set; then | |
3224 | enableval="$enable_sim_line_nr" | |
3225 | case "${enableval}" in | |
3226 | yes) sim_line_nr="";; | |
3227 | no) sim_line_nr="-L";; | |
3228 | *) { echo "configure: error: "--enable-sim-line-nr does not take a value"" 1>&2; exit 1; }; sim_line_nr="";; | |
3229 | esac | |
3230 | if test x"$silent" != x"yes" && test x"$sim_line_nr" != x""; then | |
3231 | echo "Setting warning flags = $sim_line_nr" 6>&1 | |
3232 | fi | |
3233 | else | |
3234 | sim_line_nr="" | |
3235 | fi | |
3236 | ||
3237 | ||
3238 | # Check whether --enable-sim-model or --disable-sim-model was given. | |
3239 | if test "${enable_sim_model+set}" = set; then | |
3240 | enableval="$enable_sim_model" | |
3241 | case "${enableval}" in | |
3242 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-model=model"" 1>&2; exit 1; };; | |
3243 | *) sim_model="-DWITH_MODEL=${enableval}";; | |
3244 | esac | |
3245 | if test x"$silent" != x"yes" && test x"$sim_model" != x""; then | |
3246 | echo "Setting model flags = $sim_model" 6>&1 | |
3247 | fi | |
3248 | else | |
3249 | sim_model="" | |
3250 | fi | |
3251 | ||
3252 | ||
3253 | # Check whether --enable-sim-model-issue or --disable-sim-model-issue was given. | |
3254 | if test "${enable_sim_model_issue+set}" = set; then | |
3255 | enableval="$enable_sim_model_issue" | |
3256 | case "${enableval}" in | |
3257 | yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";; | |
3258 | no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";; | |
3259 | *) { echo "configure: error: "--enable-sim-model-issue does not take a value"" 1>&2; exit 1; }; sim_model_issue="";; | |
3260 | esac | |
3261 | if test x"$silent" != x"yes"; then | |
3262 | echo "Setting model-issue flags = $sim_model_issue" 6>&1 | |
3263 | fi | |
3264 | else | |
3265 | sim_model_issue="" | |
3266 | fi | |
3267 | ||
3268 | ||
3269 | # Check whether --enable-sim-monitor or --disable-sim-monitor was given. | |
3270 | if test "${enable_sim_monitor+set}" = set; then | |
3271 | enableval="$enable_sim_monitor" | |
3272 | case "${enableval}" in | |
3273 | yes) sim_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";; | |
3274 | no) sim_monitor="-DWITH_MON=0";; | |
3275 | instruction) sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";; | |
3276 | memory) sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";; | |
3277 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-mon"" 1>&2; exit 1; }; sim_env="";; | |
3278 | esac | |
3279 | if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then | |
3280 | echo "Setting monitor flags = $sim_monitor" 6>&1 | |
3281 | fi | |
3282 | else | |
3283 | sim_monitor="" | |
3284 | fi | |
3285 | ||
3286 | ||
3287 | # Check whether --enable-sim-opcode or --disable-sim-opcode was given. | |
3288 | if test "${enable_sim_opcode+set}" = set; then | |
3289 | enableval="$enable_sim_opcode" | |
3290 | case "${enableval}" in | |
3291 | yes|no) { echo "configure: error: "No value supplied for --enable-sim-opcode=file"" 1>&2; exit 1; };; | |
3292 | *) if test -f "${srcdir}/${enableval}"; then | |
3293 | sim_opcode="${enableval}" | |
d865fb6e MM |
3294 | elif test -f "${srcdir}/dc-${enableval}"; then |
3295 | sim_opcode="dc-${enableval}" | |
5c04f4f7 MM |
3296 | else |
3297 | { echo "configure: error: "File $enableval is not an opcode rules file"" 1>&2; exit 1; }; | |
d865fb6e | 3298 | sim_opcode="dc-complex" |
5c04f4f7 MM |
3299 | fi;; |
3300 | esac | |
3301 | if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then | |
3302 | echo "Setting opcode flags = $sim_opcode" 6>&1 | |
3303 | fi | |
3304 | else | |
d865fb6e | 3305 | sim_opcode="dc-complex" |
5c04f4f7 MM |
3306 | if test x"$silent" != x"yes"; then |
3307 | echo "Setting opcode flags = $sim_opcode" | |
3308 | fi | |
3309 | fi | |
3310 | ||
3311 | ||
3312 | # Check whether --enable-sim-packages or --disable-sim-packages was given. | |
3313 | if test "${enable_sim_packages+set}" = set; then | |
3314 | enableval="$enable_sim_packages" | |
3315 | packages=disklabel | |
3316 | case "${enableval}" in | |
3317 | yes) ;; | |
3318 | no) { echo "configure: error: "List of packages must be specified for --enable-sim-packages"" 1>&2; exit 1; }; packages="";; | |
3319 | ,*) packages="${packages}${enableval}";; | |
3320 | *,) packages="${enableval}${packages}";; | |
3321 | *) packages="${enableval}"'';; | |
3322 | esac | |
3323 | sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` | |
3324 | sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` | |
3325 | if test x"$silent" != x"yes" && test x"$packages" != x""; then | |
3326 | echo "Setting packages to $sim_pk_src, $sim_pk_obj" | |
3327 | fi | |
3328 | else | |
3329 | packages=disklabel | |
3330 | sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` | |
3331 | sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` | |
3332 | if test x"$silent" != x"yes"; then | |
3333 | echo "Setting packages to $sim_pk_src, $sim_pk_obj" | |
3334 | fi | |
3335 | fi | |
3336 | ||
3337 | ||
3338 | # Check whether --enable-sim-regparm or --disable-sim-regparm was given. | |
3339 | if test "${enable_sim_regparm+set}" = set; then | |
3340 | enableval="$enable_sim_regparm" | |
3341 | case "${enableval}" in | |
3342 | 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";; | |
3343 | no) sim_regparm="" ;; | |
3344 | yes) sim_regparm="-DWITH_REGPARM=3";; | |
3345 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-regparm"" 1>&2; exit 1; }; sim_regparm="";; | |
3346 | esac | |
3347 | if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then | |
3348 | echo "Setting regparm flags = $sim_regparm" 6>&1 | |
3349 | fi | |
3350 | else | |
3351 | sim_regparm="" | |
3352 | fi | |
3353 | ||
3354 | ||
3355 | # Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given. | |
3356 | if test "${enable_sim_reserved_bits+set}" = set; then | |
3357 | enableval="$enable_sim_reserved_bits" | |
3358 | case "${enableval}" in | |
3359 | yes) sim_reserved="-DWITH_RESERVED_BITS=1";; | |
3360 | no) sim_reserved="-DWITH_RESERVED_BITS=0";; | |
3361 | *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved="";; | |
3362 | esac | |
3363 | if test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then | |
3364 | echo "Setting reserved flags = $sim_reserved" 6>&1 | |
3365 | fi | |
3366 | else | |
3367 | sim_reserved="" | |
3368 | fi | |
3369 | ||
3370 | ||
c494cadd | 3371 | # Check whether --enable-sim-smp or --disable-sim-smp was given. |
1f1e5dd8 MM |
3372 | if test "${enable_sim_smp+set}" = set; then |
3373 | enableval="$enable_sim_smp" | |
c494cadd | 3374 | case "${enableval}" in |
30c87b55 MM |
3375 | yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";; |
3376 | no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";; | |
3377 | *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";; | |
c494cadd | 3378 | esac |
2bc7869d | 3379 | if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then |
ba62bb1c MM |
3380 | echo "Setting smp flags = $sim_smp" 6>&1 |
3381 | fi | |
c494cadd | 3382 | else |
30c87b55 | 3383 | sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5" |
2bc7869d MM |
3384 | if test x"$silent" != x"yes"; then |
3385 | echo "Setting smp flags = $sim_smp" 6>&1 | |
3386 | fi | |
c494cadd MM |
3387 | fi |
3388 | ||
f2181eff | 3389 | |
5c04f4f7 MM |
3390 | # Check whether --enable-sim-stdcall or --disable-sim-stdcall was given. |
3391 | if test "${enable_sim_stdcall+set}" = set; then | |
3392 | enableval="$enable_sim_stdcall" | |
c494cadd | 3393 | case "${enableval}" in |
5c04f4f7 MM |
3394 | no) sim_stdcall="" ;; |
3395 | std*) sim_stdcall="-DWITH_STDCALL=1";; | |
3396 | yes) sim_stdcall="-DWITH_STDCALL=1";; | |
3397 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-stdcall"" 1>&2; exit 1; }; sim_stdcall="";; | |
c494cadd | 3398 | esac |
5c04f4f7 MM |
3399 | if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then |
3400 | echo "Setting function call flags = $sim_stdcall" 6>&1 | |
ba62bb1c | 3401 | fi |
c494cadd | 3402 | else |
5c04f4f7 | 3403 | sim_stdcall="" |
c494cadd MM |
3404 | fi |
3405 | ||
5c04f4f7 MM |
3406 | |
3407 | # Check whether --enable-sim-stdio or --disable-sim-stdio was given. | |
3408 | if test "${enable_sim_stdio+set}" = set; then | |
3409 | enableval="$enable_sim_stdio" | |
c494cadd | 3410 | case "${enableval}" in |
5c04f4f7 MM |
3411 | yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; |
3412 | no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; | |
3413 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";; | |
c494cadd | 3414 | esac |
5c04f4f7 MM |
3415 | if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then |
3416 | echo "Setting stdio flags = $sim_stdio" 6>&1 | |
ba62bb1c | 3417 | fi |
c494cadd | 3418 | else |
5c04f4f7 | 3419 | sim_stdio="" |
c494cadd MM |
3420 | fi |
3421 | ||
5c04f4f7 MM |
3422 | |
3423 | # Check whether --enable-sim-switch or --disable-sim-switch was given. | |
3424 | if test "${enable_sim_switch+set}" = set; then | |
3425 | enableval="$enable_sim_switch" | |
c494cadd | 3426 | case "${enableval}" in |
5c04f4f7 MM |
3427 | yes) sim_switch="-s";; |
3428 | no) sim_switch="";; | |
3429 | *) { echo "configure: error: "--enable-sim-switch does not take a value"" 1>&2; exit 1; }; sim_switch="";; | |
c494cadd | 3430 | esac |
5c04f4f7 MM |
3431 | if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then |
3432 | echo "Setting switch flags = $sim_switch" 6>&1 | |
ba62bb1c | 3433 | fi |
c494cadd | 3434 | else |
5c04f4f7 MM |
3435 | sim_switch=""; |
3436 | if test x"$silent" != x"yes"; then | |
3437 | echo "Setting switch flags = $sim_switch" 6>&1 | |
3438 | fi | |
c494cadd MM |
3439 | fi |
3440 | ||
5c04f4f7 | 3441 | |
c494cadd | 3442 | # Check whether --enable-sim-timebase or --disable-sim-timebase was given. |
1f1e5dd8 MM |
3443 | if test "${enable_sim_timebase+set}" = set; then |
3444 | enableval="$enable_sim_timebase" | |
c494cadd MM |
3445 | case "${enableval}" in |
3446 | yes) sim_timebase="-DWITH_TIME_BASE=1";; | |
3447 | no) sim_timebase="-DWITH_TIME_BASE=0";; | |
a3114052 | 3448 | *) { echo "configure: error: "--enable-sim-timebase does not take a value"" 1>&2; exit 1; }; sim_timebase="";; |
c494cadd | 3449 | esac |
2bc7869d | 3450 | if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then |
ba62bb1c MM |
3451 | echo "Setting timebase flags = $sim_timebase" 6>&1 |
3452 | fi | |
c494cadd MM |
3453 | else |
3454 | sim_timebase="" | |
3455 | fi | |
3456 | ||
c494cadd MM |
3457 | |
3458 | # Check whether --enable-sim-trace or --disable-sim-trace was given. | |
1f1e5dd8 MM |
3459 | if test "${enable_sim_trace+set}" = set; then |
3460 | enableval="$enable_sim_trace" | |
c494cadd MM |
3461 | case "${enableval}" in |
3462 | yes) sim_trace="-DWITH_TRACE=1";; | |
3463 | no) sim_trace="-DWITH_TRACE=0";; | |
a3114052 | 3464 | *) { echo "configure: error: "--enable-sim-trace does not take a value"" 1>&2; exit 1; }; sim_trace="";; |
c494cadd | 3465 | esac |
2bc7869d | 3466 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then |
ba62bb1c MM |
3467 | echo "Setting trace flags = $sim_trace" 6>&1 |
3468 | fi | |
c494cadd MM |
3469 | else |
3470 | sim_trace="" | |
3471 | fi | |
3472 | ||
c494cadd | 3473 | |
5c04f4f7 MM |
3474 | # Check whether --enable-sim-warnings or --disable-sim-warnings was given. |
3475 | if test "${enable_sim_warnings+set}" = set; then | |
3476 | enableval="$enable_sim_warnings" | |
73c4941b | 3477 | case "${enableval}" in |
5c04f4f7 MM |
3478 | yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";; |
3479 | no) sim_warnings="-w";; | |
3480 | *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
73c4941b | 3481 | esac |
5c04f4f7 MM |
3482 | if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then |
3483 | echo "Setting warning flags = $sim_warnings" 6>&1 | |
ba62bb1c | 3484 | fi |
73c4941b | 3485 | else |
5c04f4f7 | 3486 | sim_warnings="" |
73c4941b MM |
3487 | fi |
3488 | ||
73c4941b | 3489 | |
5c04f4f7 MM |
3490 | # Check whether --enable-sim-xor-endian or --disable-sim-xor-endian was given. |
3491 | if test "${enable_sim_xor_endian+set}" = set; then | |
3492 | enableval="$enable_sim_xor_endian" | |
f2181eff | 3493 | case "${enableval}" in |
5c04f4f7 MM |
3494 | yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";; |
3495 | no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";; | |
3496 | *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";; | |
f2181eff | 3497 | esac |
5c04f4f7 MM |
3498 | if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then |
3499 | echo "Setting xor-endian flag = $sim_xor_endian" 6>&1 | |
f2181eff MM |
3500 | fi |
3501 | else | |
5c04f4f7 | 3502 | sim_xor_endian="" |
f2181eff MM |
3503 | fi |
3504 | ||
a72d2509 | 3505 | |
4f965b81 MM |
3506 | ac_aux_dir= |
3507 | for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do | |
3508 | if test -f $ac_dir/install-sh; then | |
3509 | ac_aux_dir=$ac_dir | |
3510 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
3511 | break | |
3512 | elif test -f $ac_dir/install.sh; then | |
3513 | ac_aux_dir=$ac_dir | |
3514 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
3515 | break | |
3516 | fi | |
3517 | done | |
3518 | if test -z "$ac_aux_dir"; then | |
3519 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; } | |
3520 | fi | |
3521 | ac_config_guess=$ac_aux_dir/config.guess | |
3522 | ac_config_sub=$ac_aux_dir/config.sub | |
3523 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
3524 | ||
3525 | ||
3526 | # Do some error checking and defaulting for the host and target type. | |
3527 | # The inputs are: | |
3528 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
3529 | # | |
3530 | # The rules are: | |
3531 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1f1e5dd8 | 3532 | # same time. |
4f965b81 MM |
3533 | # 2. Host defaults to nonopt. |
3534 | # 3. If nonopt is not specified, then host defaults to the current host, | |
3535 | # as determined by config.guess. | |
3536 | # 4. Target and build default to nonopt. | |
3537 | # 5. If nonopt is not specified, then target and build default to host. | |
3538 | ||
3539 | # The aliases save the names the user supplied, while $host etc. | |
3540 | # will get canonicalized. | |
3541 | case $host---$target---$nonopt in | |
3542 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
3543 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
3544 | esac | |
3545 | ||
3546 | ||
3547 | # Make sure we can run config.sub. | |
d865fb6e | 3548 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
4f965b81 MM |
3549 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
3550 | fi | |
3551 | ||
3552 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
8c59a22d | 3553 | echo "configure:3554: checking host system type" >&5 |
4f965b81 MM |
3554 | |
3555 | host_alias=$host | |
3556 | case "$host_alias" in | |
3557 | NONE) | |
3558 | case $nonopt in | |
3559 | NONE) | |
d865fb6e | 3560 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
4f965b81 MM |
3561 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
3562 | fi ;; | |
3563 | *) host_alias=$nonopt ;; | |
3564 | esac ;; | |
3565 | esac | |
3566 | ||
d865fb6e | 3567 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
5c04f4f7 MM |
3568 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
3569 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3570 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
4f965b81 MM |
3571 | echo "$ac_t""$host" 1>&6 |
3572 | ||
3573 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
8c59a22d | 3574 | echo "configure:3575: checking target system type" >&5 |
4f965b81 MM |
3575 | |
3576 | target_alias=$target | |
3577 | case "$target_alias" in | |
3578 | NONE) | |
3579 | case $nonopt in | |
3580 | NONE) target_alias=$host_alias ;; | |
3581 | *) target_alias=$nonopt ;; | |
3582 | esac ;; | |
3583 | esac | |
3584 | ||
d865fb6e | 3585 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
5c04f4f7 MM |
3586 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
3587 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3588 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
4f965b81 MM |
3589 | echo "$ac_t""$target" 1>&6 |
3590 | ||
3591 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
8c59a22d | 3592 | echo "configure:3593: checking build system type" >&5 |
4f965b81 MM |
3593 | |
3594 | build_alias=$build | |
3595 | case "$build_alias" in | |
3596 | NONE) | |
3597 | case $nonopt in | |
3598 | NONE) build_alias=$host_alias ;; | |
3599 | *) build_alias=$nonopt ;; | |
3600 | esac ;; | |
3601 | esac | |
3602 | ||
d865fb6e | 3603 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
5c04f4f7 MM |
3604 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
3605 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3606 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
4f965b81 MM |
3607 | echo "$ac_t""$build" 1>&6 |
3608 | ||
3609 | test "$host_alias" != "$target_alias" && | |
3610 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
3611 | NONENONEs,x,x, && | |
3612 | program_prefix=${target_alias}- | |
3613 | ||
3614 | if test "$program_transform_name" = s,x,x,; then | |
3615 | program_transform_name= | |
3616 | else | |
1f1e5dd8 MM |
3617 | # Double any \ or $. echo might interpret backslashes. |
3618 | cat <<\EOF_SED > conftestsed | |
3619 | s,\\,\\\\,g; s,\$,$$,g | |
3620 | EOF_SED | |
4f965b81 MM |
3621 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
3622 | rm -f conftestsed | |
3623 | fi | |
3624 | test "$program_prefix" != NONE && | |
3625 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3626 | # Use a double $ so make ignores it. | |
3627 | test "$program_suffix" != NONE && | |
3628 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3629 | ||
3630 | # sed with no file args requires a program. | |
3631 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3632 | ||
3633 | ||
3634 | . ${srcdir}/../../bfd/configure.host | |
a72d2509 | 3635 | |
c494cadd MM |
3636 | |
3637 | ||
0c18e3f0 | 3638 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
8c59a22d | 3639 | echo "configure:3640: checking for st_blksize in struct stat" >&5 |
0c18e3f0 MM |
3640 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
3641 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3642 | else | |
3643 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3644 | #line 3645 "configure" |
0c18e3f0 MM |
3645 | #include "confdefs.h" |
3646 | #include <sys/types.h> | |
3647 | #include <sys/stat.h> | |
5c04f4f7 | 3648 | int main() { |
0c18e3f0 MM |
3649 | struct stat s; s.st_blksize; |
3650 | ; return 0; } | |
3651 | EOF | |
8c59a22d | 3652 | if { (eval echo configure:3653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
3653 | rm -rf conftest* |
3654 | ac_cv_struct_st_blksize=yes | |
3655 | else | |
5c04f4f7 MM |
3656 | echo "configure: failed program was:" >&5 |
3657 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
3658 | rm -rf conftest* |
3659 | ac_cv_struct_st_blksize=no | |
3660 | fi | |
3661 | rm -f conftest* | |
0c18e3f0 MM |
3662 | fi |
3663 | ||
3664 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 | |
3665 | if test $ac_cv_struct_st_blksize = yes; then | |
3666 | cat >> confdefs.h <<\EOF | |
3667 | #define HAVE_ST_BLKSIZE 1 | |
3668 | EOF | |
3669 | ||
3670 | fi | |
3671 | ||
3672 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 | |
8c59a22d | 3673 | echo "configure:3674: checking for st_blocks in struct stat" >&5 |
0c18e3f0 MM |
3674 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
3675 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3676 | else | |
3677 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3678 | #line 3679 "configure" |
0c18e3f0 MM |
3679 | #include "confdefs.h" |
3680 | #include <sys/types.h> | |
3681 | #include <sys/stat.h> | |
5c04f4f7 | 3682 | int main() { |
0c18e3f0 MM |
3683 | struct stat s; s.st_blocks; |
3684 | ; return 0; } | |
3685 | EOF | |
8c59a22d | 3686 | if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
3687 | rm -rf conftest* |
3688 | ac_cv_struct_st_blocks=yes | |
3689 | else | |
5c04f4f7 MM |
3690 | echo "configure: failed program was:" >&5 |
3691 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
3692 | rm -rf conftest* |
3693 | ac_cv_struct_st_blocks=no | |
3694 | fi | |
3695 | rm -f conftest* | |
0c18e3f0 MM |
3696 | fi |
3697 | ||
3698 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 | |
3699 | if test $ac_cv_struct_st_blocks = yes; then | |
3700 | cat >> confdefs.h <<\EOF | |
3701 | #define HAVE_ST_BLOCKS 1 | |
3702 | EOF | |
3703 | ||
3704 | else | |
3705 | LIBOBJS="$LIBOBJS fileblocks.o" | |
3706 | fi | |
3707 | ||
3708 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 | |
8c59a22d | 3709 | echo "configure:3710: checking for st_rdev in struct stat" >&5 |
0c18e3f0 MM |
3710 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
3711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3712 | else | |
3713 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3714 | #line 3715 "configure" |
0c18e3f0 MM |
3715 | #include "confdefs.h" |
3716 | #include <sys/types.h> | |
3717 | #include <sys/stat.h> | |
5c04f4f7 | 3718 | int main() { |
0c18e3f0 MM |
3719 | struct stat s; s.st_rdev; |
3720 | ; return 0; } | |
3721 | EOF | |
8c59a22d | 3722 | if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
3723 | rm -rf conftest* |
3724 | ac_cv_struct_st_rdev=yes | |
3725 | else | |
5c04f4f7 MM |
3726 | echo "configure: failed program was:" >&5 |
3727 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
3728 | rm -rf conftest* |
3729 | ac_cv_struct_st_rdev=no | |
3730 | fi | |
3731 | rm -f conftest* | |
0c18e3f0 MM |
3732 | fi |
3733 | ||
3734 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 | |
3735 | if test $ac_cv_struct_st_rdev = yes; then | |
3736 | cat >> confdefs.h <<\EOF | |
3737 | #define HAVE_ST_RDEV 1 | |
3738 | EOF | |
3739 | ||
3740 | fi | |
3741 | ||
3742 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 | |
8c59a22d | 3743 | echo "configure:3744: checking whether struct tm is in sys/time.h or time.h" >&5 |
0c18e3f0 MM |
3744 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
3745 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3746 | else | |
3747 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3748 | #line 3749 "configure" |
0c18e3f0 MM |
3749 | #include "confdefs.h" |
3750 | #include <sys/types.h> | |
3751 | #include <time.h> | |
5c04f4f7 | 3752 | int main() { |
0c18e3f0 MM |
3753 | struct tm *tp; tp->tm_sec; |
3754 | ; return 0; } | |
3755 | EOF | |
8c59a22d | 3756 | if { (eval echo configure:3757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
3757 | rm -rf conftest* |
3758 | ac_cv_struct_tm=time.h | |
3759 | else | |
5c04f4f7 MM |
3760 | echo "configure: failed program was:" >&5 |
3761 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
3762 | rm -rf conftest* |
3763 | ac_cv_struct_tm=sys/time.h | |
3764 | fi | |
3765 | rm -f conftest* | |
0c18e3f0 MM |
3766 | fi |
3767 | ||
3768 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 | |
3769 | if test $ac_cv_struct_tm = sys/time.h; then | |
3770 | cat >> confdefs.h <<\EOF | |
3771 | #define TM_IN_SYS_TIME 1 | |
3772 | EOF | |
3773 | ||
3774 | fi | |
3775 | ||
3776 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 | |
8c59a22d | 3777 | echo "configure:3778: checking for tm_zone in struct tm" >&5 |
0c18e3f0 MM |
3778 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
3779 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3780 | else | |
3781 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3782 | #line 3783 "configure" |
0c18e3f0 MM |
3783 | #include "confdefs.h" |
3784 | #include <sys/types.h> | |
3785 | #include <$ac_cv_struct_tm> | |
5c04f4f7 | 3786 | int main() { |
0c18e3f0 MM |
3787 | struct tm tm; tm.tm_zone; |
3788 | ; return 0; } | |
3789 | EOF | |
8c59a22d | 3790 | if { (eval echo configure:3791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0c18e3f0 MM |
3791 | rm -rf conftest* |
3792 | ac_cv_struct_tm_zone=yes | |
3793 | else | |
5c04f4f7 MM |
3794 | echo "configure: failed program was:" >&5 |
3795 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
3796 | rm -rf conftest* |
3797 | ac_cv_struct_tm_zone=no | |
3798 | fi | |
3799 | rm -f conftest* | |
0c18e3f0 MM |
3800 | fi |
3801 | ||
3802 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 | |
3803 | if test "$ac_cv_struct_tm_zone" = yes; then | |
3804 | cat >> confdefs.h <<\EOF | |
3805 | #define HAVE_TM_ZONE 1 | |
3806 | EOF | |
3807 | ||
3808 | else | |
3809 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 | |
8c59a22d | 3810 | echo "configure:3811: checking for tzname" >&5 |
0c18e3f0 MM |
3811 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
3812 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3813 | else | |
3814 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3815 | #line 3816 "configure" |
0c18e3f0 MM |
3816 | #include "confdefs.h" |
3817 | #include <time.h> | |
3818 | #ifndef tzname /* For SGI. */ | |
3819 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ | |
3820 | #endif | |
5c04f4f7 | 3821 | int main() { |
0c18e3f0 MM |
3822 | atoi(*tzname); |
3823 | ; return 0; } | |
3824 | EOF | |
8c59a22d | 3825 | if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
0c18e3f0 MM |
3826 | rm -rf conftest* |
3827 | ac_cv_var_tzname=yes | |
3828 | else | |
5c04f4f7 MM |
3829 | echo "configure: failed program was:" >&5 |
3830 | cat conftest.$ac_ext >&5 | |
0c18e3f0 MM |
3831 | rm -rf conftest* |
3832 | ac_cv_var_tzname=no | |
3833 | fi | |
3834 | rm -f conftest* | |
0c18e3f0 MM |
3835 | fi |
3836 | ||
3837 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 | |
3838 | if test $ac_cv_var_tzname = yes; then | |
3839 | cat >> confdefs.h <<\EOF | |
3840 | #define HAVE_TZNAME 1 | |
3841 | EOF | |
3842 | ||
3843 | fi | |
3844 | fi | |
3845 | ||
3846 | ||
78c09e4a | 3847 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
8c59a22d | 3848 | echo "configure:3849: checking for uid_t in sys/types.h" >&5 |
78c09e4a JM |
3849 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3851 | else | |
3852 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3853 | #line 3854 "configure" |
78c09e4a JM |
3854 | #include "confdefs.h" |
3855 | #include <sys/types.h> | |
3856 | EOF | |
3857 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3858 | egrep "uid_t" >/dev/null 2>&1; then | |
3859 | rm -rf conftest* | |
3860 | ac_cv_type_uid_t=yes | |
3861 | else | |
3862 | rm -rf conftest* | |
3863 | ac_cv_type_uid_t=no | |
3864 | fi | |
3865 | rm -f conftest* | |
3866 | ||
3867 | fi | |
3868 | ||
3869 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
3870 | if test $ac_cv_type_uid_t = no; then | |
3871 | cat >> confdefs.h <<\EOF | |
3872 | #define uid_t int | |
3873 | EOF | |
3874 | ||
3875 | cat >> confdefs.h <<\EOF | |
3876 | #define gid_t int | |
3877 | EOF | |
3878 | ||
3879 | fi | |
3880 | ||
3881 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
8c59a22d | 3882 | echo "configure:3883: checking type of array argument to getgroups" >&5 |
78c09e4a JM |
3883 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3884 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3885 | else | |
3886 | if test "$cross_compiling" = yes; then | |
3887 | ac_cv_type_getgroups=cross | |
3888 | else | |
5c04f4f7 | 3889 | cat > conftest.$ac_ext <<EOF |
8c59a22d | 3890 | #line 3891 "configure" |
78c09e4a JM |
3891 | #include "confdefs.h" |
3892 | ||
3893 | /* Thanks to Mike Rendell for this test. */ | |
3894 | #include <sys/types.h> | |
3895 | #define NGID 256 | |
3896 | #undef MAX | |
3897 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
3898 | main() | |
3899 | { | |
3900 | gid_t gidset[NGID]; | |
3901 | int i, n; | |
3902 | union { gid_t gval; long lval; } val; | |
3903 | ||
3904 | val.lval = -1; | |
3905 | for (i = 0; i < NGID; i++) | |
3906 | gidset[i] = val.gval; | |
3907 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3908 | gidset); | |
3909 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3910 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3911 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3912 | } | |
3913 | ||
3914 | EOF | |
8c59a22d | 3915 | if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
5c04f4f7 | 3916 | then |
78c09e4a JM |
3917 | ac_cv_type_getgroups=gid_t |
3918 | else | |
5c04f4f7 MM |
3919 | echo "configure: failed program was:" >&5 |
3920 | cat conftest.$ac_ext >&5 | |
3921 | rm -fr conftest* | |
78c09e4a JM |
3922 | ac_cv_type_getgroups=int |
3923 | fi | |
78c09e4a | 3924 | rm -fr conftest* |
5c04f4f7 MM |
3925 | fi |
3926 | ||
78c09e4a JM |
3927 | if test $ac_cv_type_getgroups = cross; then |
3928 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3929 | #line 3930 "configure" |
78c09e4a JM |
3930 | #include "confdefs.h" |
3931 | #include <unistd.h> | |
3932 | EOF | |
3933 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3934 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
3935 | rm -rf conftest* | |
3936 | ac_cv_type_getgroups=gid_t | |
3937 | else | |
3938 | rm -rf conftest* | |
3939 | ac_cv_type_getgroups=int | |
3940 | fi | |
3941 | rm -f conftest* | |
3942 | ||
3943 | fi | |
3944 | fi | |
3945 | ||
3946 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
3947 | cat >> confdefs.h <<EOF | |
3948 | #define GETGROUPS_T $ac_cv_type_getgroups | |
3949 | EOF | |
3950 | ||
3951 | ||
78c09e4a | 3952 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
8c59a22d | 3953 | echo "configure:3954: checking for mode_t" >&5 |
78c09e4a JM |
3954 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
3955 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3956 | else | |
3957 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3958 | #line 3959 "configure" |
78c09e4a JM |
3959 | #include "confdefs.h" |
3960 | #include <sys/types.h> | |
3961 | #if STDC_HEADERS | |
3962 | #include <stdlib.h> | |
5c04f4f7 | 3963 | #include <stddef.h> |
78c09e4a JM |
3964 | #endif |
3965 | EOF | |
3966 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 3967 | egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
3968 | rm -rf conftest* |
3969 | ac_cv_type_mode_t=yes | |
3970 | else | |
3971 | rm -rf conftest* | |
3972 | ac_cv_type_mode_t=no | |
3973 | fi | |
3974 | rm -f conftest* | |
3975 | ||
3976 | fi | |
3977 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 | |
3978 | if test $ac_cv_type_mode_t = no; then | |
3979 | cat >> confdefs.h <<\EOF | |
3980 | #define mode_t int | |
3981 | EOF | |
3982 | ||
3983 | fi | |
3984 | ||
3985 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
8c59a22d | 3986 | echo "configure:3987: checking for off_t" >&5 |
78c09e4a JM |
3987 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
3988 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3989 | else | |
3990 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 3991 | #line 3992 "configure" |
78c09e4a JM |
3992 | #include "confdefs.h" |
3993 | #include <sys/types.h> | |
3994 | #if STDC_HEADERS | |
3995 | #include <stdlib.h> | |
5c04f4f7 | 3996 | #include <stddef.h> |
78c09e4a JM |
3997 | #endif |
3998 | EOF | |
3999 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 4000 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
4001 | rm -rf conftest* |
4002 | ac_cv_type_off_t=yes | |
4003 | else | |
4004 | rm -rf conftest* | |
4005 | ac_cv_type_off_t=no | |
4006 | fi | |
4007 | rm -f conftest* | |
4008 | ||
4009 | fi | |
4010 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
4011 | if test $ac_cv_type_off_t = no; then | |
4012 | cat >> confdefs.h <<\EOF | |
4013 | #define off_t long | |
4014 | EOF | |
4015 | ||
4016 | fi | |
4017 | ||
4018 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 | |
8c59a22d | 4019 | echo "configure:4020: checking for pid_t" >&5 |
78c09e4a JM |
4020 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
4021 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4022 | else | |
4023 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4024 | #line 4025 "configure" |
78c09e4a JM |
4025 | #include "confdefs.h" |
4026 | #include <sys/types.h> | |
4027 | #if STDC_HEADERS | |
4028 | #include <stdlib.h> | |
5c04f4f7 | 4029 | #include <stddef.h> |
78c09e4a JM |
4030 | #endif |
4031 | EOF | |
4032 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 4033 | egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
4034 | rm -rf conftest* |
4035 | ac_cv_type_pid_t=yes | |
4036 | else | |
4037 | rm -rf conftest* | |
4038 | ac_cv_type_pid_t=no | |
4039 | fi | |
4040 | rm -f conftest* | |
4041 | ||
4042 | fi | |
4043 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
4044 | if test $ac_cv_type_pid_t = no; then | |
4045 | cat >> confdefs.h <<\EOF | |
4046 | #define pid_t int | |
4047 | EOF | |
4048 | ||
4049 | fi | |
4050 | ||
4051 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
8c59a22d | 4052 | echo "configure:4053: checking return type of signal handlers" >&5 |
78c09e4a JM |
4053 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
4054 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4055 | else | |
4056 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4057 | #line 4058 "configure" |
78c09e4a JM |
4058 | #include "confdefs.h" |
4059 | #include <sys/types.h> | |
4060 | #include <signal.h> | |
4061 | #ifdef signal | |
4062 | #undef signal | |
4063 | #endif | |
4064 | #ifdef __cplusplus | |
4065 | extern "C" void (*signal (int, void (*)(int)))(int); | |
4066 | #else | |
4067 | void (*signal ()) (); | |
4068 | #endif | |
4069 | ||
5c04f4f7 | 4070 | int main() { |
78c09e4a JM |
4071 | int i; |
4072 | ; return 0; } | |
4073 | EOF | |
8c59a22d | 4074 | if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
78c09e4a JM |
4075 | rm -rf conftest* |
4076 | ac_cv_type_signal=void | |
4077 | else | |
5c04f4f7 MM |
4078 | echo "configure: failed program was:" >&5 |
4079 | cat conftest.$ac_ext >&5 | |
78c09e4a JM |
4080 | rm -rf conftest* |
4081 | ac_cv_type_signal=int | |
4082 | fi | |
4083 | rm -f conftest* | |
78c09e4a JM |
4084 | fi |
4085 | ||
4086 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
4087 | cat >> confdefs.h <<EOF | |
4088 | #define RETSIGTYPE $ac_cv_type_signal | |
4089 | EOF | |
4090 | ||
4091 | ||
4092 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
8c59a22d | 4093 | echo "configure:4094: checking for size_t" >&5 |
78c09e4a JM |
4094 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
4095 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4096 | else | |
4097 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4098 | #line 4099 "configure" |
78c09e4a JM |
4099 | #include "confdefs.h" |
4100 | #include <sys/types.h> | |
4101 | #if STDC_HEADERS | |
4102 | #include <stdlib.h> | |
5c04f4f7 | 4103 | #include <stddef.h> |
78c09e4a JM |
4104 | #endif |
4105 | EOF | |
4106 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5c04f4f7 | 4107 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
78c09e4a JM |
4108 | rm -rf conftest* |
4109 | ac_cv_type_size_t=yes | |
4110 | else | |
4111 | rm -rf conftest* | |
4112 | ac_cv_type_size_t=no | |
4113 | fi | |
4114 | rm -f conftest* | |
4115 | ||
4116 | fi | |
4117 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
4118 | if test $ac_cv_type_size_t = no; then | |
4119 | cat >> confdefs.h <<\EOF | |
4120 | #define size_t unsigned | |
4121 | EOF | |
4122 | ||
4123 | fi | |
4124 | ||
4125 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
8c59a22d | 4126 | echo "configure:4127: checking for uid_t in sys/types.h" >&5 |
78c09e4a JM |
4127 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
4128 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4129 | else | |
4130 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4131 | #line 4132 "configure" |
78c09e4a JM |
4132 | #include "confdefs.h" |
4133 | #include <sys/types.h> | |
4134 | EOF | |
4135 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4136 | egrep "uid_t" >/dev/null 2>&1; then | |
4137 | rm -rf conftest* | |
4138 | ac_cv_type_uid_t=yes | |
4139 | else | |
4140 | rm -rf conftest* | |
4141 | ac_cv_type_uid_t=no | |
4142 | fi | |
4143 | rm -f conftest* | |
4144 | ||
4145 | fi | |
4146 | ||
4147 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
4148 | if test $ac_cv_type_uid_t = no; then | |
4149 | cat >> confdefs.h <<\EOF | |
4150 | #define uid_t int | |
4151 | EOF | |
4152 | ||
4153 | cat >> confdefs.h <<\EOF | |
4154 | #define gid_t int | |
4155 | EOF | |
4156 | ||
4157 | fi | |
4158 | ||
4159 | ||
5c04f4f7 | 4160 | 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 |
4161 | do |
4162 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
8c59a22d | 4163 | echo "configure:4164: checking for $ac_func" >&5 |
78c09e4a JM |
4164 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4165 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4166 | else | |
4167 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4168 | #line 4169 "configure" |
78c09e4a JM |
4169 | #include "confdefs.h" |
4170 | /* System header to define __stub macros and hopefully few prototypes, | |
4171 | which can conflict with char $ac_func(); below. */ | |
4172 | #include <assert.h> | |
4173 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4174 | /* We use char because int might match the return type of a gcc2 | |
4175 | builtin and then its argument prototype would still apply. */ | |
4176 | char $ac_func(); | |
4177 | ||
5c04f4f7 | 4178 | int main() { |
78c09e4a JM |
4179 | |
4180 | /* The GNU C library defines this for functions which it implements | |
4181 | to always fail with ENOSYS. Some functions are actually named | |
4182 | something starting with __ and the normal name is an alias. */ | |
4183 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4184 | choke me | |
4185 | #else | |
4186 | $ac_func(); | |
4187 | #endif | |
4188 | ||
4189 | ; return 0; } | |
4190 | EOF | |
8c59a22d | 4191 | if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
78c09e4a JM |
4192 | rm -rf conftest* |
4193 | eval "ac_cv_func_$ac_func=yes" | |
4194 | else | |
5c04f4f7 MM |
4195 | echo "configure: failed program was:" >&5 |
4196 | cat conftest.$ac_ext >&5 | |
78c09e4a JM |
4197 | rm -rf conftest* |
4198 | eval "ac_cv_func_$ac_func=no" | |
4199 | fi | |
4200 | rm -f conftest* | |
78c09e4a | 4201 | fi |
5c04f4f7 | 4202 | |
78c09e4a JM |
4203 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4204 | echo "$ac_t""yes" 1>&6 | |
4205 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4206 | cat >> confdefs.h <<EOF | |
4207 | #define $ac_tr_func 1 | |
4208 | EOF | |
4209 | ||
4210 | else | |
4211 | echo "$ac_t""no" 1>&6 | |
4212 | fi | |
4213 | done | |
4214 | ||
4215 | ||
88f1eac4 | 4216 | 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 | 4217 | do |
5c04f4f7 | 4218 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
4b935ed4 | 4219 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
8c59a22d | 4220 | echo "configure:4221: checking for $ac_hdr" >&5 |
4b935ed4 MM |
4221 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4223 | else | |
4224 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4225 | #line 4226 "configure" |
4b935ed4 MM |
4226 | #include "confdefs.h" |
4227 | #include <$ac_hdr> | |
4228 | EOF | |
a72d2509 | 4229 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
8c59a22d | 4230 | { (eval echo configure:4231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b935ed4 MM |
4231 | ac_err=`grep -v '^ *+' conftest.out` |
4232 | if test -z "$ac_err"; then | |
4233 | rm -rf conftest* | |
4234 | eval "ac_cv_header_$ac_safe=yes" | |
4235 | else | |
4236 | echo "$ac_err" >&5 | |
5c04f4f7 MM |
4237 | echo "configure: failed program was:" >&5 |
4238 | cat conftest.$ac_ext >&5 | |
4b935ed4 MM |
4239 | rm -rf conftest* |
4240 | eval "ac_cv_header_$ac_safe=no" | |
4241 | fi | |
4242 | rm -f conftest* | |
4243 | fi | |
4244 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4245 | echo "$ac_t""yes" 1>&6 | |
5c04f4f7 | 4246 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
4b935ed4 MM |
4247 | cat >> confdefs.h <<EOF |
4248 | #define $ac_tr_hdr 1 | |
4249 | EOF | |
4250 | ||
4251 | else | |
4252 | echo "$ac_t""no" 1>&6 | |
4253 | fi | |
4254 | done | |
4255 | ||
7393a6f0 MM |
4256 | ac_header_dirent=no |
4257 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4258 | do | |
5c04f4f7 | 4259 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
7393a6f0 | 4260 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
8c59a22d | 4261 | echo "configure:4262: checking for $ac_hdr that defines DIR" >&5 |
7393a6f0 MM |
4262 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
4263 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4264 | else | |
4265 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4266 | #line 4267 "configure" |
7393a6f0 MM |
4267 | #include "confdefs.h" |
4268 | #include <sys/types.h> | |
4269 | #include <$ac_hdr> | |
5c04f4f7 | 4270 | int main() { |
7393a6f0 MM |
4271 | DIR *dirp = 0; |
4272 | ; return 0; } | |
4273 | EOF | |
8c59a22d | 4274 | if { (eval echo configure:4275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
7393a6f0 MM |
4275 | rm -rf conftest* |
4276 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4277 | else | |
5c04f4f7 MM |
4278 | echo "configure: failed program was:" >&5 |
4279 | cat conftest.$ac_ext >&5 | |
7393a6f0 MM |
4280 | rm -rf conftest* |
4281 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4282 | fi | |
4283 | rm -f conftest* | |
7393a6f0 MM |
4284 | fi |
4285 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4286 | echo "$ac_t""yes" 1>&6 | |
5c04f4f7 | 4287 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
7393a6f0 MM |
4288 | cat >> confdefs.h <<EOF |
4289 | #define $ac_tr_hdr 1 | |
4290 | EOF | |
4291 | ac_header_dirent=$ac_hdr; break | |
4292 | else | |
4293 | echo "$ac_t""no" 1>&6 | |
4294 | fi | |
4295 | done | |
4296 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4297 | if test $ac_header_dirent = dirent.h; then | |
5c04f4f7 | 4298 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
8c59a22d | 4299 | echo "configure:4300: checking for opendir in -ldir" >&5 |
5c04f4f7 | 4300 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
7393a6f0 MM |
4301 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
4302 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4303 | else | |
4304 | ac_save_LIBS="$LIBS" | |
4305 | LIBS="-ldir $LIBS" | |
4306 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4307 | #line 4308 "configure" |
7393a6f0 | 4308 | #include "confdefs.h" |
88f1eac4 MM |
4309 | /* Override any gcc2 internal prototype to avoid an error. */ |
4310 | /* We use char because int might match the return type of a gcc2 | |
4311 | builtin and then its argument prototype would still apply. */ | |
4312 | char opendir(); | |
7393a6f0 | 4313 | |
5c04f4f7 | 4314 | int main() { |
7393a6f0 MM |
4315 | opendir() |
4316 | ; return 0; } | |
4317 | EOF | |
8c59a22d | 4318 | if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
7393a6f0 MM |
4319 | rm -rf conftest* |
4320 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4321 | else | |
5c04f4f7 MM |
4322 | echo "configure: failed program was:" >&5 |
4323 | cat conftest.$ac_ext >&5 | |
7393a6f0 MM |
4324 | rm -rf conftest* |
4325 | eval "ac_cv_lib_$ac_lib_var=no" | |
4326 | fi | |
4327 | rm -f conftest* | |
4328 | LIBS="$ac_save_LIBS" | |
4329 | ||
4330 | fi | |
4331 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4332 | echo "$ac_t""yes" 1>&6 | |
4333 | LIBS="$LIBS -ldir" | |
4334 | else | |
4335 | echo "$ac_t""no" 1>&6 | |
4336 | fi | |
4337 | ||
4338 | else | |
5c04f4f7 | 4339 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
8c59a22d | 4340 | echo "configure:4341: checking for opendir in -lx" >&5 |
5c04f4f7 | 4341 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
7393a6f0 MM |
4342 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
4343 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4344 | else | |
4345 | ac_save_LIBS="$LIBS" | |
4346 | LIBS="-lx $LIBS" | |
4347 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4348 | #line 4349 "configure" |
7393a6f0 | 4349 | #include "confdefs.h" |
88f1eac4 MM |
4350 | /* Override any gcc2 internal prototype to avoid an error. */ |
4351 | /* We use char because int might match the return type of a gcc2 | |
4352 | builtin and then its argument prototype would still apply. */ | |
4353 | char opendir(); | |
7393a6f0 | 4354 | |
5c04f4f7 | 4355 | int main() { |
7393a6f0 MM |
4356 | opendir() |
4357 | ; return 0; } | |
4358 | EOF | |
8c59a22d | 4359 | if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
7393a6f0 MM |
4360 | rm -rf conftest* |
4361 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4362 | else | |
5c04f4f7 MM |
4363 | echo "configure: failed program was:" >&5 |
4364 | cat conftest.$ac_ext >&5 | |
7393a6f0 MM |
4365 | rm -rf conftest* |
4366 | eval "ac_cv_lib_$ac_lib_var=no" | |
4367 | fi | |
4368 | rm -f conftest* | |
4369 | LIBS="$ac_save_LIBS" | |
4370 | ||
4371 | fi | |
4372 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4373 | echo "$ac_t""yes" 1>&6 | |
4374 | LIBS="$LIBS -lx" | |
4375 | else | |
4376 | echo "$ac_t""no" 1>&6 | |
4377 | fi | |
4378 | ||
4379 | fi | |
30c87b55 MM |
4380 | |
4381 | ||
4382 | sim_termio="" | |
4383 | echo $ac_n "checking for struct termios""... $ac_c" 1>&6 | |
8c59a22d | 4384 | echo "configure:4385: checking for struct termios" >&5 |
30c87b55 MM |
4385 | if eval "test \"`echo '$''{'ac_cv_termios_struct'+set}'`\" = set"; then |
4386 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4387 | else | |
4388 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4389 | #line 4390 "configure" |
30c87b55 MM |
4390 | #include "confdefs.h" |
4391 | #include <sys/types.h> | |
4392 | #include <sys/termios.h> | |
5c04f4f7 | 4393 | int main() { |
30c87b55 MM |
4394 | static struct termios x; |
4395 | x.c_iflag = 0; | |
4396 | x.c_oflag = 0; | |
4397 | x.c_cflag = 0; | |
4398 | x.c_lflag = 0; | |
4399 | x.c_cc[NCCS] = 0; | |
4400 | ; return 0; } | |
4401 | EOF | |
8c59a22d | 4402 | if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
4403 | rm -rf conftest* |
4404 | ac_cv_termios_struct=yes | |
4405 | else | |
5c04f4f7 MM |
4406 | echo "configure: failed program was:" >&5 |
4407 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
4408 | rm -rf conftest* |
4409 | ac_cv_termios_struct=no | |
4410 | fi | |
4411 | rm -f conftest* | |
30c87b55 MM |
4412 | fi |
4413 | ||
4414 | echo "$ac_t""$ac_cv_termios_struct" 1>&6 | |
4415 | if test $ac_cv_termios_struct = yes; then | |
4416 | sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE" | |
4417 | fi | |
4418 | ||
4419 | if test "$ac_cv_termios_struct" = "yes"; then | |
4420 | echo $ac_n "checking for c_line field in struct termios""... $ac_c" 1>&6 | |
8c59a22d | 4421 | echo "configure:4422: checking for c_line field in struct termios" >&5 |
30c87b55 MM |
4422 | if eval "test \"`echo '$''{'ac_cv_termios_cline'+set}'`\" = set"; then |
4423 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4424 | else | |
4425 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4426 | #line 4427 "configure" |
30c87b55 MM |
4427 | #include "confdefs.h" |
4428 | #include <sys/types.h> | |
4429 | #include <sys/termios.h> | |
5c04f4f7 | 4430 | int main() { |
30c87b55 MM |
4431 | static struct termios x; x.c_line = 0; |
4432 | ; return 0; } | |
4433 | EOF | |
8c59a22d | 4434 | if { (eval echo configure:4435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
4435 | rm -rf conftest* |
4436 | ac_cv_termios_cline=yes | |
4437 | else | |
5c04f4f7 MM |
4438 | echo "configure: failed program was:" >&5 |
4439 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
4440 | rm -rf conftest* |
4441 | ac_cv_termios_cline=no | |
4442 | fi | |
4443 | rm -f conftest* | |
30c87b55 MM |
4444 | fi |
4445 | ||
4446 | ||
4447 | echo "$ac_t""$ac_cv_termios_cline" 1>&6 | |
4448 | if test $ac_cv_termios_cline = yes; then | |
4449 | sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE" | |
4450 | fi | |
4451 | else | |
4452 | ac_cv_termios_cline=no | |
4453 | fi | |
4454 | ||
4455 | if test "$ac_cv_termios_struct" != "yes"; then | |
4456 | echo $ac_n "checking for struct termio""... $ac_c" 1>&6 | |
8c59a22d | 4457 | echo "configure:4458: checking for struct termio" >&5 |
30c87b55 MM |
4458 | if eval "test \"`echo '$''{'ac_cv_termio_struct'+set}'`\" = set"; then |
4459 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4460 | else | |
4461 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4462 | #line 4463 "configure" |
30c87b55 MM |
4463 | #include "confdefs.h" |
4464 | #include <sys/types.h> | |
4465 | #include <sys/termio.h> | |
5c04f4f7 | 4466 | int main() { |
30c87b55 MM |
4467 | static struct termio x; |
4468 | x.c_iflag = 0; | |
4469 | x.c_oflag = 0; | |
4470 | x.c_cflag = 0; | |
4471 | x.c_lflag = 0; | |
4472 | x.c_cc[NCC] = 0; | |
4473 | ; return 0; } | |
4474 | EOF | |
8c59a22d | 4475 | if { (eval echo configure:4476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
4476 | rm -rf conftest* |
4477 | ac_cv_termio_struct=yes | |
4478 | else | |
5c04f4f7 MM |
4479 | echo "configure: failed program was:" >&5 |
4480 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
4481 | rm -rf conftest* |
4482 | ac_cv_termio_struct=no | |
4483 | fi | |
4484 | rm -f conftest* | |
30c87b55 MM |
4485 | fi |
4486 | ||
4487 | echo "$ac_t""$ac_cv_termio_struct" 1>&6 | |
4488 | if test $ac_cv_termio_struct = yes; then | |
4489 | sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE" | |
4490 | fi | |
4491 | else | |
4492 | ac_cv_termio_struct=no | |
4493 | fi | |
4494 | ||
4495 | if test "$ac_cv_termio_struct" = "yes"; then | |
4496 | echo $ac_n "checking for c_line field in struct termio""... $ac_c" 1>&6 | |
8c59a22d | 4497 | echo "configure:4498: checking for c_line field in struct termio" >&5 |
30c87b55 MM |
4498 | if eval "test \"`echo '$''{'ac_cv_termio_cline'+set}'`\" = set"; then |
4499 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4500 | else | |
4501 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4502 | #line 4503 "configure" |
30c87b55 MM |
4503 | #include "confdefs.h" |
4504 | #include <sys/types.h> | |
4505 | #include <sys/termio.h> | |
5c04f4f7 | 4506 | int main() { |
30c87b55 MM |
4507 | static struct termio x; x.c_line = 0; |
4508 | ; return 0; } | |
4509 | EOF | |
8c59a22d | 4510 | if { (eval echo configure:4511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
30c87b55 MM |
4511 | rm -rf conftest* |
4512 | ac_cv_termio_cline=yes | |
4513 | else | |
5c04f4f7 MM |
4514 | echo "configure: failed program was:" >&5 |
4515 | cat conftest.$ac_ext >&5 | |
30c87b55 MM |
4516 | rm -rf conftest* |
4517 | ac_cv_termio_cline=no | |
4518 | fi | |
4519 | rm -f conftest* | |
30c87b55 MM |
4520 | fi |
4521 | ||
4522 | ||
4523 | echo "$ac_t""$ac_cv_termio_cline" 1>&6 | |
4524 | if test $ac_cv_termio_cline = yes; then | |
4525 | sim_termio="$sim_termio -DHAVE_TERMIO_CLINE" | |
4526 | fi | |
4527 | else | |
4528 | ac_cv_termio_cline=no | |
4529 | fi | |
4530 | ||
5c04f4f7 MM |
4531 | sim_devzero="" |
4532 | echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6 | |
8c59a22d | 4533 | echo "configure:4534: checking for /dev/zero" >&5 |
5c04f4f7 MM |
4534 | if eval "test \"`echo '$''{'ac_cv_devzero'+set}'`\" = set"; then |
4535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4536 | else | |
4537 | if test "$cross_compiling" = yes; then | |
4538 | ac_cv_devzero=no | |
4539 | else | |
4540 | cat > conftest.$ac_ext <<EOF | |
8c59a22d | 4541 | #line 4542 "configure" |
5c04f4f7 MM |
4542 | #include "confdefs.h" |
4543 | #include <fcntl.h> | |
4544 | main () { | |
4545 | char buf[2048]; | |
4546 | int i; | |
4547 | int fd = open ("/dev/zero", O_RDONLY); | |
4548 | if (fd < 0) | |
4549 | return 1; | |
4550 | for (i = 0; i < sizeof (buf); i++) | |
4551 | buf[i] = 1; | |
4552 | if (read (fd, buf, sizeof (buf)) != sizeof (buf)) | |
4553 | return 1; | |
4554 | for (i = 0; i < sizeof (buf); i++) | |
4555 | if (buf[i]) | |
4556 | return 1; | |
4557 | return 0; | |
4558 | } | |
4559 | EOF | |
8c59a22d | 4560 | if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
5c04f4f7 MM |
4561 | then |
4562 | ac_cv_devzero=yes | |
4563 | else | |
4564 | echo "configure: failed program was:" >&5 | |
4565 | cat conftest.$ac_ext >&5 | |
4566 | rm -fr conftest* | |
4567 | ac_cv_devzero=no | |
4568 | fi | |
4569 | rm -fr conftest* | |
4570 | fi | |
4571 | ||
4572 | fi | |
4573 | ||
4574 | echo "$ac_t""$ac_cv_devzero" 1>&6 | |
4575 | if test $ac_cv_devzero = yes; then | |
4576 | sim_devzero="-DHAVE_DEVZERO" | |
4577 | else | |
4578 | sim_devzero="" | |
4579 | fi | |
4580 | ||
d2e3d3af | 4581 | echo $ac_n "checking for common simulator directory""... $ac_c" 1>&6 |
8c59a22d | 4582 | echo "configure:4583: checking for common simulator directory" >&5 |
cef84fb3 | 4583 | if test -f "${srcdir}/../common/callback.c"; then |
d2e3d3af MM |
4584 | echo "$ac_t""yes" 1>&6 |
4585 | sim_callback="callback.o targ-map.o" | |
54973b80 | 4586 | sim_targ_vals="targ-vals.h targ-map.c targ-vals.def" |
d2e3d3af MM |
4587 | else |
4588 | echo "$ac_t""no" 1>&6 | |
4589 | sim_callback="" | |
54973b80 | 4590 | sim_targ_vals="" |
d2e3d3af MM |
4591 | fi |
4592 | ||
8c59a22d GN |
4593 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
4594 | echo "configure:4595: checking for executable suffix" >&5 | |
4595 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then | |
4596 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4597 | else | |
4598 | if test "$CYGWIN32" = yes; then | |
4599 | am_cv_exeext=.exe | |
4600 | else | |
4601 | cat > am_c_test.c << 'EOF' | |
4602 | int main() { | |
4603 | /* Nothing needed here */ | |
4604 | } | |
4605 | EOF | |
4606 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
4607 | am_cv_exeext=`ls am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` | |
4608 | rm -f am_c_test* | |
4609 | fi | |
4610 | ||
4611 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
4612 | fi | |
4613 | EXEEXT="" | |
4614 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
4615 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
4616 | ||
4617 | ||
30c87b55 MM |
4618 | |
4619 | ||
4620 | ||
4621 | AR=${AR-ar} | |
4622 | ||
4623 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4624 | set dummy ranlib; ac_word=$2 | |
4625 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
8c59a22d | 4626 | echo "configure:4627: checking for $ac_word" >&5 |
30c87b55 MM |
4627 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
4628 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4629 | else | |
4630 | if test -n "$RANLIB"; then | |
4631 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4632 | else | |
4633 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4634 | for ac_dir in $PATH; do | |
4635 | test -z "$ac_dir" && ac_dir=. | |
4636 | if test -f $ac_dir/$ac_word; then | |
4637 | ac_cv_prog_RANLIB="ranlib" | |
4638 | break | |
4639 | fi | |
4640 | done | |
4641 | IFS="$ac_save_ifs" | |
4642 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
4643 | fi | |
4644 | fi | |
4645 | RANLIB="$ac_cv_prog_RANLIB" | |
4646 | if test -n "$RANLIB"; then | |
4647 | echo "$ac_t""$RANLIB" 1>&6 | |
4648 | else | |
4649 | echo "$ac_t""no" 1>&6 | |
4650 | fi | |
4651 | ||
4652 | ||
4653 | ||
4654 | ||
4655 | ||
4656 | ||
4657 | ||
4658 | ||
4659 | ||
4660 | ||
4661 | ||
4662 | ||
4663 | ||
4664 | ||
4665 | ||
4666 | ||
4667 | ||
4668 | ||
4669 | ||
4670 | ||
4671 | ||
4672 | ||
4673 | ||
4674 | ||
4675 | ||
4676 | ||
4677 | ||
2e913166 MM |
4678 | |
4679 | ||
4680 | ||
4681 | ||
4682 | ||
4683 | ||
30c87b55 MM |
4684 | |
4685 | ||
4686 | ||
4687 | ||
4688 | ||
5c04f4f7 | 4689 | |
d2e3d3af | 4690 | |
54973b80 | 4691 | |
d865fb6e | 4692 | |
7393a6f0 | 4693 | |
4f965b81 MM |
4694 | |
4695 | trap '' 1 2 15 | |
4696 | cat > confcache <<\EOF | |
4697 | # This file is a shell script that caches the results of configure | |
4698 | # tests run on this system so they can be shared between configure | |
4699 | # scripts and configure runs. It is not useful on other systems. | |
4700 | # If it contains results you don't want to keep, you may remove or edit it. | |
4701 | # | |
4702 | # By default, configure uses ./config.cache as the cache file, | |
4703 | # creating it if it does not exist already. You can give configure | |
4704 | # the --cache-file=FILE option to use a different cache file; that is | |
4705 | # what configure does when it calls configure scripts in | |
4706 | # subdirectories, so they share the cache. | |
4707 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
4708 | # config.status only pays attention to the cache file if you give it the | |
4709 | # --recheck option to rerun configure. | |
4710 | # | |
4711 | EOF | |
5c04f4f7 MM |
4712 | # The following way of writing the cache mishandles newlines in values, |
4713 | # but we know of no workaround that is simple, portable, and efficient. | |
4714 | # So, don't put newlines in cache variables' values. | |
4f965b81 MM |
4715 | # Ultrix sh set writes to stderr and can't be redirected directly, |
4716 | # and sets the high bit in the cache file unless we assign to the vars. | |
4717 | (set) 2>&1 | | |
8c59a22d | 4718 | case `(ac_space=' '; set) 2>&1` in |
5c04f4f7 MM |
4719 | *ac_space=\ *) |
4720 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
4721 | # turns \\\\ into \\, and sed turns \\ into \). | |
4722 | sed -n \ | |
4723 | -e "s/'/'\\\\''/g" \ | |
4724 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
4725 | ;; | |
4726 | *) | |
4727 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
4728 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
4729 | ;; | |
4730 | esac >> confcache | |
4f965b81 MM |
4731 | if cmp -s $cache_file confcache; then |
4732 | : | |
4733 | else | |
4734 | if test -w $cache_file; then | |
4735 | echo "updating cache $cache_file" | |
4736 | cat confcache > $cache_file | |
4737 | else | |
4738 | echo "not updating unwritable cache $cache_file" | |
4739 | fi | |
4740 | fi | |
4741 | rm -f confcache | |
4742 | ||
4743 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
4744 | ||
4745 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
4746 | # Let make expand exec_prefix. | |
4747 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4748 | ||
4749 | # Any assignment to VPATH causes Sun make to only execute | |
4750 | # the first set of double-colon rules, so remove it if not needed. | |
4751 | # If there is a colon in the path, we need to keep it. | |
4752 | if test "x$srcdir" = x.; then | |
4753 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
4754 | fi | |
4755 | ||
4756 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
4757 | ||
4b935ed4 | 4758 | DEFS=-DHAVE_CONFIG_H |
4f965b81 MM |
4759 | |
4760 | # Without the "./", some shells look in PATH for config.status. | |
4761 | : ${CONFIG_STATUS=./config.status} | |
4762 | ||
4763 | echo creating $CONFIG_STATUS | |
4764 | rm -f $CONFIG_STATUS | |
4765 | cat > $CONFIG_STATUS <<EOF | |
4766 | #! /bin/sh | |
4767 | # Generated automatically by configure. | |
4768 | # Run this file to recreate the current configuration. | |
4769 | # This directory was configured as follows, | |
4770 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
4771 | # | |
4772 | # $0 $ac_configure_args | |
4773 | # | |
4774 | # Compiler output produced by configure, useful for debugging | |
4775 | # configure, is in ./config.log if it exists. | |
4776 | ||
4777 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
4778 | for ac_option | |
4779 | do | |
4780 | case "\$ac_option" in | |
4781 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
4782 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
4783 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
4784 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
d865fb6e | 4785 | echo "$CONFIG_STATUS generated by autoconf version 2.12.1" |
4f965b81 MM |
4786 | exit 0 ;; |
4787 | -help | --help | --hel | --he | --h) | |
4788 | echo "\$ac_cs_usage"; exit 0 ;; | |
4789 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
4790 | esac | |
4791 | done | |
4792 | ||
4793 | ac_given_srcdir=$srcdir | |
78c09e4a | 4794 | ac_given_INSTALL="$INSTALL" |
4f965b81 | 4795 | |
4b935ed4 | 4796 | trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1f1e5dd8 MM |
4797 | EOF |
4798 | cat >> $CONFIG_STATUS <<EOF | |
4f965b81 | 4799 | |
1f1e5dd8 MM |
4800 | # Protect against being on the right side of a sed subst in config.status. |
4801 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
4802 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
4f965b81 MM |
4803 | $ac_vpsub |
4804 | $extrasub | |
a2eb9d27 TT |
4805 | s%@sim_environment@%$sim_environment%g |
4806 | s%@sim_alignment@%$sim_alignment%g | |
4807 | s%@sim_assert@%$sim_assert%g | |
4808 | s%@sim_bitsize@%$sim_bitsize%g | |
4809 | s%@sim_endian@%$sim_endian%g | |
4810 | s%@sim_hostendian@%$sim_hostendian%g | |
4811 | s%@sim_float@%$sim_float%g | |
4812 | s%@sim_scache@%$sim_scache%g | |
4813 | s%@sim_default_model@%$sim_default_model%g | |
4814 | s%@sim_hardware@%$sim_hardware%g | |
4815 | s%@sim_hw_obj@%$sim_hw_obj%g | |
4816 | s%@sim_hw@%$sim_hw%g | |
4817 | s%@sim_inline@%$sim_inline%g | |
4818 | s%@sim_packages@%$sim_packages%g | |
4819 | s%@sim_regparm@%$sim_regparm%g | |
4820 | s%@sim_reserved_bits@%$sim_reserved_bits%g | |
4821 | s%@sim_smp@%$sim_smp%g | |
4822 | s%@sim_stdcall@%$sim_stdcall%g | |
4823 | s%@sim_xor_endian@%$sim_xor_endian%g | |
4824 | s%@sim_warnings@%$sim_warnings%g | |
d865fb6e | 4825 | s%@SHELL@%$SHELL%g |
4f965b81 MM |
4826 | s%@CFLAGS@%$CFLAGS%g |
4827 | s%@CPPFLAGS@%$CPPFLAGS%g | |
4828 | s%@CXXFLAGS@%$CXXFLAGS%g | |
4829 | s%@DEFS@%$DEFS%g | |
4830 | s%@LDFLAGS@%$LDFLAGS%g | |
4831 | s%@LIBS@%$LIBS%g | |
4832 | s%@exec_prefix@%$exec_prefix%g | |
4833 | s%@prefix@%$prefix%g | |
4834 | s%@program_transform_name@%$program_transform_name%g | |
1f1e5dd8 MM |
4835 | s%@bindir@%$bindir%g |
4836 | s%@sbindir@%$sbindir%g | |
4837 | s%@libexecdir@%$libexecdir%g | |
4838 | s%@datadir@%$datadir%g | |
4839 | s%@sysconfdir@%$sysconfdir%g | |
4840 | s%@sharedstatedir@%$sharedstatedir%g | |
4841 | s%@localstatedir@%$localstatedir%g | |
4842 | s%@libdir@%$libdir%g | |
4843 | s%@includedir@%$includedir%g | |
4844 | s%@oldincludedir@%$oldincludedir%g | |
4845 | s%@infodir@%$infodir%g | |
4846 | s%@mandir@%$mandir%g | |
78c09e4a JM |
4847 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
4848 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
30c87b55 | 4849 | s%@CC@%$CC%g |
a2eb9d27 TT |
4850 | s%@SET_MAKE@%$SET_MAKE%g |
4851 | s%@RANLIB@%$RANLIB%g | |
4852 | s%@CPP@%$CPP%g | |
4853 | s%@ALLOCA@%$ALLOCA%g | |
4854 | s%@USE_NLS@%$USE_NLS%g | |
4855 | s%@MSGFMT@%$MSGFMT%g | |
4856 | s%@GMSGFMT@%$GMSGFMT%g | |
4857 | s%@XGETTEXT@%$XGETTEXT%g | |
4858 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
4859 | s%@CATALOGS@%$CATALOGS%g | |
4860 | s%@CATOBJEXT@%$CATOBJEXT%g | |
4861 | s%@DATADIRNAME@%$DATADIRNAME%g | |
4862 | s%@GMOFILES@%$GMOFILES%g | |
4863 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
4864 | s%@INTLDEPS@%$INTLDEPS%g | |
4865 | s%@INTLLIBS@%$INTLLIBS%g | |
4866 | s%@INTLOBJS@%$INTLOBJS%g | |
4867 | s%@POFILES@%$POFILES%g | |
4868 | s%@POSUB@%$POSUB%g | |
4869 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
4870 | s%@GT_NO@%$GT_NO%g | |
4871 | s%@GT_YES@%$GT_YES%g | |
4872 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
4873 | s%@l@%$l%g | |
4f965b81 MM |
4874 | s%@host@%$host%g |
4875 | s%@host_alias@%$host_alias%g | |
4876 | s%@host_cpu@%$host_cpu%g | |
4877 | s%@host_vendor@%$host_vendor%g | |
4878 | s%@host_os@%$host_os%g | |
4879 | s%@target@%$target%g | |
4880 | s%@target_alias@%$target_alias%g | |
4881 | s%@target_cpu@%$target_cpu%g | |
4882 | s%@target_vendor@%$target_vendor%g | |
4883 | s%@target_os@%$target_os%g | |
4884 | s%@build@%$build%g | |
4885 | s%@build_alias@%$build_alias%g | |
4886 | s%@build_cpu@%$build_cpu%g | |
4887 | s%@build_vendor@%$build_vendor%g | |
4888 | s%@build_os@%$build_os%g | |
30c87b55 | 4889 | s%@LIBOBJS@%$LIBOBJS%g |
a72d2509 | 4890 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
4b935ed4 MM |
4891 | s%@HDEFINES@%$HDEFINES%g |
4892 | s%@AR@%$AR%g | |
c494cadd | 4893 | s%@sim_cflags@%$sim_cflags%g |
30c87b55 | 4894 | s%@sim_line_nr@%$sim_line_nr%g |
c494cadd MM |
4895 | s%@sim_config@%$sim_config%g |
4896 | s%@sim_opcode@%$sim_opcode%g | |
4897 | s%@sim_switch@%$sim_switch%g | |
4898 | s%@sim_dup@%$sim_dup%g | |
d865fb6e | 4899 | s%@sim_decode_mechanism@%$sim_decode_mechanism%g |
30c87b55 | 4900 | s%@sim_jump@%$sim_jump%g |
c494cadd MM |
4901 | s%@sim_filter@%$sim_filter%g |
4902 | s%@sim_icache@%$sim_icache%g | |
2e913166 | 4903 | s%@sim_hw_src@%$sim_hw_src%g |
2e913166 MM |
4904 | s%@sim_pk_src@%$sim_pk_src%g |
4905 | s%@sim_pk_obj@%$sim_pk_obj%g | |
c494cadd | 4906 | s%@sim_bswap@%$sim_bswap%g |
30c87b55 | 4907 | s%@sim_igen_smp@%$sim_igen_smp%g |
c494cadd MM |
4908 | s%@sim_hostbitsize@%$sim_hostbitsize%g |
4909 | s%@sim_env@%$sim_env%g | |
4910 | s%@sim_timebase@%$sim_timebase%g | |
c494cadd | 4911 | s%@sim_trace@%$sim_trace%g |
a3114052 | 4912 | s%@sim_reserved@%$sim_reserved%g |
c494cadd | 4913 | s%@sim_monitor@%$sim_monitor%g |
73c4941b | 4914 | s%@sim_model@%$sim_model%g |
f2181eff | 4915 | s%@sim_model_issue@%$sim_model_issue%g |
a72d2509 | 4916 | s%@sim_stdio@%$sim_stdio%g |
30c87b55 | 4917 | s%@sim_termio@%$sim_termio%g |
5c04f4f7 | 4918 | s%@sim_devzero@%$sim_devzero%g |
d2e3d3af | 4919 | s%@sim_callback@%$sim_callback%g |
54973b80 | 4920 | s%@sim_targ_vals@%$sim_targ_vals%g |
4f965b81 MM |
4921 | |
4922 | CEOF | |
4923 | EOF | |
5c04f4f7 MM |
4924 | |
4925 | cat >> $CONFIG_STATUS <<\EOF | |
4926 | ||
4927 | # Split the substitutions into bite-sized pieces for seds with | |
4928 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
4929 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
4930 | ac_file=1 # Number of current file. | |
4931 | ac_beg=1 # First line for current file. | |
4932 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
4933 | ac_more_lines=: | |
4934 | ac_sed_cmds="" | |
4935 | while $ac_more_lines; do | |
4936 | if test $ac_beg -gt 1; then | |
4937 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
4938 | else | |
4939 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
4940 | fi | |
4941 | if test ! -s conftest.s$ac_file; then | |
4942 | ac_more_lines=false | |
4943 | rm -f conftest.s$ac_file | |
4944 | else | |
4945 | if test -z "$ac_sed_cmds"; then | |
4946 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
4947 | else | |
4948 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
4949 | fi | |
4950 | ac_file=`expr $ac_file + 1` | |
4951 | ac_beg=$ac_end | |
4952 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
4953 | fi | |
4954 | done | |
4955 | if test -z "$ac_sed_cmds"; then | |
4956 | ac_sed_cmds=cat | |
4957 | fi | |
4958 | EOF | |
4959 | ||
4f965b81 MM |
4960 | cat >> $CONFIG_STATUS <<EOF |
4961 | ||
4962 | CONFIG_FILES=\${CONFIG_FILES-"Makefile"} | |
4963 | EOF | |
4964 | cat >> $CONFIG_STATUS <<\EOF | |
4965 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
5c04f4f7 | 4966 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
4f965b81 | 4967 | case "$ac_file" in |
5c04f4f7 | 4968 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
4f965b81 MM |
4969 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
4970 | *) ac_file_in="${ac_file}.in" ;; | |
4971 | esac | |
4972 | ||
5c04f4f7 | 4973 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
4f965b81 MM |
4974 | |
4975 | # Remove last slash and all that follows it. Not all systems have dirname. | |
4976 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
4977 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
4978 | # The file is in a subdirectory. | |
4979 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
4980 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
4981 | # A "../" for each directory in $ac_dir_suffix. | |
4982 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
4983 | else | |
4984 | ac_dir_suffix= ac_dots= | |
4985 | fi | |
4986 | ||
4987 | case "$ac_given_srcdir" in | |
4988 | .) srcdir=. | |
4989 | if test -z "$ac_dots"; then top_srcdir=. | |
4990 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
4991 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
4992 | *) # Relative path. | |
4993 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
4994 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
4995 | esac | |
4996 | ||
78c09e4a JM |
4997 | case "$ac_given_INSTALL" in |
4998 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
4999 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
5000 | esac | |
5c04f4f7 | 5001 | |
4f965b81 MM |
5002 | echo creating "$ac_file" |
5003 | rm -f "$ac_file" | |
5004 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
5005 | case "$ac_file" in | |
5006 | *Makefile*) ac_comsub="1i\\ | |
5007 | # $configure_input" ;; | |
5008 | *) ac_comsub= ;; | |
5009 | esac | |
5c04f4f7 MM |
5010 | |
5011 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
4f965b81 MM |
5012 | sed -e "$ac_comsub |
5013 | s%@configure_input@%$configure_input%g | |
5014 | s%@srcdir@%$srcdir%g | |
5015 | s%@top_srcdir@%$top_srcdir%g | |
78c09e4a | 5016 | s%@INSTALL@%$INSTALL%g |
5c04f4f7 | 5017 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
4f965b81 | 5018 | fi; done |
5c04f4f7 | 5019 | rm -f conftest.s* |
4f965b81 | 5020 | |
4b935ed4 MM |
5021 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
5022 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
5023 | # | |
5024 | # ac_d sets the value in "#define NAME VALUE" lines. | |
5025 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
5026 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
5027 | ac_dC='\3' | |
5028 | ac_dD='%g' | |
5029 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
5030 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5031 | ac_uB='\([ ]\)%\1#\2define\3' | |
5032 | ac_uC=' ' | |
5033 | ac_uD='\4%g' | |
5034 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
5035 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5036 | ac_eB='$%\1#\2define\3' | |
5037 | ac_eC=' ' | |
5038 | ac_eD='%g' | |
5039 | ||
5c04f4f7 MM |
5040 | if test "${CONFIG_HEADERS+set}" != set; then |
5041 | EOF | |
5042 | cat >> $CONFIG_STATUS <<EOF | |
5043 | CONFIG_HEADERS="config.h:config.in" | |
5044 | EOF | |
5045 | cat >> $CONFIG_STATUS <<\EOF | |
5046 | fi | |
4b935ed4 | 5047 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
5c04f4f7 | 5048 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
4b935ed4 | 5049 | case "$ac_file" in |
5c04f4f7 | 5050 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
4b935ed4 MM |
5051 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
5052 | *) ac_file_in="${ac_file}.in" ;; | |
5053 | esac | |
5054 | ||
5055 | echo creating $ac_file | |
4f965b81 | 5056 | |
4b935ed4 | 5057 | rm -f conftest.frag conftest.in conftest.out |
5c04f4f7 MM |
5058 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
5059 | cat $ac_file_inputs > conftest.in | |
4f965b81 | 5060 | |
4b935ed4 MM |
5061 | EOF |
5062 | ||
5063 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
5064 | # the proper values into config.h.in to produce config.h. And first: | |
1f1e5dd8 | 5065 | # Protect against being on the right side of a sed subst in config.status. |
4b935ed4 MM |
5066 | # Protect against being in an unquoted here document in config.status. |
5067 | rm -f conftest.vals | |
5068 | cat > conftest.hdr <<\EOF | |
5069 | s/[\\&%]/\\&/g | |
5070 | s%[\\$`]%\\&%g | |
88f1eac4 | 5071 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
4b935ed4 MM |
5072 | s%ac_d%ac_u%gp |
5073 | s%ac_u%ac_e%gp | |
5074 | EOF | |
5075 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
5076 | rm -f conftest.hdr | |
5077 | ||
5078 | # This sed command replaces #undef with comments. This is necessary, for | |
5079 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
5080 | # on some systems where configure will not decide to define it. | |
5081 | cat >> conftest.vals <<\EOF | |
5082 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
5083 | EOF | |
5084 | ||
5085 | # Break up conftest.vals because some shells have a limit on | |
5086 | # the size of here documents, and old seds have small limits too. | |
4b935ed4 MM |
5087 | |
5088 | rm -f conftest.tail | |
5089 | while : | |
5090 | do | |
5091 | ac_lines=`grep -c . conftest.vals` | |
5092 | # grep -c gives empty output for an empty file on some AIX systems. | |
5093 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
5094 | # Write a limited-size here document to conftest.frag. | |
5095 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
5096 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
5097 | echo 'CEOF | |
5098 | sed -f conftest.frag conftest.in > conftest.out | |
5099 | rm -f conftest.in | |
5100 | mv conftest.out conftest.in | |
5101 | ' >> $CONFIG_STATUS | |
5102 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
5103 | rm -f conftest.vals | |
5104 | mv conftest.tail conftest.vals | |
5105 | done | |
5106 | rm -f conftest.vals | |
5107 | ||
5108 | cat >> $CONFIG_STATUS <<\EOF | |
5109 | rm -f conftest.frag conftest.h | |
5110 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
5111 | cat conftest.in >> conftest.h | |
5112 | rm -f conftest.in | |
5113 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
5114 | echo "$ac_file is unchanged" | |
5115 | rm -f conftest.h | |
5116 | else | |
88f1eac4 MM |
5117 | # Remove last slash and all that follows it. Not all systems have dirname. |
5118 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
5119 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
5120 | # The file is in a subdirectory. | |
5121 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
5122 | fi | |
4b935ed4 MM |
5123 | rm -f $ac_file |
5124 | mv conftest.h $ac_file | |
5125 | fi | |
5126 | fi; done | |
5127 | ||
5c04f4f7 MM |
5128 | EOF |
5129 | cat >> $CONFIG_STATUS <<EOF | |
4b935ed4 | 5130 | |
5c04f4f7 MM |
5131 | EOF |
5132 | cat >> $CONFIG_STATUS <<\EOF | |
4b935ed4 | 5133 | case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac |
4f965b81 MM |
5134 | exit 0 |
5135 | EOF | |
5136 | chmod +x $CONFIG_STATUS | |
5137 | rm -fr confdefs* $ac_clean_files | |
5138 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
5139 |