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