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