Commit | Line | Data |
---|---|---|
5436fc65 C |
1 | #! /bin/sh |
2 | ||
b93f016b 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 | ||
292 | ||
293 | ||
294 | ||
295 | ||
296 | ||
297 | ||
298 | ||
299 | ||
300 | ||
301 | ||
302 | ||
303 | ||
304 | # Do all the work for Automake. This macro actually does too much -- | |
305 | # some checks are only needed if your package does certain things. | |
306 | # But this isn't really a big deal. | |
307 | ||
308 | # serial 1 | |
309 | ||
310 | ||
311 | ||
312 | ||
313 | ||
314 | # serial 1 | |
315 | ||
316 | ||
317 | ||
318 | # | |
319 | # Check to make sure that the build environment is sane. | |
320 | # | |
321 | ||
322 | ||
323 | ||
324 | ||
325 | ||
326 | ||
327 | # serial 25 AM_PROG_LIBTOOL | |
328 | ||
329 | ||
330 | # AM_ENABLE_SHARED - implement the --enable-shared flag | |
331 | # Usage: AM_ENABLE_SHARED[(DEFAULT)] | |
332 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
333 | # `yes'. | |
334 | ||
335 | ||
336 | # AM_DISABLE_SHARED - set the default shared flag to --disable-shared | |
337 | ||
338 | ||
339 | # AM_DISABLE_STATIC - set the default static flag to --disable-static | |
340 | ||
341 | ||
342 | # AM_ENABLE_STATIC - implement the --enable-static flag | |
343 | # Usage: AM_ENABLE_STATIC[(DEFAULT)] | |
344 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
345 | # `yes'. | |
346 | ||
347 | ||
348 | ||
349 | # AM_PROG_LD - find the path to the GNU or non-GNU linker | |
350 | ||
351 | ||
352 | ||
353 | ||
354 | # AM_PROG_NM - find the path to a BSD-compatible name lister | |
355 | ||
356 | ||
357 | # AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32 | |
358 | ||
359 | ||
360 | # Like AC_CONFIG_HEADER, but automatically create stamp file. | |
361 | ||
362 | ||
363 | ||
364 | # Add --enable-maintainer-mode option to configure. | |
365 | # From Jim Meyering | |
366 | ||
367 | # serial 1 | |
368 | ||
369 | ||
370 | ||
371 | # Check to see if we're running under Cygwin32, without using | |
372 | # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes". | |
373 | # Otherwise set it to "no". | |
374 | ||
375 | ||
376 | ||
377 | # Check to see if we're running under Win32, without using | |
378 | # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe". | |
379 | # Otherwise set it to "". | |
380 | ||
381 | ||
382 | ||
383 | # Check to see if we're running under Mingw, without using | |
384 | # AC_CANONICAL_*. If so, set output variable MINGW32 to "yes". | |
385 | # Otherwise set it to "no". | |
386 | ||
387 | ||
388 | ||
389 | # This file is derived from `gettext.m4'. The difference is that the | |
390 | # included macros assume Cygnus-style source and build trees. | |
391 | ||
392 | # Macro to add for using GNU gettext. | |
393 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
394 | # | |
395 | # This file file be copied and used freely without restrictions. It can | |
396 | # be used in projects which are not available under the GNU Public License | |
397 | # but which still want to provide support for the GNU gettext functionality. | |
398 | # Please note that the actual code is *not* freely available. | |
399 | ||
400 | # serial 3 | |
401 | ||
402 | ||
403 | ||
404 | ||
405 | ||
406 | # Search path for a program which passes the given test. | |
407 | # Ulrich Drepper <drepper@cygnus.com>, 1996. | |
408 | # | |
409 | # This file file be copied and used freely without restrictions. It can | |
410 | # be used in projects which are not available under the GNU Public License | |
411 | # but which still want to provide support for the GNU gettext functionality. | |
412 | # Please note that the actual code is *not* freely available. | |
413 | ||
414 | # serial 1 | |
415 | ||
416 | ||
417 | ||
418 | # Check whether LC_MESSAGES is available in <locale.h>. | |
419 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
420 | # | |
421 | # This file file be copied and used freely without restrictions. It can | |
422 | # be used in projects which are not available under the GNU Public License | |
423 | # but which still want to provide support for the GNU gettext functionality. | |
424 | # Please note that the actual code is *not* freely available. | |
425 | ||
426 | # serial 1 | |
427 | ||
428 | ||
429 | ||
430 | ||
431 | ||
432 | ||
433 | ||
434 | ||
435 | # | |
436 | # Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This | |
437 | # makes configure think it's cross compiling. If --target wasn't used, then | |
438 | # we can't configure, so something is wrong. We don't use the cache | |
439 | # here cause if somebody fixes their compiler install, we want this to work. | |
440 | ||
441 | ||
442 | ||
443 | ||
444 | ||
445 | ||
446 | ||
447 | # Defined as a separate macro so we don't have to cache the values | |
448 | # from PATH_TCLCONFIG (because this can also be cached). | |
449 | ||
450 | ||
451 | # Warning: Tk definitions are very similar to Tcl definitions but | |
452 | # are not precisely the same. There are a couple of differences, | |
453 | # so don't do changes to Tcl thinking you can cut and paste it do | |
454 | # the Tk differences and later simply substitute "Tk" for "Tcl". | |
455 | # Known differences: | |
456 | # - Acceptable Tcl major version #s is 7-9 while Tk is 4-9 | |
457 | # - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h | |
458 | # - Computing major/minor versions is different because Tk depends on | |
459 | # headers to Tcl, Tk, and X. | |
460 | # - Symbols in tkConfig.sh are different than tclConfig.sh | |
461 | # - Acceptable for Tk to be missing but not Tcl. | |
462 | ||
463 | ||
464 | ||
465 | ||
466 | ||
467 | ||
468 | # Defined as a separate macro so we don't have to cache the values | |
469 | # from PATH_TKCONFIG (because this can also be cached). | |
470 | ||
471 | ||
472 | ||
473 | # check for Itcl headers. | |
474 | ||
475 | ||
476 | ||
477 | # check for Tix headers. | |
478 | ||
479 | ||
5436fc65 | 480 | # Guess values for system-dependent variables and create Makefiles. |
4b23e55c | 481 | # Generated automatically using autoconf version 2.12.2 |
bc859e63 | 482 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
5436fc65 C |
483 | # |
484 | # This configure script is free software; the Free Software Foundation | |
485 | # gives unlimited permission to copy, distribute and modify it. | |
486 | ||
487 | # Defaults: | |
488 | ac_help= | |
489 | ac_default_prefix=/usr/local | |
490 | # Any additions from configure.in: | |
fcfc3c0c TT |
491 | ac_help="$ac_help |
492 | --disable-nls do not use Native Language Support" | |
493 | ac_help="$ac_help | |
494 | --with-included-gettext use the GNU gettext library included here" | |
5436fc65 C |
495 | ac_help="$ac_help |
496 | --enable-netrom " | |
0728afad | 497 | ac_help="$ac_help |
b9a9cde4 | 498 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" |
ba68ad57 JM |
499 | ac_help="$ac_help |
500 | --with-mmalloc Use memory mapped malloc package" | |
287026b7 AC |
501 | ac_help="$ac_help |
502 | --enable-carp Configure alternative readaptive paradigm " | |
503 | ac_help="$ac_help | |
504 | --enable-targets alternative target configurations" | |
2476848a MH |
505 | ac_help="$ac_help |
506 | --enable-ide Enable IDE support" | |
c076f1ed | 507 | ac_help="$ac_help |
ba68ad57 | 508 | --with-foundry-libs=DIR Use the Foundry SDK in DIR" |
5436fc65 | 509 | ac_help="$ac_help |
ba68ad57 | 510 | --enable-gdbtk Enable GDBTK GUI front end" |
5436fc65 | 511 | ac_help="$ac_help |
ba68ad57 | 512 | --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)" |
4e327047 | 513 | ac_help="$ac_help |
ba68ad57 | 514 | --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)" |
4e327047 | 515 | ac_help="$ac_help |
ba68ad57 | 516 | --with-tclinclude=DIR Directory where tcl private headers are" |
4e327047 | 517 | ac_help="$ac_help |
ba68ad57 | 518 | --with-tkinclude=DIR Directory where tk private headers are" |
b236defa FCE |
519 | ac_help="$ac_help |
520 | --with-x use the X Window System" | |
521 | ac_help="$ac_help | |
ba68ad57 | 522 | --with-sim-gpu2=DIR Use GPU2 library under given DIR" |
75a55dc3 | 523 | ac_help="$ac_help |
ba68ad57 | 524 | --with-sim-funit=DIR Use target FP lib under given DIR" |
1d5eb137 | 525 | ac_help="$ac_help |
ba68ad57 | 526 | --enable-shared Use shared libraries" |
5436fc65 C |
527 | |
528 | # Initialize some variables set by options. | |
529 | # The variables have the same names as the options, with | |
530 | # dashes changed to underlines. | |
531 | build=NONE | |
532 | cache_file=./config.cache | |
533 | exec_prefix=NONE | |
534 | host=NONE | |
535 | no_create= | |
536 | nonopt=NONE | |
537 | no_recursion= | |
538 | prefix=NONE | |
539 | program_prefix=NONE | |
540 | program_suffix=NONE | |
541 | program_transform_name=s,x,x, | |
542 | silent= | |
543 | site= | |
544 | srcdir= | |
545 | target=NONE | |
546 | verbose= | |
547 | x_includes=NONE | |
548 | x_libraries=NONE | |
1a7b4b7c DE |
549 | bindir='${exec_prefix}/bin' |
550 | sbindir='${exec_prefix}/sbin' | |
551 | libexecdir='${exec_prefix}/libexec' | |
552 | datadir='${prefix}/share' | |
553 | sysconfdir='${prefix}/etc' | |
554 | sharedstatedir='${prefix}/com' | |
555 | localstatedir='${prefix}/var' | |
556 | libdir='${exec_prefix}/lib' | |
557 | includedir='${prefix}/include' | |
558 | oldincludedir='/usr/include' | |
559 | infodir='${prefix}/info' | |
560 | mandir='${prefix}/man' | |
5436fc65 C |
561 | |
562 | # Initialize some other variables. | |
563 | subdirs= | |
1a7b4b7c | 564 | MFLAGS= MAKEFLAGS= |
4b23e55c | 565 | SHELL=${CONFIG_SHELL-/bin/sh} |
bfde4a67 SG |
566 | # Maximum number of lines to put in a shell here document. |
567 | ac_max_here_lines=12 | |
5436fc65 C |
568 | |
569 | ac_prev= | |
570 | for ac_option | |
571 | do | |
572 | ||
573 | # If the previous option needs an argument, assign it. | |
574 | if test -n "$ac_prev"; then | |
575 | eval "$ac_prev=\$ac_option" | |
576 | ac_prev= | |
577 | continue | |
578 | fi | |
579 | ||
580 | case "$ac_option" in | |
581 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
582 | *) ac_optarg= ;; | |
583 | esac | |
584 | ||
585 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
586 | ||
587 | case "$ac_option" in | |
588 | ||
1a7b4b7c DE |
589 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
590 | ac_prev=bindir ;; | |
591 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
592 | bindir="$ac_optarg" ;; | |
593 | ||
594 | -build | --build | --buil | --bui | --bu) | |
5436fc65 | 595 | ac_prev=build ;; |
1a7b4b7c | 596 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
5436fc65 C |
597 | build="$ac_optarg" ;; |
598 | ||
599 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
600 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
601 | ac_prev=cache_file ;; | |
602 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
603 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
604 | cache_file="$ac_optarg" ;; | |
605 | ||
1a7b4b7c DE |
606 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
607 | ac_prev=datadir ;; | |
608 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
609 | | --da=*) | |
610 | datadir="$ac_optarg" ;; | |
611 | ||
5436fc65 C |
612 | -disable-* | --disable-*) |
613 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
614 | # Reject names that are not valid shell variable names. | |
615 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
616 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
617 | fi | |
618 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
619 | eval "enable_${ac_feature}=no" ;; | |
620 | ||
621 | -enable-* | --enable-*) | |
622 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
623 | # Reject names that are not valid shell variable names. | |
624 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
625 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
626 | fi | |
627 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
628 | case "$ac_option" in | |
629 | *=*) ;; | |
630 | *) ac_optarg=yes ;; | |
631 | esac | |
632 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
633 | ||
634 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
635 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
636 | | --exec | --exe | --ex) | |
637 | ac_prev=exec_prefix ;; | |
638 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
639 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
640 | | --exec=* | --exe=* | --ex=*) | |
641 | exec_prefix="$ac_optarg" ;; | |
642 | ||
643 | -gas | --gas | --ga | --g) | |
644 | # Obsolete; use --with-gas. | |
645 | with_gas=yes ;; | |
646 | ||
647 | -help | --help | --hel | --he) | |
648 | # Omit some internal or obsolete options to make the list less imposing. | |
649 | # This message is too long to be a string in the A/UX 3.1 sh. | |
650 | cat << EOF | |
651 | Usage: configure [options] [host] | |
652 | Options: [defaults in brackets after descriptions] | |
653 | Configuration: | |
654 | --cache-file=FILE cache test results in FILE | |
655 | --help print this message | |
656 | --no-create do not create output files | |
657 | --quiet, --silent do not print \`checking...' messages | |
658 | --version print the version of autoconf that created configure | |
659 | Directory and file names: | |
660 | --prefix=PREFIX install architecture-independent files in PREFIX | |
661 | [$ac_default_prefix] | |
1a7b4b7c | 662 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5436fc65 | 663 | [same as prefix] |
1a7b4b7c DE |
664 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
665 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
666 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
667 | --datadir=DIR read-only architecture-independent data in DIR | |
668 | [PREFIX/share] | |
669 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
670 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
671 | [PREFIX/com] | |
672 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
673 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
674 | --includedir=DIR C header files in DIR [PREFIX/include] | |
675 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
676 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
677 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
5436fc65 C |
678 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
679 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
680 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1a7b4b7c DE |
681 | --program-transform-name=PROGRAM |
682 | run sed PROGRAM on installed program names | |
683 | EOF | |
684 | cat << EOF | |
5436fc65 C |
685 | Host type: |
686 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
687 | --host=HOST configure for HOST [guessed] | |
688 | --target=TARGET configure for TARGET [TARGET=HOST] | |
689 | Features and packages: | |
690 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
691 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
692 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
693 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
694 | --x-includes=DIR X include files are in DIR | |
695 | --x-libraries=DIR X library files are in DIR | |
5436fc65 | 696 | EOF |
1a7b4b7c DE |
697 | if test -n "$ac_help"; then |
698 | echo "--enable and --with options recognized:$ac_help" | |
699 | fi | |
5436fc65 C |
700 | exit 0 ;; |
701 | ||
702 | -host | --host | --hos | --ho) | |
703 | ac_prev=host ;; | |
704 | -host=* | --host=* | --hos=* | --ho=*) | |
705 | host="$ac_optarg" ;; | |
706 | ||
1a7b4b7c DE |
707 | -includedir | --includedir | --includedi | --included | --include \ |
708 | | --includ | --inclu | --incl | --inc) | |
709 | ac_prev=includedir ;; | |
710 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
711 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
712 | includedir="$ac_optarg" ;; | |
713 | ||
714 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
715 | ac_prev=infodir ;; | |
716 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
717 | infodir="$ac_optarg" ;; | |
718 | ||
719 | -libdir | --libdir | --libdi | --libd) | |
720 | ac_prev=libdir ;; | |
721 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
722 | libdir="$ac_optarg" ;; | |
723 | ||
724 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
725 | | --libexe | --libex | --libe) | |
726 | ac_prev=libexecdir ;; | |
727 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
728 | | --libexe=* | --libex=* | --libe=*) | |
729 | libexecdir="$ac_optarg" ;; | |
730 | ||
731 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
732 | | --localstate | --localstat | --localsta | --localst \ | |
733 | | --locals | --local | --loca | --loc | --lo) | |
734 | ac_prev=localstatedir ;; | |
735 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
736 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
737 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
738 | localstatedir="$ac_optarg" ;; | |
739 | ||
740 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
741 | ac_prev=mandir ;; | |
742 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
743 | mandir="$ac_optarg" ;; | |
744 | ||
5436fc65 C |
745 | -nfp | --nfp | --nf) |
746 | # Obsolete; use --without-fp. | |
747 | with_fp=no ;; | |
748 | ||
749 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
750 | | --no-cr | --no-c) | |
751 | no_create=yes ;; | |
752 | ||
753 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
754 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
755 | no_recursion=yes ;; | |
756 | ||
1a7b4b7c DE |
757 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
758 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
759 | | --oldin | --oldi | --old | --ol | --o) | |
760 | ac_prev=oldincludedir ;; | |
761 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
762 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
763 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
764 | oldincludedir="$ac_optarg" ;; | |
765 | ||
5436fc65 C |
766 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
767 | ac_prev=prefix ;; | |
768 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
769 | prefix="$ac_optarg" ;; | |
770 | ||
771 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
772 | | --program-pre | --program-pr | --program-p) | |
773 | ac_prev=program_prefix ;; | |
774 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
775 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
776 | program_prefix="$ac_optarg" ;; | |
777 | ||
778 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
779 | | --program-suf | --program-su | --program-s) | |
780 | ac_prev=program_suffix ;; | |
781 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
782 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
783 | program_suffix="$ac_optarg" ;; | |
784 | ||
785 | -program-transform-name | --program-transform-name \ | |
786 | | --program-transform-nam | --program-transform-na \ | |
787 | | --program-transform-n | --program-transform- \ | |
788 | | --program-transform | --program-transfor \ | |
789 | | --program-transfo | --program-transf \ | |
790 | | --program-trans | --program-tran \ | |
791 | | --progr-tra | --program-tr | --program-t) | |
792 | ac_prev=program_transform_name ;; | |
793 | -program-transform-name=* | --program-transform-name=* \ | |
794 | | --program-transform-nam=* | --program-transform-na=* \ | |
795 | | --program-transform-n=* | --program-transform-=* \ | |
796 | | --program-transform=* | --program-transfor=* \ | |
797 | | --program-transfo=* | --program-transf=* \ | |
798 | | --program-trans=* | --program-tran=* \ | |
799 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
800 | program_transform_name="$ac_optarg" ;; | |
801 | ||
802 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
803 | | -silent | --silent | --silen | --sile | --sil) | |
804 | silent=yes ;; | |
805 | ||
1a7b4b7c DE |
806 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
807 | ac_prev=sbindir ;; | |
808 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
809 | | --sbi=* | --sb=*) | |
810 | sbindir="$ac_optarg" ;; | |
811 | ||
812 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
813 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
814 | | --sharedst | --shareds | --shared | --share | --shar \ | |
815 | | --sha | --sh) | |
816 | ac_prev=sharedstatedir ;; | |
817 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
818 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
819 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
820 | | --sha=* | --sh=*) | |
821 | sharedstatedir="$ac_optarg" ;; | |
822 | ||
5436fc65 C |
823 | -site | --site | --sit) |
824 | ac_prev=site ;; | |
825 | -site=* | --site=* | --sit=*) | |
826 | site="$ac_optarg" ;; | |
827 | ||
828 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
829 | ac_prev=srcdir ;; | |
830 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
831 | srcdir="$ac_optarg" ;; | |
832 | ||
1a7b4b7c DE |
833 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
834 | | --syscon | --sysco | --sysc | --sys | --sy) | |
835 | ac_prev=sysconfdir ;; | |
836 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
837 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
838 | sysconfdir="$ac_optarg" ;; | |
839 | ||
5436fc65 C |
840 | -target | --target | --targe | --targ | --tar | --ta | --t) |
841 | ac_prev=target ;; | |
842 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
843 | target="$ac_optarg" ;; | |
844 | ||
845 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
846 | verbose=yes ;; | |
847 | ||
848 | -version | --version | --versio | --versi | --vers) | |
4b23e55c | 849 | echo "configure generated by autoconf version 2.12.2" |
5436fc65 C |
850 | exit 0 ;; |
851 | ||
852 | -with-* | --with-*) | |
853 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
854 | # Reject names that are not valid shell variable names. | |
855 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
856 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
857 | fi | |
858 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
859 | case "$ac_option" in | |
860 | *=*) ;; | |
861 | *) ac_optarg=yes ;; | |
862 | esac | |
863 | eval "with_${ac_package}='$ac_optarg'" ;; | |
864 | ||
865 | -without-* | --without-*) | |
866 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
867 | # Reject names that are not valid shell variable names. | |
868 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
869 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
870 | fi | |
871 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
872 | eval "with_${ac_package}=no" ;; | |
873 | ||
874 | --x) | |
875 | # Obsolete; use --with-x. | |
876 | with_x=yes ;; | |
877 | ||
878 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
879 | | --x-incl | --x-inc | --x-in | --x-i) | |
880 | ac_prev=x_includes ;; | |
881 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
882 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
883 | x_includes="$ac_optarg" ;; | |
884 | ||
885 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
886 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
887 | ac_prev=x_libraries ;; | |
888 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
889 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
890 | x_libraries="$ac_optarg" ;; | |
891 | ||
892 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
893 | ;; | |
894 | ||
1a7b4b7c | 895 | *) |
5436fc65 C |
896 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
897 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
898 | fi | |
899 | if test "x$nonopt" != xNONE; then | |
900 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
901 | fi | |
902 | nonopt="$ac_option" | |
903 | ;; | |
904 | ||
905 | esac | |
906 | done | |
907 | ||
908 | if test -n "$ac_prev"; then | |
909 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
910 | fi | |
911 | ||
912 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
913 | ||
914 | # File descriptor usage: | |
915 | # 0 standard input | |
916 | # 1 file creation | |
917 | # 2 errors and warnings | |
918 | # 3 some systems may open it to /dev/tty | |
919 | # 4 used on the Kubota Titan | |
920 | # 6 checking for... messages and results | |
921 | # 5 compiler messages saved in config.log | |
922 | if test "$silent" = yes; then | |
923 | exec 6>/dev/null | |
924 | else | |
925 | exec 6>&1 | |
926 | fi | |
927 | exec 5>./config.log | |
928 | ||
929 | echo "\ | |
930 | This file contains any messages produced by compilers while | |
931 | running configure, to aid debugging if configure makes a mistake. | |
932 | " 1>&5 | |
933 | ||
934 | # Strip out --no-create and --no-recursion so they do not pile up. | |
935 | # Also quote any args containing shell metacharacters. | |
936 | ac_configure_args= | |
937 | for ac_arg | |
938 | do | |
939 | case "$ac_arg" in | |
940 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
941 | | --no-cr | --no-c) ;; | |
942 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
943 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
944 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
945 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
946 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
947 | esac | |
948 | done | |
949 | ||
950 | # NLS nuisances. | |
bfde4a67 SG |
951 | # Only set these to C if already set. These must not be set unconditionally |
952 | # because not all systems understand e.g. LANG=C (notably SCO). | |
953 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
954 | # Non-C LC_CTYPE values break the ctype check. | |
ef6c51d1 | 955 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
bfde4a67 SG |
956 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
957 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
958 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
5436fc65 C |
959 | |
960 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
961 | rm -rf conftest* confdefs.h | |
962 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
963 | echo > confdefs.h | |
964 | ||
965 | # A filename unique to this package, relative to the directory that | |
966 | # configure is in, which we can look for to find out if srcdir is correct. | |
967 | ac_unique_file=main.c | |
968 | ||
969 | # Find the source files, if location was not specified. | |
970 | if test -z "$srcdir"; then | |
971 | ac_srcdir_defaulted=yes | |
972 | # Try the directory containing this script, then its parent. | |
973 | ac_prog=$0 | |
974 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
975 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
976 | srcdir=$ac_confdir | |
977 | if test ! -r $srcdir/$ac_unique_file; then | |
978 | srcdir=.. | |
979 | fi | |
980 | else | |
981 | ac_srcdir_defaulted=no | |
982 | fi | |
983 | if test ! -r $srcdir/$ac_unique_file; then | |
984 | if test "$ac_srcdir_defaulted" = yes; then | |
985 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
986 | else | |
987 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
988 | fi | |
989 | fi | |
990 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
991 | ||
992 | # Prefer explicitly selected file to automatically selected ones. | |
993 | if test -z "$CONFIG_SITE"; then | |
994 | if test "x$prefix" != xNONE; then | |
995 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
996 | else | |
997 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
998 | fi | |
999 | fi | |
1000 | for ac_site_file in $CONFIG_SITE; do | |
1001 | if test -r "$ac_site_file"; then | |
1002 | echo "loading site script $ac_site_file" | |
1003 | . "$ac_site_file" | |
1004 | fi | |
1005 | done | |
1006 | ||
1007 | if test -r "$cache_file"; then | |
1008 | echo "loading cache $cache_file" | |
1009 | . $cache_file | |
1010 | else | |
1011 | echo "creating cache $cache_file" | |
1012 | > $cache_file | |
1013 | fi | |
1014 | ||
1015 | ac_ext=c | |
1016 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3dedc867 | 1017 | ac_cpp='$CPP $CPPFLAGS' |
1a7b4b7c | 1018 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
4b23e55c | 1019 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
bfde4a67 | 1020 | cross_compiling=$ac_cv_prog_cc_cross |
5436fc65 | 1021 | |
4b23e55c JM |
1022 | ac_exeext= |
1023 | ac_objext=o | |
5436fc65 C |
1024 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
1025 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
1026 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
1027 | ac_n= ac_c=' | |
1028 | ' ac_t=' ' | |
1029 | else | |
1030 | ac_n=-n ac_c= ac_t= | |
1031 | fi | |
1032 | else | |
1033 | ac_n= ac_c='\c' ac_t= | |
1034 | fi | |
1035 | ||
1036 | ||
1037 | ||
db210d08 | 1038 | |
5436fc65 C |
1039 | # Extract the first word of "gcc", so it can be a program name with args. |
1040 | set dummy gcc; ac_word=$2 | |
1041 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 1042 | echo "configure:1043: checking for $ac_word" >&5 |
5436fc65 C |
1043 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1044 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1045 | else | |
1046 | if test -n "$CC"; then | |
1047 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1048 | else | |
4b23e55c | 1049 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
1050 | ac_dummy="$PATH" |
1051 | for ac_dir in $ac_dummy; do | |
5436fc65 C |
1052 | test -z "$ac_dir" && ac_dir=. |
1053 | if test -f $ac_dir/$ac_word; then | |
1054 | ac_cv_prog_CC="gcc" | |
1055 | break | |
1056 | fi | |
1057 | done | |
1058 | IFS="$ac_save_ifs" | |
5436fc65 C |
1059 | fi |
1060 | fi | |
1061 | CC="$ac_cv_prog_CC" | |
1062 | if test -n "$CC"; then | |
1063 | echo "$ac_t""$CC" 1>&6 | |
1064 | else | |
1065 | echo "$ac_t""no" 1>&6 | |
1066 | fi | |
1067 | ||
1a7b4b7c DE |
1068 | if test -z "$CC"; then |
1069 | # Extract the first word of "cc", so it can be a program name with args. | |
1070 | set dummy cc; ac_word=$2 | |
1071 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 1072 | echo "configure:1073: checking for $ac_word" >&5 |
1a7b4b7c DE |
1073 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1074 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1075 | else | |
1076 | if test -n "$CC"; then | |
1077 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1078 | else | |
4b23e55c | 1079 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1a7b4b7c | 1080 | ac_prog_rejected=no |
b93f016b GN |
1081 | ac_dummy="$PATH" |
1082 | for ac_dir in $ac_dummy; do | |
1a7b4b7c DE |
1083 | test -z "$ac_dir" && ac_dir=. |
1084 | if test -f $ac_dir/$ac_word; then | |
1085 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1086 | ac_prog_rejected=yes | |
1087 | continue | |
1088 | fi | |
1089 | ac_cv_prog_CC="cc" | |
1090 | break | |
1091 | fi | |
1092 | done | |
1093 | IFS="$ac_save_ifs" | |
1094 | if test $ac_prog_rejected = yes; then | |
1095 | # We found a bogon in the path, so make sure we never use it. | |
1096 | set dummy $ac_cv_prog_CC | |
1097 | shift | |
1098 | if test $# -gt 0; then | |
1099 | # We chose a different compiler from the bogus one. | |
1100 | # However, it has the same basename, so the bogon will be chosen | |
1101 | # first if we set CC to just the basename; use the full file name. | |
1102 | shift | |
1103 | set dummy "$ac_dir/$ac_word" "$@" | |
1104 | shift | |
1105 | ac_cv_prog_CC="$@" | |
1106 | fi | |
1107 | fi | |
1108 | fi | |
1109 | fi | |
1110 | CC="$ac_cv_prog_CC" | |
1111 | if test -n "$CC"; then | |
1112 | echo "$ac_t""$CC" 1>&6 | |
1113 | else | |
1114 | echo "$ac_t""no" 1>&6 | |
1115 | fi | |
1116 | ||
4b23e55c JM |
1117 | if test -z "$CC"; then |
1118 | case "`uname -s`" in | |
1119 | *win32* | *WIN32*) | |
1120 | # Extract the first word of "cl", so it can be a program name with args. | |
1121 | set dummy cl; ac_word=$2 | |
1122 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 1123 | echo "configure:1124: checking for $ac_word" >&5 |
4b23e55c JM |
1124 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1126 | else | |
1127 | if test -n "$CC"; then | |
1128 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1129 | else | |
1130 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
b93f016b GN |
1131 | ac_dummy="$PATH" |
1132 | for ac_dir in $ac_dummy; do | |
4b23e55c JM |
1133 | test -z "$ac_dir" && ac_dir=. |
1134 | if test -f $ac_dir/$ac_word; then | |
1135 | ac_cv_prog_CC="cl" | |
1136 | break | |
1137 | fi | |
1138 | done | |
1139 | IFS="$ac_save_ifs" | |
1140 | fi | |
1141 | fi | |
1142 | CC="$ac_cv_prog_CC" | |
1143 | if test -n "$CC"; then | |
1144 | echo "$ac_t""$CC" 1>&6 | |
1145 | else | |
1146 | echo "$ac_t""no" 1>&6 | |
1147 | fi | |
1148 | ;; | |
1149 | esac | |
1150 | fi | |
1a7b4b7c DE |
1151 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
1152 | fi | |
5436fc65 | 1153 | |
bfde4a67 | 1154 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
b93f016b | 1155 | echo "configure:1156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
bfde4a67 SG |
1156 | |
1157 | ac_ext=c | |
1158 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1159 | ac_cpp='$CPP $CPPFLAGS' | |
1160 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
4b23e55c | 1161 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
bfde4a67 SG |
1162 | cross_compiling=$ac_cv_prog_cc_cross |
1163 | ||
b93f016b GN |
1164 | cat > conftest.$ac_ext << EOF |
1165 | ||
1166 | #line 1167 "configure" | |
bfde4a67 | 1167 | #include "confdefs.h" |
b93f016b | 1168 | |
bfde4a67 SG |
1169 | main(){return(0);} |
1170 | EOF | |
b93f016b | 1171 | if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
bfde4a67 SG |
1172 | ac_cv_prog_cc_works=yes |
1173 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1174 | if (./conftest; exit) 2>/dev/null; then | |
1175 | ac_cv_prog_cc_cross=no | |
1176 | else | |
1177 | ac_cv_prog_cc_cross=yes | |
1178 | fi | |
1179 | else | |
1180 | echo "configure: failed program was:" >&5 | |
1181 | cat conftest.$ac_ext >&5 | |
1182 | ac_cv_prog_cc_works=no | |
1183 | fi | |
1184 | rm -fr conftest* | |
b93f016b GN |
1185 | ac_ext=c |
1186 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1187 | ac_cpp='$CPP $CPPFLAGS' | |
1188 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1189 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1190 | cross_compiling=$ac_cv_prog_cc_cross | |
bfde4a67 SG |
1191 | |
1192 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1193 | if test $ac_cv_prog_cc_works = no; then | |
1194 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1195 | fi | |
1196 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
b93f016b | 1197 | echo "configure:1198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
bfde4a67 SG |
1198 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1199 | cross_compiling=$ac_cv_prog_cc_cross | |
1200 | ||
5436fc65 | 1201 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
b93f016b | 1202 | echo "configure:1203: checking whether we are using GNU C" >&5 |
5436fc65 C |
1203 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1204 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1205 | else | |
1206 | cat > conftest.c <<EOF | |
1207 | #ifdef __GNUC__ | |
1208 | yes; | |
1209 | #endif | |
1210 | EOF | |
b93f016b | 1211 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
5436fc65 C |
1212 | ac_cv_prog_gcc=yes |
1213 | else | |
1214 | ac_cv_prog_gcc=no | |
1215 | fi | |
1216 | fi | |
1a7b4b7c | 1217 | |
5436fc65 | 1218 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
bfde4a67 | 1219 | |
5436fc65 C |
1220 | if test $ac_cv_prog_gcc = yes; then |
1221 | GCC=yes | |
4b23e55c JM |
1222 | else |
1223 | GCC= | |
1224 | fi | |
1225 | ||
1226 | ac_test_CFLAGS="${CFLAGS+set}" | |
1227 | ac_save_CFLAGS="$CFLAGS" | |
1228 | CFLAGS= | |
1229 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
b93f016b | 1230 | echo "configure:1231: checking whether ${CC-cc} accepts -g" >&5 |
bfde4a67 | 1231 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
5436fc65 C |
1232 | echo $ac_n "(cached) $ac_c" 1>&6 |
1233 | else | |
1234 | echo 'void f(){}' > conftest.c | |
1235 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
bfde4a67 | 1236 | ac_cv_prog_cc_g=yes |
5436fc65 | 1237 | else |
bfde4a67 | 1238 | ac_cv_prog_cc_g=no |
5436fc65 C |
1239 | fi |
1240 | rm -f conftest* | |
1241 | ||
1242 | fi | |
1a7b4b7c | 1243 | |
bfde4a67 | 1244 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
4b23e55c JM |
1245 | if test "$ac_test_CFLAGS" = set; then |
1246 | CFLAGS="$ac_save_CFLAGS" | |
1247 | elif test $ac_cv_prog_cc_g = yes; then | |
1248 | if test "$GCC" = yes; then | |
bfde4a67 SG |
1249 | CFLAGS="-g -O2" |
1250 | else | |
4b23e55c | 1251 | CFLAGS="-g" |
6ee3e5d6 | 1252 | fi |
ba68ad57 | 1253 | else |
4b23e55c JM |
1254 | if test "$GCC" = yes; then |
1255 | CFLAGS="-O2" | |
1256 | else | |
1257 | CFLAGS= | |
1258 | fi | |
5436fc65 C |
1259 | fi |
1260 | ||
1261 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
b93f016b | 1262 | echo "configure:1263: checking how to run the C preprocessor" >&5 |
5436fc65 C |
1263 | # On Suns, sometimes $CPP names a directory. |
1264 | if test -n "$CPP" && test -d "$CPP"; then | |
1265 | CPP= | |
1266 | fi | |
1267 | if test -z "$CPP"; then | |
1268 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1269 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1270 | else | |
1271 | # This must be in double quotes, not single quotes, because CPP may get | |
1272 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1273 | CPP="${CC-cc} -E" | |
1274 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1275 | # not just through cpp. | |
1276 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1277 | #line 1278 "configure" |
5436fc65 C |
1278 | #include "confdefs.h" |
1279 | #include <assert.h> | |
1280 | Syntax Error | |
1281 | EOF | |
1a7b4b7c | 1282 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b93f016b | 1283 | { (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 1284 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
1285 | if test -z "$ac_err"; then |
1286 | : | |
1287 | else | |
1288 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1289 | echo "configure: failed program was:" >&5 |
1290 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
1291 | rm -rf conftest* |
1292 | CPP="${CC-cc} -E -traditional-cpp" | |
1293 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1294 | #line 1295 "configure" |
4b23e55c JM |
1295 | #include "confdefs.h" |
1296 | #include <assert.h> | |
1297 | Syntax Error | |
1298 | EOF | |
1299 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 1300 | { (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c JM |
1301 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1302 | if test -z "$ac_err"; then | |
1303 | : | |
1304 | else | |
1305 | echo "$ac_err" >&5 | |
1306 | echo "configure: failed program was:" >&5 | |
1307 | cat conftest.$ac_ext >&5 | |
1308 | rm -rf conftest* | |
1309 | CPP="${CC-cc} -nologo -E" | |
1310 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1311 | #line 1312 "configure" |
eac4afd1 JM |
1312 | #include "confdefs.h" |
1313 | #include <assert.h> | |
1314 | Syntax Error | |
1315 | EOF | |
1316 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 1317 | { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 1318 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
1319 | if test -z "$ac_err"; then |
1320 | : | |
1321 | else | |
1322 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1323 | echo "configure: failed program was:" >&5 |
1324 | cat conftest.$ac_ext >&5 | |
5436fc65 | 1325 | rm -rf conftest* |
fcfc3c0c TT |
1326 | CPP=/lib/cpp |
1327 | fi | |
1328 | rm -f conftest* | |
1329 | fi | |
4b23e55c JM |
1330 | rm -f conftest* |
1331 | fi | |
fcfc3c0c TT |
1332 | rm -f conftest* |
1333 | ac_cv_prog_CPP="$CPP" | |
1334 | fi | |
1335 | CPP="$ac_cv_prog_CPP" | |
1336 | else | |
1337 | ac_cv_prog_CPP="$CPP" | |
1338 | fi | |
1339 | echo "$ac_t""$CPP" 1>&6 | |
1340 | ||
1341 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
b93f016b | 1342 | echo "configure:1343: checking for AIX" >&5 |
fcfc3c0c | 1343 | cat > conftest.$ac_ext <<EOF |
b93f016b | 1344 | #line 1345 "configure" |
fcfc3c0c TT |
1345 | #include "confdefs.h" |
1346 | #ifdef _AIX | |
1347 | yes | |
1348 | #endif | |
1349 | ||
1350 | EOF | |
1351 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1352 | egrep "yes" >/dev/null 2>&1; then | |
1353 | rm -rf conftest* | |
1354 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
1355 | #define _ALL_SOURCE 1 | |
1356 | EOF | |
1357 | ||
1358 | else | |
1359 | rm -rf conftest* | |
1360 | echo "$ac_t""no" 1>&6 | |
1361 | fi | |
1362 | rm -f conftest* | |
1363 | ||
1364 | ||
fcfc3c0c | 1365 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
b93f016b | 1366 | echo "configure:1367: checking for POSIXized ISC" >&5 |
fcfc3c0c TT |
1367 | if test -d /etc/conf/kconfig.d && |
1368 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
1369 | then | |
1370 | echo "$ac_t""yes" 1>&6 | |
1371 | ISC=yes # If later tests want to check for ISC. | |
1372 | cat >> confdefs.h <<\EOF | |
1373 | #define _POSIX_SOURCE 1 | |
1374 | EOF | |
1375 | ||
1376 | if test "$GCC" = yes; then | |
1377 | CC="$CC -posix" | |
1378 | else | |
1379 | CC="$CC -Xp" | |
1380 | fi | |
1381 | else | |
1382 | echo "$ac_t""no" 1>&6 | |
1383 | ISC= | |
1384 | fi | |
1385 | ||
1386 | ||
fcfc3c0c TT |
1387 | ac_aux_dir= |
1388 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
1389 | if test -f $ac_dir/install-sh; then | |
1390 | ac_aux_dir=$ac_dir | |
1391 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1392 | break | |
1393 | elif test -f $ac_dir/install.sh; then | |
1394 | ac_aux_dir=$ac_dir | |
1395 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1396 | break | |
1397 | fi | |
1398 | done | |
1399 | if test -z "$ac_aux_dir"; then | |
1400 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
1401 | fi | |
1402 | ac_config_guess=$ac_aux_dir/config.guess | |
1403 | ac_config_sub=$ac_aux_dir/config.sub | |
1404 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1405 | ||
1406 | ||
1407 | # Do some error checking and defaulting for the host and target type. | |
1408 | # The inputs are: | |
1409 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1410 | # | |
1411 | # The rules are: | |
1412 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1413 | # same time. | |
1414 | # 2. Host defaults to nonopt. | |
1415 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1416 | # as determined by config.guess. | |
1417 | # 4. Target and build default to nonopt. | |
1418 | # 5. If nonopt is not specified, then target and build default to host. | |
1419 | ||
1420 | # The aliases save the names the user supplied, while $host etc. | |
1421 | # will get canonicalized. | |
1422 | case $host---$target---$nonopt in | |
1423 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1424 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1425 | esac | |
1426 | ||
1427 | ||
1428 | # Make sure we can run config.sub. | |
4b23e55c | 1429 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
fcfc3c0c TT |
1430 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
1431 | fi | |
1432 | ||
1433 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
b93f016b | 1434 | echo "configure:1435: checking host system type" >&5 |
fcfc3c0c TT |
1435 | |
1436 | host_alias=$host | |
1437 | case "$host_alias" in | |
1438 | NONE) | |
1439 | case $nonopt in | |
1440 | NONE) | |
4b23e55c | 1441 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
fcfc3c0c TT |
1442 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
1443 | fi ;; | |
1444 | *) host_alias=$nonopt ;; | |
1445 | esac ;; | |
1446 | esac | |
1447 | ||
4b23e55c | 1448 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
fcfc3c0c TT |
1449 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1450 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1451 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1452 | echo "$ac_t""$host" 1>&6 | |
1453 | ||
1454 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
b93f016b | 1455 | echo "configure:1456: checking target system type" >&5 |
fcfc3c0c TT |
1456 | |
1457 | target_alias=$target | |
1458 | case "$target_alias" in | |
1459 | NONE) | |
1460 | case $nonopt in | |
1461 | NONE) target_alias=$host_alias ;; | |
1462 | *) target_alias=$nonopt ;; | |
1463 | esac ;; | |
1464 | esac | |
1465 | ||
4b23e55c | 1466 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
fcfc3c0c TT |
1467 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1468 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1469 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1470 | echo "$ac_t""$target" 1>&6 | |
1471 | ||
1472 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
b93f016b | 1473 | echo "configure:1474: checking build system type" >&5 |
fcfc3c0c TT |
1474 | |
1475 | build_alias=$build | |
1476 | case "$build_alias" in | |
1477 | NONE) | |
1478 | case $nonopt in | |
1479 | NONE) build_alias=$host_alias ;; | |
1480 | *) build_alias=$nonopt ;; | |
1481 | esac ;; | |
1482 | esac | |
1483 | ||
4b23e55c | 1484 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
fcfc3c0c TT |
1485 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1486 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1487 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1488 | echo "$ac_t""$build" 1>&6 | |
1489 | ||
1490 | test "$host_alias" != "$target_alias" && | |
1491 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1492 | NONENONEs,x,x, && | |
1493 | program_prefix=${target_alias}- | |
1494 | ||
1495 | ||
1496 | ALL_LINGUAS= | |
1497 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
b93f016b | 1498 | echo "configure:1499: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
fcfc3c0c TT |
1499 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1500 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1501 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1502 | else | |
1503 | cat > conftestmake <<\EOF | |
1504 | all: | |
1505 | @echo 'ac_maketemp="${MAKE}"' | |
1506 | EOF | |
1507 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1508 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1509 | if test -n "$ac_maketemp"; then | |
1510 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1511 | else | |
1512 | eval ac_cv_prog_make_${ac_make}_set=no | |
1513 | fi | |
1514 | rm -f conftestmake | |
1515 | fi | |
1516 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1517 | echo "$ac_t""yes" 1>&6 | |
1518 | SET_MAKE= | |
1519 | else | |
1520 | echo "$ac_t""no" 1>&6 | |
1521 | SET_MAKE="MAKE=${MAKE-make}" | |
1522 | fi | |
1523 | ||
1524 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1525 | set dummy ranlib; ac_word=$2 | |
1526 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 1527 | echo "configure:1528: checking for $ac_word" >&5 |
fcfc3c0c TT |
1528 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1530 | else | |
1531 | if test -n "$RANLIB"; then | |
1532 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1533 | else | |
4b23e55c | 1534 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
1535 | ac_dummy="$PATH" |
1536 | for ac_dir in $ac_dummy; do | |
fcfc3c0c TT |
1537 | test -z "$ac_dir" && ac_dir=. |
1538 | if test -f $ac_dir/$ac_word; then | |
1539 | ac_cv_prog_RANLIB="ranlib" | |
1540 | break | |
1541 | fi | |
1542 | done | |
1543 | IFS="$ac_save_ifs" | |
1544 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1545 | fi | |
1546 | fi | |
1547 | RANLIB="$ac_cv_prog_RANLIB" | |
1548 | if test -n "$RANLIB"; then | |
1549 | echo "$ac_t""$RANLIB" 1>&6 | |
1550 | else | |
1551 | echo "$ac_t""no" 1>&6 | |
1552 | fi | |
1553 | ||
1554 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
b93f016b | 1555 | echo "configure:1556: checking for ANSI C header files" >&5 |
fcfc3c0c TT |
1556 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1558 | else | |
1559 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1560 | #line 1561 "configure" |
fcfc3c0c TT |
1561 | #include "confdefs.h" |
1562 | #include <stdlib.h> | |
1563 | #include <stdarg.h> | |
1564 | #include <string.h> | |
1565 | #include <float.h> | |
1566 | EOF | |
1567 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 1568 | { (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 1569 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
1570 | if test -z "$ac_err"; then |
1571 | rm -rf conftest* | |
1572 | ac_cv_header_stdc=yes | |
1573 | else | |
1574 | echo "$ac_err" >&5 | |
1575 | echo "configure: failed program was:" >&5 | |
1576 | cat conftest.$ac_ext >&5 | |
1577 | rm -rf conftest* | |
1578 | ac_cv_header_stdc=no | |
1579 | fi | |
1580 | rm -f conftest* | |
1581 | ||
1582 | if test $ac_cv_header_stdc = yes; then | |
1583 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1584 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1585 | #line 1586 "configure" |
fcfc3c0c TT |
1586 | #include "confdefs.h" |
1587 | #include <string.h> | |
1588 | EOF | |
1589 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1590 | egrep "memchr" >/dev/null 2>&1; then | |
1591 | : | |
1592 | else | |
1593 | rm -rf conftest* | |
1594 | ac_cv_header_stdc=no | |
1595 | fi | |
1596 | rm -f conftest* | |
1597 | ||
1598 | fi | |
1599 | ||
1600 | if test $ac_cv_header_stdc = yes; then | |
1601 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1602 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1603 | #line 1604 "configure" |
fcfc3c0c TT |
1604 | #include "confdefs.h" |
1605 | #include <stdlib.h> | |
1606 | EOF | |
1607 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1608 | egrep "free" >/dev/null 2>&1; then | |
1609 | : | |
1610 | else | |
1611 | rm -rf conftest* | |
1612 | ac_cv_header_stdc=no | |
1613 | fi | |
1614 | rm -f conftest* | |
1615 | ||
1616 | fi | |
1617 | ||
1618 | if test $ac_cv_header_stdc = yes; then | |
1619 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1620 | if test "$cross_compiling" = yes; then | |
1621 | : | |
1622 | else | |
1623 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1624 | #line 1625 "configure" |
fcfc3c0c TT |
1625 | #include "confdefs.h" |
1626 | #include <ctype.h> | |
1627 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1628 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1629 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1630 | int main () { int i; for (i = 0; i < 256; i++) | |
1631 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1632 | exit (0); } | |
1633 | ||
1634 | EOF | |
b93f016b | 1635 | if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
1636 | then |
1637 | : | |
1638 | else | |
1639 | echo "configure: failed program was:" >&5 | |
1640 | cat conftest.$ac_ext >&5 | |
1641 | rm -fr conftest* | |
1642 | ac_cv_header_stdc=no | |
1643 | fi | |
1644 | rm -fr conftest* | |
1645 | fi | |
1646 | ||
1647 | fi | |
1648 | fi | |
1649 | ||
1650 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1651 | if test $ac_cv_header_stdc = yes; then | |
1652 | cat >> confdefs.h <<\EOF | |
1653 | #define STDC_HEADERS 1 | |
1654 | EOF | |
1655 | ||
1656 | fi | |
1657 | ||
1658 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
b93f016b | 1659 | echo "configure:1660: checking for working const" >&5 |
fcfc3c0c TT |
1660 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1661 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1662 | else | |
1663 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1664 | #line 1665 "configure" |
fcfc3c0c TT |
1665 | #include "confdefs.h" |
1666 | ||
1667 | int main() { | |
1668 | ||
1669 | /* Ultrix mips cc rejects this. */ | |
1670 | typedef int charset[2]; const charset x; | |
1671 | /* SunOS 4.1.1 cc rejects this. */ | |
1672 | char const *const *ccp; | |
1673 | char **p; | |
1674 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1675 | struct point {int x, y;}; | |
1676 | static struct point const zero = {0,0}; | |
1677 | /* AIX XL C 1.02.0.0 rejects this. | |
1678 | It does not let you subtract one const X* pointer from another in an arm | |
1679 | of an if-expression whose if-part is not a constant expression */ | |
1680 | const char *g = "string"; | |
1681 | ccp = &g + (g ? g-g : 0); | |
1682 | /* HPUX 7.0 cc rejects these. */ | |
1683 | ++ccp; | |
1684 | p = (char**) ccp; | |
1685 | ccp = (char const *const *) p; | |
1686 | { /* SCO 3.2v4 cc rejects this. */ | |
1687 | char *t; | |
1688 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1689 | ||
1690 | *t++ = 0; | |
1691 | } | |
1692 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1693 | int x[] = {25, 17}; | |
1694 | const int *foo = &x[0]; | |
1695 | ++foo; | |
1696 | } | |
1697 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1698 | typedef const int *iptr; | |
1699 | iptr p = 0; | |
1700 | ++p; | |
1701 | } | |
1702 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1703 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1704 | struct s { int j; const int *ap[3]; }; | |
1705 | struct s *b; b->j = 5; | |
1706 | } | |
1707 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1708 | const int foo = 10; | |
1709 | } | |
1710 | ||
1711 | ; return 0; } | |
1712 | EOF | |
b93f016b | 1713 | if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
fcfc3c0c TT |
1714 | rm -rf conftest* |
1715 | ac_cv_c_const=yes | |
1716 | else | |
1717 | echo "configure: failed program was:" >&5 | |
1718 | cat conftest.$ac_ext >&5 | |
1719 | rm -rf conftest* | |
1720 | ac_cv_c_const=no | |
1721 | fi | |
1722 | rm -f conftest* | |
1723 | fi | |
1724 | ||
1725 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1726 | if test $ac_cv_c_const = no; then | |
1727 | cat >> confdefs.h <<\EOF | |
1728 | #define const | |
1729 | EOF | |
1730 | ||
1731 | fi | |
1732 | ||
1733 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
b93f016b | 1734 | echo "configure:1735: checking for inline" >&5 |
fcfc3c0c TT |
1735 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1736 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1737 | else | |
1738 | ac_cv_c_inline=no | |
1739 | for ac_kw in inline __inline__ __inline; do | |
1740 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1741 | #line 1742 "configure" |
fcfc3c0c TT |
1742 | #include "confdefs.h" |
1743 | ||
1744 | int main() { | |
1745 | } $ac_kw foo() { | |
1746 | ; return 0; } | |
1747 | EOF | |
b93f016b | 1748 | if { (eval echo configure:1749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
fcfc3c0c TT |
1749 | rm -rf conftest* |
1750 | ac_cv_c_inline=$ac_kw; break | |
1751 | else | |
1752 | echo "configure: failed program was:" >&5 | |
1753 | cat conftest.$ac_ext >&5 | |
1754 | fi | |
1755 | rm -f conftest* | |
1756 | done | |
1757 | ||
1758 | fi | |
1759 | ||
1760 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1761 | case "$ac_cv_c_inline" in | |
1762 | inline | yes) ;; | |
1763 | no) cat >> confdefs.h <<\EOF | |
1764 | #define inline | |
1765 | EOF | |
1766 | ;; | |
1767 | *) cat >> confdefs.h <<EOF | |
1768 | #define inline $ac_cv_c_inline | |
1769 | EOF | |
1770 | ;; | |
1771 | esac | |
1772 | ||
1773 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
b93f016b | 1774 | echo "configure:1775: checking for off_t" >&5 |
fcfc3c0c TT |
1775 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
1776 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1777 | else | |
1778 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1779 | #line 1780 "configure" |
fcfc3c0c TT |
1780 | #include "confdefs.h" |
1781 | #include <sys/types.h> | |
1782 | #if STDC_HEADERS | |
1783 | #include <stdlib.h> | |
1784 | #include <stddef.h> | |
1785 | #endif | |
1786 | EOF | |
1787 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b93f016b | 1788 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
fcfc3c0c TT |
1789 | rm -rf conftest* |
1790 | ac_cv_type_off_t=yes | |
1791 | else | |
1792 | rm -rf conftest* | |
1793 | ac_cv_type_off_t=no | |
1794 | fi | |
1795 | rm -f conftest* | |
1796 | ||
1797 | fi | |
1798 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
1799 | if test $ac_cv_type_off_t = no; then | |
1800 | cat >> confdefs.h <<\EOF | |
1801 | #define off_t long | |
1802 | EOF | |
1803 | ||
1804 | fi | |
1805 | ||
1806 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
b93f016b | 1807 | echo "configure:1808: checking for size_t" >&5 |
fcfc3c0c TT |
1808 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
1809 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1810 | else | |
1811 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1812 | #line 1813 "configure" |
fcfc3c0c TT |
1813 | #include "confdefs.h" |
1814 | #include <sys/types.h> | |
1815 | #if STDC_HEADERS | |
1816 | #include <stdlib.h> | |
1817 | #include <stddef.h> | |
1818 | #endif | |
1819 | EOF | |
1820 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
b93f016b | 1821 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
fcfc3c0c TT |
1822 | rm -rf conftest* |
1823 | ac_cv_type_size_t=yes | |
1824 | else | |
1825 | rm -rf conftest* | |
1826 | ac_cv_type_size_t=no | |
1827 | fi | |
1828 | rm -f conftest* | |
1829 | ||
1830 | fi | |
1831 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
1832 | if test $ac_cv_type_size_t = no; then | |
1833 | cat >> confdefs.h <<\EOF | |
1834 | #define size_t unsigned | |
1835 | EOF | |
1836 | ||
1837 | fi | |
1838 | ||
1839 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1840 | # for constant arguments. Useless! | |
1841 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
b93f016b | 1842 | echo "configure:1843: checking for working alloca.h" >&5 |
fcfc3c0c TT |
1843 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1845 | else | |
1846 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1847 | #line 1848 "configure" |
fcfc3c0c TT |
1848 | #include "confdefs.h" |
1849 | #include <alloca.h> | |
1850 | int main() { | |
1851 | char *p = alloca(2 * sizeof(int)); | |
1852 | ; return 0; } | |
1853 | EOF | |
b93f016b | 1854 | if { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1855 | rm -rf conftest* |
1856 | ac_cv_header_alloca_h=yes | |
1857 | else | |
1858 | echo "configure: failed program was:" >&5 | |
1859 | cat conftest.$ac_ext >&5 | |
1860 | rm -rf conftest* | |
1861 | ac_cv_header_alloca_h=no | |
1862 | fi | |
1863 | rm -f conftest* | |
1864 | fi | |
1865 | ||
1866 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
1867 | if test $ac_cv_header_alloca_h = yes; then | |
1868 | cat >> confdefs.h <<\EOF | |
1869 | #define HAVE_ALLOCA_H 1 | |
1870 | EOF | |
1871 | ||
1872 | fi | |
1873 | ||
1874 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
b93f016b | 1875 | echo "configure:1876: checking for alloca" >&5 |
fcfc3c0c TT |
1876 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
1877 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1878 | else | |
1879 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1880 | #line 1881 "configure" |
fcfc3c0c TT |
1881 | #include "confdefs.h" |
1882 | ||
1883 | #ifdef __GNUC__ | |
1884 | # define alloca __builtin_alloca | |
1885 | #else | |
4b23e55c JM |
1886 | # ifdef _MSC_VER |
1887 | # include <malloc.h> | |
1888 | # define alloca _alloca | |
fcfc3c0c | 1889 | # else |
4b23e55c JM |
1890 | # if HAVE_ALLOCA_H |
1891 | # include <alloca.h> | |
ba68ad57 | 1892 | # else |
4b23e55c JM |
1893 | # ifdef _AIX |
1894 | #pragma alloca | |
1895 | # else | |
1896 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
fcfc3c0c | 1897 | char *alloca (); |
4b23e55c | 1898 | # endif |
fcfc3c0c TT |
1899 | # endif |
1900 | # endif | |
1901 | # endif | |
1902 | #endif | |
1903 | ||
1904 | int main() { | |
1905 | char *p = (char *) alloca(1); | |
1906 | ; return 0; } | |
1907 | EOF | |
b93f016b | 1908 | if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1909 | rm -rf conftest* |
1910 | ac_cv_func_alloca_works=yes | |
1911 | else | |
1912 | echo "configure: failed program was:" >&5 | |
1913 | cat conftest.$ac_ext >&5 | |
1914 | rm -rf conftest* | |
1915 | ac_cv_func_alloca_works=no | |
1916 | fi | |
1917 | rm -f conftest* | |
1918 | fi | |
1919 | ||
1920 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
1921 | if test $ac_cv_func_alloca_works = yes; then | |
1922 | cat >> confdefs.h <<\EOF | |
1923 | #define HAVE_ALLOCA 1 | |
1924 | EOF | |
1925 | ||
1926 | fi | |
1927 | ||
1928 | if test $ac_cv_func_alloca_works = no; then | |
1929 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1930 | # that cause trouble. Some versions do not even contain alloca or | |
1931 | # contain a buggy version. If you still want to use their alloca, | |
1932 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4b23e55c | 1933 | ALLOCA=alloca.${ac_objext} |
fcfc3c0c TT |
1934 | cat >> confdefs.h <<\EOF |
1935 | #define C_ALLOCA 1 | |
1936 | EOF | |
1937 | ||
1938 | ||
1939 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
b93f016b | 1940 | echo "configure:1941: checking whether alloca needs Cray hooks" >&5 |
fcfc3c0c TT |
1941 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1943 | else | |
1944 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1945 | #line 1946 "configure" |
fcfc3c0c TT |
1946 | #include "confdefs.h" |
1947 | #if defined(CRAY) && ! defined(CRAY2) | |
1948 | webecray | |
1949 | #else | |
1950 | wenotbecray | |
1951 | #endif | |
1952 | ||
1953 | EOF | |
1954 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1955 | egrep "webecray" >/dev/null 2>&1; then | |
1956 | rm -rf conftest* | |
1957 | ac_cv_os_cray=yes | |
1958 | else | |
1959 | rm -rf conftest* | |
1960 | ac_cv_os_cray=no | |
1961 | fi | |
1962 | rm -f conftest* | |
1963 | ||
1964 | fi | |
1965 | ||
1966 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
1967 | if test $ac_cv_os_cray = yes; then | |
1968 | for ac_func in _getb67 GETB67 getb67; do | |
1969 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 1970 | echo "configure:1971: checking for $ac_func" >&5 |
fcfc3c0c TT |
1971 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1972 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1973 | else | |
1974 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 1975 | #line 1976 "configure" |
fcfc3c0c TT |
1976 | #include "confdefs.h" |
1977 | /* System header to define __stub macros and hopefully few prototypes, | |
1978 | which can conflict with char $ac_func(); below. */ | |
1979 | #include <assert.h> | |
1980 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1981 | /* We use char because int might match the return type of a gcc2 | |
1982 | builtin and then its argument prototype would still apply. */ | |
1983 | char $ac_func(); | |
1984 | ||
1985 | int main() { | |
1986 | ||
1987 | /* The GNU C library defines this for functions which it implements | |
1988 | to always fail with ENOSYS. Some functions are actually named | |
1989 | something starting with __ and the normal name is an alias. */ | |
1990 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1991 | choke me | |
1992 | #else | |
1993 | $ac_func(); | |
1994 | #endif | |
1995 | ||
1996 | ; return 0; } | |
1997 | EOF | |
b93f016b | 1998 | if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
1999 | rm -rf conftest* |
2000 | eval "ac_cv_func_$ac_func=yes" | |
2001 | else | |
2002 | echo "configure: failed program was:" >&5 | |
2003 | cat conftest.$ac_ext >&5 | |
2004 | rm -rf conftest* | |
2005 | eval "ac_cv_func_$ac_func=no" | |
2006 | fi | |
2007 | rm -f conftest* | |
2008 | fi | |
2009 | ||
2010 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2011 | echo "$ac_t""yes" 1>&6 | |
2012 | cat >> confdefs.h <<EOF | |
2013 | #define CRAY_STACKSEG_END $ac_func | |
2014 | EOF | |
2015 | ||
2016 | break | |
2017 | else | |
2018 | echo "$ac_t""no" 1>&6 | |
2019 | fi | |
2020 | ||
2021 | done | |
2022 | fi | |
2023 | ||
2024 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
b93f016b | 2025 | echo "configure:2026: checking stack direction for C alloca" >&5 |
fcfc3c0c TT |
2026 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
2027 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2028 | else | |
2029 | if test "$cross_compiling" = yes; then | |
2030 | ac_cv_c_stack_direction=0 | |
2031 | else | |
2032 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2033 | #line 2034 "configure" |
fcfc3c0c TT |
2034 | #include "confdefs.h" |
2035 | find_stack_direction () | |
2036 | { | |
2037 | static char *addr = 0; | |
2038 | auto char dummy; | |
2039 | if (addr == 0) | |
2040 | { | |
2041 | addr = &dummy; | |
2042 | return find_stack_direction (); | |
2043 | } | |
2044 | else | |
2045 | return (&dummy > addr) ? 1 : -1; | |
2046 | } | |
2047 | main () | |
2048 | { | |
2049 | exit (find_stack_direction() < 0); | |
2050 | } | |
2051 | EOF | |
b93f016b | 2052 | if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
2053 | then |
2054 | ac_cv_c_stack_direction=1 | |
2055 | else | |
2056 | echo "configure: failed program was:" >&5 | |
2057 | cat conftest.$ac_ext >&5 | |
2058 | rm -fr conftest* | |
2059 | ac_cv_c_stack_direction=-1 | |
2060 | fi | |
2061 | rm -fr conftest* | |
2062 | fi | |
2063 | ||
2064 | fi | |
2065 | ||
2066 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
2067 | cat >> confdefs.h <<EOF | |
2068 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
2069 | EOF | |
2070 | ||
2071 | fi | |
2072 | ||
2073 | for ac_hdr in unistd.h | |
2074 | do | |
2075 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2076 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b93f016b | 2077 | echo "configure:2078: checking for $ac_hdr" >&5 |
fcfc3c0c TT |
2078 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2079 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2080 | else | |
2081 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2082 | #line 2083 "configure" |
fcfc3c0c TT |
2083 | #include "confdefs.h" |
2084 | #include <$ac_hdr> | |
2085 | EOF | |
2086 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 2087 | { (eval echo configure:2088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 2088 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
2089 | if test -z "$ac_err"; then |
2090 | rm -rf conftest* | |
2091 | eval "ac_cv_header_$ac_safe=yes" | |
2092 | else | |
2093 | echo "$ac_err" >&5 | |
2094 | echo "configure: failed program was:" >&5 | |
2095 | cat conftest.$ac_ext >&5 | |
2096 | rm -rf conftest* | |
2097 | eval "ac_cv_header_$ac_safe=no" | |
2098 | fi | |
2099 | rm -f conftest* | |
2100 | fi | |
2101 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2102 | echo "$ac_t""yes" 1>&6 | |
2103 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2104 | cat >> confdefs.h <<EOF | |
2105 | #define $ac_tr_hdr 1 | |
2106 | EOF | |
2107 | ||
2108 | else | |
2109 | echo "$ac_t""no" 1>&6 | |
2110 | fi | |
2111 | done | |
2112 | ||
2113 | for ac_func in getpagesize | |
2114 | do | |
2115 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 2116 | echo "configure:2117: checking for $ac_func" >&5 |
fcfc3c0c TT |
2117 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2119 | else | |
2120 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2121 | #line 2122 "configure" |
fcfc3c0c TT |
2122 | #include "confdefs.h" |
2123 | /* System header to define __stub macros and hopefully few prototypes, | |
2124 | which can conflict with char $ac_func(); below. */ | |
2125 | #include <assert.h> | |
2126 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2127 | /* We use char because int might match the return type of a gcc2 | |
2128 | builtin and then its argument prototype would still apply. */ | |
2129 | char $ac_func(); | |
2130 | ||
2131 | int main() { | |
2132 | ||
2133 | /* The GNU C library defines this for functions which it implements | |
2134 | to always fail with ENOSYS. Some functions are actually named | |
2135 | something starting with __ and the normal name is an alias. */ | |
2136 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2137 | choke me | |
2138 | #else | |
2139 | $ac_func(); | |
2140 | #endif | |
2141 | ||
2142 | ; return 0; } | |
2143 | EOF | |
b93f016b | 2144 | if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2145 | rm -rf conftest* |
2146 | eval "ac_cv_func_$ac_func=yes" | |
2147 | else | |
2148 | echo "configure: failed program was:" >&5 | |
2149 | cat conftest.$ac_ext >&5 | |
2150 | rm -rf conftest* | |
2151 | eval "ac_cv_func_$ac_func=no" | |
2152 | fi | |
2153 | rm -f conftest* | |
2154 | fi | |
2155 | ||
2156 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2157 | echo "$ac_t""yes" 1>&6 | |
2158 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2159 | cat >> confdefs.h <<EOF | |
2160 | #define $ac_tr_func 1 | |
2161 | EOF | |
2162 | ||
2163 | else | |
2164 | echo "$ac_t""no" 1>&6 | |
2165 | fi | |
2166 | done | |
2167 | ||
2168 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
b93f016b | 2169 | echo "configure:2170: checking for working mmap" >&5 |
fcfc3c0c TT |
2170 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2172 | else | |
2173 | if test "$cross_compiling" = yes; then | |
2174 | ac_cv_func_mmap_fixed_mapped=no | |
2175 | else | |
2176 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2177 | #line 2178 "configure" |
fcfc3c0c TT |
2178 | #include "confdefs.h" |
2179 | ||
2180 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
2181 | Here is a matrix of mmap possibilities: | |
2182 | mmap private not fixed | |
2183 | mmap private fixed at somewhere currently unmapped | |
2184 | mmap private fixed at somewhere already mapped | |
2185 | mmap shared not fixed | |
2186 | mmap shared fixed at somewhere currently unmapped | |
2187 | mmap shared fixed at somewhere already mapped | |
2188 | For private mappings, we should verify that changes cannot be read() | |
2189 | back from the file, nor mmap's back from the file at a different | |
2190 | address. (There have been systems where private was not correctly | |
2191 | implemented like the infamous i386 svr4.0, and systems where the | |
2192 | VM page cache was not coherent with the filesystem buffer cache | |
2193 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
2194 | For shared mappings, we should conversely verify that changes get | |
2195 | propogated back to all the places they're supposed to be. | |
2196 | ||
2197 | Grep wants private fixed already mapped. | |
2198 | The main things grep needs to know about mmap are: | |
2199 | * does it exist and is it safe to write into the mmap'd area | |
2200 | * how to use it (BSD variants) */ | |
2201 | #include <sys/types.h> | |
2202 | #include <fcntl.h> | |
2203 | #include <sys/mman.h> | |
2204 | ||
2205 | /* This mess was copied from the GNU getpagesize.h. */ | |
2206 | #ifndef HAVE_GETPAGESIZE | |
2207 | # ifdef HAVE_UNISTD_H | |
2208 | # include <unistd.h> | |
2209 | # endif | |
2210 | ||
2211 | /* Assume that all systems that can run configure have sys/param.h. */ | |
2212 | # ifndef HAVE_SYS_PARAM_H | |
2213 | # define HAVE_SYS_PARAM_H 1 | |
2214 | # endif | |
2215 | ||
2216 | # ifdef _SC_PAGESIZE | |
2217 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
2218 | # else /* no _SC_PAGESIZE */ | |
2219 | # ifdef HAVE_SYS_PARAM_H | |
2220 | # include <sys/param.h> | |
2221 | # ifdef EXEC_PAGESIZE | |
2222 | # define getpagesize() EXEC_PAGESIZE | |
2223 | # else /* no EXEC_PAGESIZE */ | |
2224 | # ifdef NBPG | |
2225 | # define getpagesize() NBPG * CLSIZE | |
2226 | # ifndef CLSIZE | |
2227 | # define CLSIZE 1 | |
2228 | # endif /* no CLSIZE */ | |
2229 | # else /* no NBPG */ | |
2230 | # ifdef NBPC | |
2231 | # define getpagesize() NBPC | |
2232 | # else /* no NBPC */ | |
2233 | # ifdef PAGESIZE | |
2234 | # define getpagesize() PAGESIZE | |
2235 | # endif /* PAGESIZE */ | |
2236 | # endif /* no NBPC */ | |
2237 | # endif /* no NBPG */ | |
2238 | # endif /* no EXEC_PAGESIZE */ | |
2239 | # else /* no HAVE_SYS_PARAM_H */ | |
2240 | # define getpagesize() 8192 /* punt totally */ | |
2241 | # endif /* no HAVE_SYS_PARAM_H */ | |
2242 | # endif /* no _SC_PAGESIZE */ | |
2243 | ||
2244 | #endif /* no HAVE_GETPAGESIZE */ | |
2245 | ||
2246 | #ifdef __cplusplus | |
2247 | extern "C" { void *malloc(unsigned); } | |
2248 | #else | |
2249 | char *malloc(); | |
2250 | #endif | |
2251 | ||
2252 | int | |
2253 | main() | |
2254 | { | |
2255 | char *data, *data2, *data3; | |
2256 | int i, pagesize; | |
2257 | int fd; | |
2258 | ||
2259 | pagesize = getpagesize(); | |
2260 | ||
2261 | /* | |
2262 | * First, make a file with some known garbage in it. | |
2263 | */ | |
2264 | data = malloc(pagesize); | |
2265 | if (!data) | |
2266 | exit(1); | |
2267 | for (i = 0; i < pagesize; ++i) | |
2268 | *(data + i) = rand(); | |
2269 | umask(0); | |
2270 | fd = creat("conftestmmap", 0600); | |
2271 | if (fd < 0) | |
2272 | exit(1); | |
2273 | if (write(fd, data, pagesize) != pagesize) | |
2274 | exit(1); | |
2275 | close(fd); | |
2276 | ||
2277 | /* | |
2278 | * Next, try to mmap the file at a fixed address which | |
2279 | * already has something else allocated at it. If we can, | |
2280 | * also make sure that we see the same garbage. | |
2281 | */ | |
2282 | fd = open("conftestmmap", O_RDWR); | |
2283 | if (fd < 0) | |
2284 | exit(1); | |
2285 | data2 = malloc(2 * pagesize); | |
2286 | if (!data2) | |
2287 | exit(1); | |
2288 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2289 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2290 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2291 | exit(1); | |
2292 | for (i = 0; i < pagesize; ++i) | |
2293 | if (*(data + i) != *(data2 + i)) | |
2294 | exit(1); | |
2295 | ||
2296 | /* | |
2297 | * Finally, make sure that changes to the mapped area | |
2298 | * do not percolate back to the file as seen by read(). | |
2299 | * (This is a bug on some variants of i386 svr4.0.) | |
2300 | */ | |
2301 | for (i = 0; i < pagesize; ++i) | |
2302 | *(data2 + i) = *(data2 + i) + 1; | |
2303 | data3 = malloc(pagesize); | |
2304 | if (!data3) | |
2305 | exit(1); | |
2306 | if (read(fd, data3, pagesize) != pagesize) | |
2307 | exit(1); | |
2308 | for (i = 0; i < pagesize; ++i) | |
2309 | if (*(data + i) != *(data3 + i)) | |
2310 | exit(1); | |
2311 | close(fd); | |
2312 | unlink("conftestmmap"); | |
2313 | exit(0); | |
2314 | } | |
2315 | ||
2316 | EOF | |
b93f016b | 2317 | if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
fcfc3c0c TT |
2318 | then |
2319 | ac_cv_func_mmap_fixed_mapped=yes | |
2320 | else | |
2321 | echo "configure: failed program was:" >&5 | |
2322 | cat conftest.$ac_ext >&5 | |
2323 | rm -fr conftest* | |
2324 | ac_cv_func_mmap_fixed_mapped=no | |
2325 | fi | |
2326 | rm -fr conftest* | |
2327 | fi | |
2328 | ||
2329 | fi | |
2330 | ||
2331 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2332 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2333 | cat >> confdefs.h <<\EOF | |
2334 | #define HAVE_MMAP 1 | |
2335 | EOF | |
2336 | ||
2337 | fi | |
2338 | ||
2339 | ||
2340 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2341 | unistd.h values.h sys/param.h | |
2342 | do | |
2343 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2344 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b93f016b | 2345 | echo "configure:2346: checking for $ac_hdr" >&5 |
fcfc3c0c TT |
2346 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2347 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2348 | else | |
2349 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2350 | #line 2351 "configure" |
fcfc3c0c TT |
2351 | #include "confdefs.h" |
2352 | #include <$ac_hdr> | |
2353 | EOF | |
2354 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 2355 | { (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 2356 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
2357 | if test -z "$ac_err"; then |
2358 | rm -rf conftest* | |
2359 | eval "ac_cv_header_$ac_safe=yes" | |
2360 | else | |
2361 | echo "$ac_err" >&5 | |
2362 | echo "configure: failed program was:" >&5 | |
2363 | cat conftest.$ac_ext >&5 | |
2364 | rm -rf conftest* | |
2365 | eval "ac_cv_header_$ac_safe=no" | |
2366 | fi | |
2367 | rm -f conftest* | |
2368 | fi | |
2369 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2370 | echo "$ac_t""yes" 1>&6 | |
2371 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2372 | cat >> confdefs.h <<EOF | |
2373 | #define $ac_tr_hdr 1 | |
2374 | EOF | |
2375 | ||
2376 | else | |
2377 | echo "$ac_t""no" 1>&6 | |
2378 | fi | |
2379 | done | |
2380 | ||
2381 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2382 | __argz_count __argz_stringify __argz_next | |
2383 | do | |
2384 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 2385 | echo "configure:2386: checking for $ac_func" >&5 |
fcfc3c0c TT |
2386 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2387 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2388 | else | |
2389 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2390 | #line 2391 "configure" |
fcfc3c0c TT |
2391 | #include "confdefs.h" |
2392 | /* System header to define __stub macros and hopefully few prototypes, | |
2393 | which can conflict with char $ac_func(); below. */ | |
2394 | #include <assert.h> | |
2395 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2396 | /* We use char because int might match the return type of a gcc2 | |
2397 | builtin and then its argument prototype would still apply. */ | |
2398 | char $ac_func(); | |
2399 | ||
2400 | int main() { | |
2401 | ||
2402 | /* The GNU C library defines this for functions which it implements | |
2403 | to always fail with ENOSYS. Some functions are actually named | |
2404 | something starting with __ and the normal name is an alias. */ | |
2405 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2406 | choke me | |
2407 | #else | |
2408 | $ac_func(); | |
2409 | #endif | |
2410 | ||
2411 | ; return 0; } | |
2412 | EOF | |
b93f016b | 2413 | if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2414 | rm -rf conftest* |
2415 | eval "ac_cv_func_$ac_func=yes" | |
2416 | else | |
2417 | echo "configure: failed program was:" >&5 | |
2418 | cat conftest.$ac_ext >&5 | |
2419 | rm -rf conftest* | |
2420 | eval "ac_cv_func_$ac_func=no" | |
2421 | fi | |
2422 | rm -f conftest* | |
2423 | fi | |
2424 | ||
2425 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2426 | echo "$ac_t""yes" 1>&6 | |
2427 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2428 | cat >> confdefs.h <<EOF | |
2429 | #define $ac_tr_func 1 | |
2430 | EOF | |
2431 | ||
2432 | else | |
2433 | echo "$ac_t""no" 1>&6 | |
2434 | fi | |
2435 | done | |
2436 | ||
2437 | ||
2438 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2439 | for ac_func in stpcpy | |
2440 | do | |
2441 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 2442 | echo "configure:2443: checking for $ac_func" >&5 |
fcfc3c0c TT |
2443 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2445 | else | |
2446 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2447 | #line 2448 "configure" |
fcfc3c0c TT |
2448 | #include "confdefs.h" |
2449 | /* System header to define __stub macros and hopefully few prototypes, | |
2450 | which can conflict with char $ac_func(); below. */ | |
2451 | #include <assert.h> | |
2452 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2453 | /* We use char because int might match the return type of a gcc2 | |
2454 | builtin and then its argument prototype would still apply. */ | |
2455 | char $ac_func(); | |
2456 | ||
2457 | int main() { | |
2458 | ||
2459 | /* The GNU C library defines this for functions which it implements | |
2460 | to always fail with ENOSYS. Some functions are actually named | |
2461 | something starting with __ and the normal name is an alias. */ | |
2462 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2463 | choke me | |
2464 | #else | |
2465 | $ac_func(); | |
2466 | #endif | |
2467 | ||
2468 | ; return 0; } | |
2469 | EOF | |
b93f016b | 2470 | if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2471 | rm -rf conftest* |
2472 | eval "ac_cv_func_$ac_func=yes" | |
2473 | else | |
2474 | echo "configure: failed program was:" >&5 | |
2475 | cat conftest.$ac_ext >&5 | |
2476 | rm -rf conftest* | |
2477 | eval "ac_cv_func_$ac_func=no" | |
2478 | fi | |
2479 | rm -f conftest* | |
2480 | fi | |
2481 | ||
2482 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2483 | echo "$ac_t""yes" 1>&6 | |
2484 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2485 | cat >> confdefs.h <<EOF | |
2486 | #define $ac_tr_func 1 | |
2487 | EOF | |
2488 | ||
2489 | else | |
2490 | echo "$ac_t""no" 1>&6 | |
2491 | fi | |
2492 | done | |
2493 | ||
2494 | fi | |
2495 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2496 | cat >> confdefs.h <<\EOF | |
2497 | #define HAVE_STPCPY 1 | |
2498 | EOF | |
2499 | ||
2500 | fi | |
2501 | ||
2502 | if test $ac_cv_header_locale_h = yes; then | |
2503 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
b93f016b | 2504 | echo "configure:2505: checking for LC_MESSAGES" >&5 |
fcfc3c0c TT |
2505 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
2506 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2507 | else | |
2508 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2509 | #line 2510 "configure" |
fcfc3c0c TT |
2510 | #include "confdefs.h" |
2511 | #include <locale.h> | |
2512 | int main() { | |
2513 | return LC_MESSAGES | |
2514 | ; return 0; } | |
2515 | EOF | |
b93f016b | 2516 | if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2517 | rm -rf conftest* |
2518 | am_cv_val_LC_MESSAGES=yes | |
2519 | else | |
2520 | echo "configure: failed program was:" >&5 | |
2521 | cat conftest.$ac_ext >&5 | |
2522 | rm -rf conftest* | |
2523 | am_cv_val_LC_MESSAGES=no | |
2524 | fi | |
2525 | rm -f conftest* | |
2526 | fi | |
2527 | ||
2528 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2529 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2530 | cat >> confdefs.h <<\EOF | |
2531 | #define HAVE_LC_MESSAGES 1 | |
2532 | EOF | |
2533 | ||
2534 | fi | |
2535 | fi | |
2536 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
b93f016b | 2537 | echo "configure:2538: checking whether NLS is requested" >&5 |
fcfc3c0c TT |
2538 | # Check whether --enable-nls or --disable-nls was given. |
2539 | if test "${enable_nls+set}" = set; then | |
2540 | enableval="$enable_nls" | |
2541 | USE_NLS=$enableval | |
2542 | else | |
2543 | USE_NLS=yes | |
2544 | fi | |
2545 | ||
2546 | echo "$ac_t""$USE_NLS" 1>&6 | |
2547 | ||
2548 | ||
2549 | USE_INCLUDED_LIBINTL=no | |
2550 | ||
2551 | if test "$USE_NLS" = "yes"; then | |
2552 | cat >> confdefs.h <<\EOF | |
2553 | #define ENABLE_NLS 1 | |
2554 | EOF | |
2555 | ||
2556 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
b93f016b | 2557 | echo "configure:2558: checking whether included gettext is requested" >&5 |
fcfc3c0c TT |
2558 | # Check whether --with-included-gettext or --without-included-gettext was given. |
2559 | if test "${with_included_gettext+set}" = set; then | |
2560 | withval="$with_included_gettext" | |
2561 | nls_cv_force_use_gnu_gettext=$withval | |
2562 | else | |
2563 | nls_cv_force_use_gnu_gettext=no | |
2564 | fi | |
2565 | ||
2566 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2567 | ||
2568 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2569 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2570 | nls_cv_header_intl= | |
2571 | nls_cv_header_libgt= | |
2572 | CATOBJEXT=NONE | |
2573 | ||
2574 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2575 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
b93f016b | 2576 | echo "configure:2577: checking for libintl.h" >&5 |
fcfc3c0c TT |
2577 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2578 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2579 | else | |
2580 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2581 | #line 2582 "configure" |
fcfc3c0c TT |
2582 | #include "confdefs.h" |
2583 | #include <libintl.h> | |
2584 | EOF | |
2585 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 2586 | { (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 2587 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
fcfc3c0c TT |
2588 | if test -z "$ac_err"; then |
2589 | rm -rf conftest* | |
2590 | eval "ac_cv_header_$ac_safe=yes" | |
2591 | else | |
2592 | echo "$ac_err" >&5 | |
2593 | echo "configure: failed program was:" >&5 | |
2594 | cat conftest.$ac_ext >&5 | |
2595 | rm -rf conftest* | |
2596 | eval "ac_cv_header_$ac_safe=no" | |
2597 | fi | |
2598 | rm -f conftest* | |
2599 | fi | |
2600 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2601 | echo "$ac_t""yes" 1>&6 | |
2602 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
b93f016b | 2603 | echo "configure:2604: checking for gettext in libc" >&5 |
fcfc3c0c TT |
2604 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
2605 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2606 | else | |
2607 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2608 | #line 2609 "configure" |
fcfc3c0c TT |
2609 | #include "confdefs.h" |
2610 | #include <libintl.h> | |
2611 | int main() { | |
2612 | return (int) gettext ("") | |
2613 | ; return 0; } | |
2614 | EOF | |
b93f016b | 2615 | if { (eval echo configure:2616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2616 | rm -rf conftest* |
2617 | gt_cv_func_gettext_libc=yes | |
2618 | else | |
2619 | echo "configure: failed program was:" >&5 | |
2620 | cat conftest.$ac_ext >&5 | |
2621 | rm -rf conftest* | |
2622 | gt_cv_func_gettext_libc=no | |
2623 | fi | |
2624 | rm -f conftest* | |
2625 | fi | |
2626 | ||
2627 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2628 | ||
2629 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2630 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
b93f016b | 2631 | echo "configure:2632: checking for bindtextdomain in -lintl" >&5 |
fcfc3c0c TT |
2632 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
2633 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2634 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2635 | else | |
2636 | ac_save_LIBS="$LIBS" | |
2637 | LIBS="-lintl $LIBS" | |
2638 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2639 | #line 2640 "configure" |
fcfc3c0c TT |
2640 | #include "confdefs.h" |
2641 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2642 | /* We use char because int might match the return type of a gcc2 | |
2643 | builtin and then its argument prototype would still apply. */ | |
2644 | char bindtextdomain(); | |
2645 | ||
2646 | int main() { | |
2647 | bindtextdomain() | |
2648 | ; return 0; } | |
2649 | EOF | |
b93f016b | 2650 | if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2651 | rm -rf conftest* |
2652 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2653 | else | |
2654 | echo "configure: failed program was:" >&5 | |
2655 | cat conftest.$ac_ext >&5 | |
2656 | rm -rf conftest* | |
2657 | eval "ac_cv_lib_$ac_lib_var=no" | |
2658 | fi | |
2659 | rm -f conftest* | |
2660 | LIBS="$ac_save_LIBS" | |
2661 | ||
2662 | fi | |
2663 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2664 | echo "$ac_t""yes" 1>&6 | |
2665 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
b93f016b | 2666 | echo "configure:2667: checking for gettext in libintl" >&5 |
fcfc3c0c TT |
2667 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
2668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2669 | else | |
2670 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2671 | #line 2672 "configure" |
fcfc3c0c TT |
2672 | #include "confdefs.h" |
2673 | ||
2674 | int main() { | |
2675 | return (int) gettext ("") | |
2676 | ; return 0; } | |
2677 | EOF | |
b93f016b | 2678 | if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2679 | rm -rf conftest* |
2680 | gt_cv_func_gettext_libintl=yes | |
2681 | else | |
2682 | echo "configure: failed program was:" >&5 | |
2683 | cat conftest.$ac_ext >&5 | |
2684 | rm -rf conftest* | |
2685 | gt_cv_func_gettext_libintl=no | |
2686 | fi | |
2687 | rm -f conftest* | |
2688 | fi | |
2689 | ||
2690 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2691 | else | |
2692 | echo "$ac_t""no" 1>&6 | |
2693 | fi | |
2694 | ||
2695 | fi | |
2696 | ||
2697 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2698 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2699 | cat >> confdefs.h <<\EOF | |
2700 | #define HAVE_GETTEXT 1 | |
2701 | EOF | |
2702 | ||
2703 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2704 | set dummy msgfmt; ac_word=$2 | |
2705 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 2706 | echo "configure:2707: checking for $ac_word" >&5 |
fcfc3c0c TT |
2707 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2708 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2709 | else | |
2710 | case "$MSGFMT" in | |
2711 | /*) | |
2712 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2713 | ;; | |
2714 | *) | |
2715 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2716 | for ac_dir in $PATH; do | |
2717 | test -z "$ac_dir" && ac_dir=. | |
2718 | if test -f $ac_dir/$ac_word; then | |
2719 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2720 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2721 | break | |
2722 | fi | |
2723 | fi | |
2724 | done | |
2725 | IFS="$ac_save_ifs" | |
2726 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2727 | ;; | |
2728 | esac | |
2729 | fi | |
2730 | MSGFMT="$ac_cv_path_MSGFMT" | |
2731 | if test -n "$MSGFMT"; then | |
2732 | echo "$ac_t""$MSGFMT" 1>&6 | |
2733 | else | |
2734 | echo "$ac_t""no" 1>&6 | |
2735 | fi | |
2736 | if test "$MSGFMT" != "no"; then | |
2737 | for ac_func in dcgettext | |
2738 | do | |
2739 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 2740 | echo "configure:2741: checking for $ac_func" >&5 |
fcfc3c0c TT |
2741 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2742 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2743 | else | |
2744 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2745 | #line 2746 "configure" |
fcfc3c0c TT |
2746 | #include "confdefs.h" |
2747 | /* System header to define __stub macros and hopefully few prototypes, | |
2748 | which can conflict with char $ac_func(); below. */ | |
2749 | #include <assert.h> | |
2750 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2751 | /* We use char because int might match the return type of a gcc2 | |
2752 | builtin and then its argument prototype would still apply. */ | |
2753 | char $ac_func(); | |
2754 | ||
2755 | int main() { | |
2756 | ||
2757 | /* The GNU C library defines this for functions which it implements | |
2758 | to always fail with ENOSYS. Some functions are actually named | |
2759 | something starting with __ and the normal name is an alias. */ | |
2760 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2761 | choke me | |
2762 | #else | |
2763 | $ac_func(); | |
2764 | #endif | |
2765 | ||
2766 | ; return 0; } | |
2767 | EOF | |
b93f016b | 2768 | if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2769 | rm -rf conftest* |
2770 | eval "ac_cv_func_$ac_func=yes" | |
2771 | else | |
2772 | echo "configure: failed program was:" >&5 | |
2773 | cat conftest.$ac_ext >&5 | |
2774 | rm -rf conftest* | |
2775 | eval "ac_cv_func_$ac_func=no" | |
2776 | fi | |
2777 | rm -f conftest* | |
2778 | fi | |
2779 | ||
2780 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2781 | echo "$ac_t""yes" 1>&6 | |
2782 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2783 | cat >> confdefs.h <<EOF | |
2784 | #define $ac_tr_func 1 | |
2785 | EOF | |
2786 | ||
2787 | else | |
2788 | echo "$ac_t""no" 1>&6 | |
2789 | fi | |
2790 | done | |
2791 | ||
2792 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2793 | set dummy gmsgfmt; ac_word=$2 | |
2794 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 2795 | echo "configure:2796: checking for $ac_word" >&5 |
fcfc3c0c TT |
2796 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2797 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2798 | else | |
2799 | case "$GMSGFMT" in | |
2800 | /*) | |
2801 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2802 | ;; | |
4b23e55c JM |
2803 | ?:/*) |
2804 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2805 | ;; | |
fcfc3c0c | 2806 | *) |
4b23e55c | 2807 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
2808 | ac_dummy="$PATH" |
2809 | for ac_dir in $ac_dummy; do | |
fcfc3c0c TT |
2810 | test -z "$ac_dir" && ac_dir=. |
2811 | if test -f $ac_dir/$ac_word; then | |
2812 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2813 | break | |
2814 | fi | |
2815 | done | |
2816 | IFS="$ac_save_ifs" | |
2817 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2818 | ;; | |
2819 | esac | |
2820 | fi | |
2821 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2822 | if test -n "$GMSGFMT"; then | |
2823 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2824 | else | |
2825 | echo "$ac_t""no" 1>&6 | |
2826 | fi | |
2827 | ||
2828 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2829 | set dummy xgettext; ac_word=$2 | |
2830 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 2831 | echo "configure:2832: checking for $ac_word" >&5 |
fcfc3c0c TT |
2832 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2834 | else | |
2835 | case "$XGETTEXT" in | |
2836 | /*) | |
2837 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2838 | ;; | |
2839 | *) | |
2840 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2841 | for ac_dir in $PATH; do | |
2842 | test -z "$ac_dir" && ac_dir=. | |
2843 | if test -f $ac_dir/$ac_word; then | |
2844 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2845 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2846 | break | |
2847 | fi | |
2848 | fi | |
2849 | done | |
2850 | IFS="$ac_save_ifs" | |
2851 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2852 | ;; | |
2853 | esac | |
2854 | fi | |
2855 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2856 | if test -n "$XGETTEXT"; then | |
2857 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2858 | else | |
2859 | echo "$ac_t""no" 1>&6 | |
2860 | fi | |
2861 | ||
2862 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 2863 | #line 2864 "configure" |
fcfc3c0c TT |
2864 | #include "confdefs.h" |
2865 | ||
2866 | int main() { | |
2867 | extern int _nl_msg_cat_cntr; | |
2868 | return _nl_msg_cat_cntr | |
2869 | ; return 0; } | |
2870 | EOF | |
b93f016b | 2871 | if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fcfc3c0c TT |
2872 | rm -rf conftest* |
2873 | CATOBJEXT=.gmo | |
2874 | DATADIRNAME=share | |
2875 | else | |
2876 | echo "configure: failed program was:" >&5 | |
2877 | cat conftest.$ac_ext >&5 | |
2878 | rm -rf conftest* | |
2879 | CATOBJEXT=.mo | |
2880 | DATADIRNAME=lib | |
5436fc65 C |
2881 | fi |
2882 | rm -f conftest* | |
fcfc3c0c TT |
2883 | INSTOBJEXT=.mo |
2884 | fi | |
2885 | fi | |
2886 | ||
2887 | else | |
2888 | echo "$ac_t""no" 1>&6 | |
5436fc65 | 2889 | fi |
fcfc3c0c TT |
2890 | |
2891 | ||
2892 | ||
2893 | if test "$CATOBJEXT" = "NONE"; then | |
2894 | nls_cv_use_gnu_gettext=yes | |
2895 | fi | |
2896 | fi | |
2897 | ||
2898 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2899 | INTLOBJS="\$(GETTOBJS)" | |
2900 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2901 | set dummy msgfmt; ac_word=$2 | |
2902 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 2903 | echo "configure:2904: checking for $ac_word" >&5 |
fcfc3c0c TT |
2904 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
2905 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2906 | else | |
2907 | case "$MSGFMT" in | |
2908 | /*) | |
2909 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2910 | ;; | |
2911 | *) | |
2912 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2913 | for ac_dir in $PATH; do | |
2914 | test -z "$ac_dir" && ac_dir=. | |
2915 | if test -f $ac_dir/$ac_word; then | |
2916 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2917 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2918 | break | |
2919 | fi | |
2920 | fi | |
2921 | done | |
2922 | IFS="$ac_save_ifs" | |
2923 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2924 | ;; | |
2925 | esac | |
5436fc65 | 2926 | fi |
fcfc3c0c TT |
2927 | MSGFMT="$ac_cv_path_MSGFMT" |
2928 | if test -n "$MSGFMT"; then | |
2929 | echo "$ac_t""$MSGFMT" 1>&6 | |
dedcc91d | 2930 | else |
fcfc3c0c | 2931 | echo "$ac_t""no" 1>&6 |
5436fc65 | 2932 | fi |
5436fc65 | 2933 | |
fcfc3c0c TT |
2934 | # Extract the first word of "gmsgfmt", so it can be a program name with args. |
2935 | set dummy gmsgfmt; ac_word=$2 | |
2936 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 2937 | echo "configure:2938: checking for $ac_word" >&5 |
fcfc3c0c TT |
2938 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
2939 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2940 | else | |
2941 | case "$GMSGFMT" in | |
2942 | /*) | |
2943 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2944 | ;; | |
4b23e55c JM |
2945 | ?:/*) |
2946 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2947 | ;; | |
fcfc3c0c | 2948 | *) |
4b23e55c | 2949 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
2950 | ac_dummy="$PATH" |
2951 | for ac_dir in $ac_dummy; do | |
fcfc3c0c TT |
2952 | test -z "$ac_dir" && ac_dir=. |
2953 | if test -f $ac_dir/$ac_word; then | |
2954 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2955 | break | |
2956 | fi | |
2957 | done | |
2958 | IFS="$ac_save_ifs" | |
2959 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2960 | ;; | |
2961 | esac | |
2962 | fi | |
2963 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2964 | if test -n "$GMSGFMT"; then | |
2965 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2966 | else | |
2967 | echo "$ac_t""no" 1>&6 | |
2968 | fi | |
5436fc65 | 2969 | |
fcfc3c0c TT |
2970 | # Extract the first word of "xgettext", so it can be a program name with args. |
2971 | set dummy xgettext; ac_word=$2 | |
2972 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 2973 | echo "configure:2974: checking for $ac_word" >&5 |
fcfc3c0c TT |
2974 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
2975 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2976 | else | |
2977 | case "$XGETTEXT" in | |
2978 | /*) | |
2979 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2980 | ;; | |
2981 | *) | |
2982 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2983 | for ac_dir in $PATH; do | |
2984 | test -z "$ac_dir" && ac_dir=. | |
2985 | if test -f $ac_dir/$ac_word; then | |
2986 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2987 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2988 | break | |
2989 | fi | |
2990 | fi | |
2991 | done | |
2992 | IFS="$ac_save_ifs" | |
2993 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2994 | ;; | |
2995 | esac | |
2996 | fi | |
2997 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2998 | if test -n "$XGETTEXT"; then | |
2999 | echo "$ac_t""$XGETTEXT" 1>&6 | |
5436fc65 | 3000 | else |
5436fc65 C |
3001 | echo "$ac_t""no" 1>&6 |
3002 | fi | |
5436fc65 | 3003 | |
fcfc3c0c TT |
3004 | |
3005 | USE_INCLUDED_LIBINTL=yes | |
3006 | CATOBJEXT=.gmo | |
3007 | INSTOBJEXT=.mo | |
3008 | DATADIRNAME=share | |
3009 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
3010 | INTLLIBS=$INTLDEPS | |
3011 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
3012 | nls_cv_header_intl=libintl.h | |
3013 | nls_cv_header_libgt=libgettext.h | |
3014 | fi | |
5436fc65 | 3015 | |
fcfc3c0c TT |
3016 | if test "$XGETTEXT" != ":"; then |
3017 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
3018 | : ; | |
3019 | else | |
3020 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
3021 | XGETTEXT=":" | |
3022 | fi | |
3023 | fi | |
3024 | ||
3025 | # We need to process the po/ directory. | |
3026 | POSUB=po | |
3027 | else | |
3028 | DATADIRNAME=share | |
3029 | nls_cv_header_intl=libintl.h | |
3030 | nls_cv_header_libgt=libgettext.h | |
3031 | fi | |
3032 | ||
3033 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
3034 | # because some of the sources are only built for this goal. | |
3035 | if test "$PACKAGE" = gettext; then | |
3036 | USE_NLS=yes | |
3037 | USE_INCLUDED_LIBINTL=yes | |
3038 | fi | |
3039 | ||
3040 | for lang in $ALL_LINGUAS; do | |
3041 | GMOFILES="$GMOFILES $lang.gmo" | |
3042 | POFILES="$POFILES $lang.po" | |
3043 | done | |
3044 | ||
3045 | ||
3046 | ||
3047 | ||
3048 | ||
3049 | ||
3050 | ||
3051 | ||
3052 | ||
3053 | ||
3054 | ||
3055 | ||
3056 | ||
3057 | ||
3058 | if test "x$CATOBJEXT" != "x"; then | |
3059 | if test "x$ALL_LINGUAS" = "x"; then | |
3060 | LINGUAS= | |
3061 | else | |
3062 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
b93f016b | 3063 | echo "configure:3064: checking for catalogs to be installed" >&5 |
fcfc3c0c TT |
3064 | NEW_LINGUAS= |
3065 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
3066 | case "$ALL_LINGUAS" in | |
3067 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
3068 | esac | |
3069 | done | |
3070 | LINGUAS=$NEW_LINGUAS | |
3071 | echo "$ac_t""$LINGUAS" 1>&6 | |
3072 | fi | |
3073 | ||
3074 | if test -n "$LINGUAS"; then | |
3075 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
3076 | fi | |
3077 | fi | |
3078 | ||
3079 | if test $ac_cv_header_locale_h = yes; then | |
3080 | INCLUDE_LOCALE_H="#include <locale.h>" | |
3081 | else | |
3082 | INCLUDE_LOCALE_H="\ | |
3083 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
3084 | fi | |
3085 | ||
3086 | ||
3087 | if test -f $srcdir/po2tbl.sed.in; then | |
3088 | if test "$CATOBJEXT" = ".cat"; then | |
3089 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
3090 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
b93f016b | 3091 | echo "configure:3092: checking for linux/version.h" >&5 |
5436fc65 C |
3092 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3093 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3094 | else | |
3095 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3096 | #line 3097 "configure" |
5436fc65 | 3097 | #include "confdefs.h" |
fcfc3c0c | 3098 | #include <linux/version.h> |
5436fc65 | 3099 | EOF |
1a7b4b7c | 3100 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b93f016b | 3101 | { (eval echo configure:3102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 3102 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
3103 | if test -z "$ac_err"; then |
3104 | rm -rf conftest* | |
3105 | eval "ac_cv_header_$ac_safe=yes" | |
3106 | else | |
3107 | echo "$ac_err" >&5 | |
bfde4a67 SG |
3108 | echo "configure: failed program was:" >&5 |
3109 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
3110 | rm -rf conftest* |
3111 | eval "ac_cv_header_$ac_safe=no" | |
3112 | fi | |
3113 | rm -f conftest* | |
3114 | fi | |
3115 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3116 | echo "$ac_t""yes" 1>&6 | |
fcfc3c0c | 3117 | msgformat=linux |
5436fc65 C |
3118 | else |
3119 | echo "$ac_t""no" 1>&6 | |
fcfc3c0c | 3120 | msgformat=xopen |
0579b53d GN |
3121 | fi |
3122 | ||
0579b53d | 3123 | |
fcfc3c0c TT |
3124 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed |
3125 | fi | |
3126 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
3127 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
3128 | fi | |
3129 | ||
3130 | if test "$PACKAGE" = "gettext"; then | |
3131 | GT_NO="#NO#" | |
3132 | GT_YES= | |
3133 | else | |
3134 | GT_NO= | |
3135 | GT_YES="#YES#" | |
3136 | fi | |
3137 | ||
3138 | ||
0579b53d | 3139 | |
fcfc3c0c TT |
3140 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" |
3141 | ||
0579b53d | 3142 | |
fcfc3c0c TT |
3143 | l= |
3144 | ||
0579b53d | 3145 | |
fcfc3c0c TT |
3146 | if test -d $srcdir/po; then |
3147 | test -d po || mkdir po | |
3148 | if test "x$srcdir" != "x."; then | |
3149 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
3150 | posrcprefix="$srcdir/" | |
3151 | else | |
3152 | posrcprefix="../$srcdir/" | |
3153 | fi | |
3154 | else | |
3155 | posrcprefix="../" | |
3156 | fi | |
3157 | rm -f po/POTFILES | |
3158 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
3159 | < $srcdir/po/POTFILES.in > po/POTFILES | |
3160 | fi | |
3161 | ||
0579b53d | 3162 | |
bfde4a67 SG |
3163 | |
3164 | CONFIG_OBS= | |
018d76dd | 3165 | CONFIG_DEPS= |
c7bb1531 | 3166 | CONFIG_SRCS= |
bfde4a67 SG |
3167 | |
3168 | configdirs="doc testsuite" | |
3169 | ||
3170 | ||
3171 | . ${srcdir}/configure.host | |
3172 | ||
3173 | . ${srcdir}/configure.tgt | |
3174 | ||
3175 | ||
5436fc65 C |
3176 | # Find a good install program. We prefer a C program (faster), |
3177 | # so one script is as good as another. But avoid the broken or | |
3178 | # incompatible versions: | |
3179 | # SysV /etc/install, /usr/sbin/install | |
3180 | # SunOS /usr/etc/install | |
3181 | # IRIX /sbin/install | |
3182 | # AIX /bin/install | |
4b23e55c | 3183 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
5436fc65 C |
3184 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
3185 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3186 | # ./install, which can be erroneously created by make from ./install.sh. | |
3187 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
b93f016b | 3188 | echo "configure:3189: checking for a BSD compatible install" >&5 |
5436fc65 C |
3189 | if test -z "$INSTALL"; then |
3190 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3191 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3192 | else | |
4b23e55c | 3193 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
5436fc65 C |
3194 | for ac_dir in $PATH; do |
3195 | # Account for people who put trailing slashes in PATH elements. | |
3196 | case "$ac_dir/" in | |
3197 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3198 | *) | |
3199 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4b23e55c JM |
3200 | # Don't use installbsd from OSF since it installs stuff as root |
3201 | # by default. | |
3202 | for ac_prog in ginstall scoinst install; do | |
5436fc65 C |
3203 | if test -f $ac_dir/$ac_prog; then |
3204 | if test $ac_prog = install && | |
3205 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3206 | # AIX install. It has an incompatible calling convention. | |
5436fc65 C |
3207 | : |
3208 | else | |
3209 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3210 | break 2 | |
3211 | fi | |
3212 | fi | |
3213 | done | |
3214 | ;; | |
3215 | esac | |
3216 | done | |
bfde4a67 | 3217 | IFS="$ac_save_IFS" |
1a7b4b7c | 3218 | |
5436fc65 | 3219 | fi |
1a7b4b7c DE |
3220 | if test "${ac_cv_path_install+set}" = set; then |
3221 | INSTALL="$ac_cv_path_install" | |
3222 | else | |
3223 | # As a last resort, use the slow shell script. We don't cache a | |
3224 | # path for INSTALL within a source directory, because that will | |
3225 | # break other packages using the cache if that directory is | |
3226 | # removed, or if the path is relative. | |
3227 | INSTALL="$ac_install_sh" | |
3228 | fi | |
5436fc65 C |
3229 | fi |
3230 | echo "$ac_t""$INSTALL" 1>&6 | |
3231 | ||
3232 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3233 | # It thinks the first close brace ends the variable substitution. | |
3234 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3235 | ||
b93f016b GN |
3236 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
3237 | ||
5436fc65 C |
3238 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
3239 | ||
d8efbc66 FF |
3240 | if test $host != $build; then |
3241 | ac_tool_prefix=${host_alias}- | |
3242 | else | |
3243 | ac_tool_prefix= | |
3244 | fi | |
3245 | ||
3246 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3247 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
3248 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 3249 | echo "configure:3250: checking for $ac_word" >&5 |
d8efbc66 FF |
3250 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
3251 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3252 | else | |
3253 | if test -n "$AR"; then | |
3254 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
3255 | else | |
4b23e55c | 3256 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
3257 | ac_dummy="$PATH" |
3258 | for ac_dir in $ac_dummy; do | |
d8efbc66 FF |
3259 | test -z "$ac_dir" && ac_dir=. |
3260 | if test -f $ac_dir/$ac_word; then | |
3261 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
3262 | break | |
3263 | fi | |
3264 | done | |
3265 | IFS="$ac_save_ifs" | |
3266 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
3267 | fi | |
3268 | fi | |
3269 | AR="$ac_cv_prog_AR" | |
3270 | if test -n "$AR"; then | |
3271 | echo "$ac_t""$AR" 1>&6 | |
3272 | else | |
3273 | echo "$ac_t""no" 1>&6 | |
3274 | fi | |
3275 | ||
3276 | ||
3277 | ||
3278 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
3279 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
3280 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 3281 | echo "configure:3282: checking for $ac_word" >&5 |
d8efbc66 FF |
3282 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3283 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3284 | else | |
3285 | if test -n "$RANLIB"; then | |
3286 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3287 | else | |
4b23e55c | 3288 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
3289 | ac_dummy="$PATH" |
3290 | for ac_dir in $ac_dummy; do | |
d8efbc66 FF |
3291 | test -z "$ac_dir" && ac_dir=. |
3292 | if test -f $ac_dir/$ac_word; then | |
3293 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3294 | break | |
3295 | fi | |
3296 | done | |
3297 | IFS="$ac_save_ifs" | |
3298 | fi | |
3299 | fi | |
3300 | RANLIB="$ac_cv_prog_RANLIB" | |
3301 | if test -n "$RANLIB"; then | |
3302 | echo "$ac_t""$RANLIB" 1>&6 | |
3303 | else | |
3304 | echo "$ac_t""no" 1>&6 | |
3305 | fi | |
3306 | ||
3307 | ||
3308 | if test -z "$ac_cv_prog_RANLIB"; then | |
3309 | if test -n "$ac_tool_prefix"; then | |
3310 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5436fc65 C |
3311 | set dummy ranlib; ac_word=$2 |
3312 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 3313 | echo "configure:3314: checking for $ac_word" >&5 |
5436fc65 C |
3314 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
3315 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3316 | else | |
3317 | if test -n "$RANLIB"; then | |
3318 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3319 | else | |
4b23e55c | 3320 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
3321 | ac_dummy="$PATH" |
3322 | for ac_dir in $ac_dummy; do | |
5436fc65 C |
3323 | test -z "$ac_dir" && ac_dir=. |
3324 | if test -f $ac_dir/$ac_word; then | |
3325 | ac_cv_prog_RANLIB="ranlib" | |
3326 | break | |
3327 | fi | |
3328 | done | |
3329 | IFS="$ac_save_ifs" | |
3330 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3331 | fi | |
3332 | fi | |
3333 | RANLIB="$ac_cv_prog_RANLIB" | |
3334 | if test -n "$RANLIB"; then | |
3335 | echo "$ac_t""$RANLIB" 1>&6 | |
3336 | else | |
3337 | echo "$ac_t""no" 1>&6 | |
3338 | fi | |
3339 | ||
d8efbc66 FF |
3340 | else |
3341 | RANLIB=":" | |
3342 | fi | |
3343 | fi | |
3344 | ||
204c8825 FF |
3345 | for ac_prog in 'bison -y' byacc |
3346 | do | |
3347 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3348 | set dummy $ac_prog; ac_word=$2 | |
3349 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b93f016b | 3350 | echo "configure:3351: checking for $ac_word" >&5 |
204c8825 FF |
3351 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
3352 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3353 | else | |
3354 | if test -n "$YACC"; then | |
3355 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
3356 | else | |
4b23e55c | 3357 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
b93f016b GN |
3358 | ac_dummy="$PATH" |
3359 | for ac_dir in $ac_dummy; do | |
204c8825 FF |
3360 | test -z "$ac_dir" && ac_dir=. |
3361 | if test -f $ac_dir/$ac_word; then | |
3362 | ac_cv_prog_YACC="$ac_prog" | |
3363 | break | |
3364 | fi | |
3365 | done | |
3366 | IFS="$ac_save_ifs" | |
3367 | fi | |
3368 | fi | |
3369 | YACC="$ac_cv_prog_YACC" | |
3370 | if test -n "$YACC"; then | |
3371 | echo "$ac_t""$YACC" 1>&6 | |
3372 | else | |
3373 | echo "$ac_t""no" 1>&6 | |
3374 | fi | |
3375 | ||
3376 | test -n "$YACC" && break | |
3377 | done | |
3378 | test -n "$YACC" || YACC="yacc" | |
3379 | ||
5436fc65 | 3380 | |
5436fc65 C |
3381 | if test "$program_transform_name" = s,x,x,; then |
3382 | program_transform_name= | |
3383 | else | |
1a7b4b7c DE |
3384 | # Double any \ or $. echo might interpret backslashes. |
3385 | cat <<\EOF_SED > conftestsed | |
3386 | s,\\,\\\\,g; s,\$,$$,g | |
3387 | EOF_SED | |
5436fc65 C |
3388 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
3389 | rm -f conftestsed | |
3390 | fi | |
3391 | test "$program_prefix" != NONE && | |
3392 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
3393 | # Use a double $ so make ignores it. | |
3394 | test "$program_suffix" != NONE && | |
3395 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
3396 | ||
3397 | # sed with no file args requires a program. | |
3398 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
3399 | ||
3400 | ||
c14cabba | 3401 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
b93f016b | 3402 | echo "configure:3403: checking return type of signal handlers" >&5 |
c14cabba AC |
3403 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3404 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3405 | else | |
3406 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3407 | #line 3408 "configure" |
c14cabba AC |
3408 | #include "confdefs.h" |
3409 | #include <sys/types.h> | |
3410 | #include <signal.h> | |
3411 | #ifdef signal | |
3412 | #undef signal | |
3413 | #endif | |
3414 | #ifdef __cplusplus | |
3415 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3416 | #else | |
3417 | void (*signal ()) (); | |
3418 | #endif | |
3419 | ||
3420 | int main() { | |
3421 | int i; | |
3422 | ; return 0; } | |
3423 | EOF | |
b93f016b | 3424 | if { (eval echo configure:3425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c14cabba AC |
3425 | rm -rf conftest* |
3426 | ac_cv_type_signal=void | |
3427 | else | |
3428 | echo "configure: failed program was:" >&5 | |
3429 | cat conftest.$ac_ext >&5 | |
3430 | rm -rf conftest* | |
3431 | ac_cv_type_signal=int | |
3432 | fi | |
3433 | rm -f conftest* | |
3434 | fi | |
3435 | ||
3436 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3437 | cat >> confdefs.h <<EOF | |
3438 | #define RETSIGTYPE $ac_cv_type_signal | |
3439 | EOF | |
3440 | ||
3441 | ||
3442 | ||
2b576293 | 3443 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
b93f016b | 3444 | echo "configure:3445: checking for ANSI C header files" >&5 |
2b576293 C |
3445 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
3446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3447 | else | |
3448 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3449 | #line 3450 "configure" |
2b576293 C |
3450 | #include "confdefs.h" |
3451 | #include <stdlib.h> | |
3452 | #include <stdarg.h> | |
3453 | #include <string.h> | |
3454 | #include <float.h> | |
3455 | EOF | |
1a7b4b7c | 3456 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b93f016b | 3457 | { (eval echo configure:3458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 3458 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2b576293 C |
3459 | if test -z "$ac_err"; then |
3460 | rm -rf conftest* | |
3461 | ac_cv_header_stdc=yes | |
3462 | else | |
3463 | echo "$ac_err" >&5 | |
bfde4a67 SG |
3464 | echo "configure: failed program was:" >&5 |
3465 | cat conftest.$ac_ext >&5 | |
2b576293 C |
3466 | rm -rf conftest* |
3467 | ac_cv_header_stdc=no | |
3468 | fi | |
3469 | rm -f conftest* | |
3470 | ||
3471 | if test $ac_cv_header_stdc = yes; then | |
3472 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3473 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3474 | #line 3475 "configure" |
2b576293 C |
3475 | #include "confdefs.h" |
3476 | #include <string.h> | |
3477 | EOF | |
3478 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3479 | egrep "memchr" >/dev/null 2>&1; then | |
3480 | : | |
3481 | else | |
3482 | rm -rf conftest* | |
3483 | ac_cv_header_stdc=no | |
3484 | fi | |
3485 | rm -f conftest* | |
3486 | ||
3487 | fi | |
3488 | ||
3489 | if test $ac_cv_header_stdc = yes; then | |
3490 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3491 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3492 | #line 3493 "configure" |
2b576293 C |
3493 | #include "confdefs.h" |
3494 | #include <stdlib.h> | |
3495 | EOF | |
3496 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3497 | egrep "free" >/dev/null 2>&1; then | |
3498 | : | |
3499 | else | |
3500 | rm -rf conftest* | |
3501 | ac_cv_header_stdc=no | |
3502 | fi | |
3503 | rm -f conftest* | |
3504 | ||
3505 | fi | |
3506 | ||
3507 | if test $ac_cv_header_stdc = yes; then | |
3508 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3509 | if test "$cross_compiling" = yes; then | |
1a7b4b7c | 3510 | : |
2b576293 | 3511 | else |
bfde4a67 | 3512 | cat > conftest.$ac_ext <<EOF |
b93f016b | 3513 | #line 3514 "configure" |
2b576293 C |
3514 | #include "confdefs.h" |
3515 | #include <ctype.h> | |
3516 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3517 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3518 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3519 | int main () { int i; for (i = 0; i < 256; i++) | |
3520 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3521 | exit (0); } | |
3522 | ||
3523 | EOF | |
b93f016b | 3524 | if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 3525 | then |
2b576293 C |
3526 | : |
3527 | else | |
bfde4a67 SG |
3528 | echo "configure: failed program was:" >&5 |
3529 | cat conftest.$ac_ext >&5 | |
3530 | rm -fr conftest* | |
2b576293 C |
3531 | ac_cv_header_stdc=no |
3532 | fi | |
ef6c51d1 | 3533 | rm -fr conftest* |
bfde4a67 SG |
3534 | fi |
3535 | ||
2b576293 C |
3536 | fi |
3537 | fi | |
1a7b4b7c | 3538 | |
2b576293 C |
3539 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
3540 | if test $ac_cv_header_stdc = yes; then | |
3541 | cat >> confdefs.h <<\EOF | |
3542 | #define STDC_HEADERS 1 | |
3543 | EOF | |
3544 | ||
3545 | fi | |
3546 | ||
b0f33a03 | 3547 | for ac_hdr in ctype.h curses.h endian.h libintl.h link.h \ |
4ff3dfab | 3548 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
b0f33a03 | 3549 | string.h sys/procfs.h sys/ptrace.h sys/reg.h \ |
4ff3dfab | 3550 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
1dee2761 | 3551 | wchar.h wctype.h asm/debugreg.h |
1a494973 | 3552 | do |
bfde4a67 | 3553 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
1a494973 | 3554 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
b93f016b | 3555 | echo "configure:3556: checking for $ac_hdr" >&5 |
1a494973 C |
3556 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3558 | else | |
3559 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3560 | #line 3561 "configure" |
1a494973 C |
3561 | #include "confdefs.h" |
3562 | #include <$ac_hdr> | |
3563 | EOF | |
1a7b4b7c | 3564 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b93f016b | 3565 | { (eval echo configure:3566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 3566 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1a494973 C |
3567 | if test -z "$ac_err"; then |
3568 | rm -rf conftest* | |
3569 | eval "ac_cv_header_$ac_safe=yes" | |
3570 | else | |
3571 | echo "$ac_err" >&5 | |
bfde4a67 SG |
3572 | echo "configure: failed program was:" >&5 |
3573 | cat conftest.$ac_ext >&5 | |
1a494973 C |
3574 | rm -rf conftest* |
3575 | eval "ac_cv_header_$ac_safe=no" | |
3576 | fi | |
3577 | rm -f conftest* | |
3578 | fi | |
3579 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3580 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 | 3581 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
1a494973 C |
3582 | cat >> confdefs.h <<EOF |
3583 | #define $ac_tr_hdr 1 | |
3584 | EOF | |
3585 | ||
3586 | else | |
3587 | echo "$ac_t""no" 1>&6 | |
3588 | fi | |
3589 | done | |
3590 | ||
eac4afd1 | 3591 | |
2b576293 | 3592 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
b93f016b | 3593 | echo "configure:3594: checking whether stat file-mode macros are broken" >&5 |
2b576293 C |
3594 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
3595 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3596 | else | |
3597 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3598 | #line 3599 "configure" |
2b576293 C |
3599 | #include "confdefs.h" |
3600 | #include <sys/types.h> | |
3601 | #include <sys/stat.h> | |
3602 | ||
3603 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
3604 | # if S_ISBLK (S_IFDIR) | |
3605 | You lose. | |
3606 | # endif | |
3607 | #endif | |
3608 | ||
3609 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
3610 | # if S_ISBLK (S_IFCHR) | |
3611 | You lose. | |
3612 | # endif | |
3613 | #endif | |
3614 | ||
3615 | #if defined(S_ISLNK) && defined(S_IFREG) | |
3616 | # if S_ISLNK (S_IFREG) | |
3617 | You lose. | |
3618 | # endif | |
3619 | #endif | |
3620 | ||
3621 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
3622 | # if S_ISSOCK (S_IFREG) | |
3623 | You lose. | |
3624 | # endif | |
3625 | #endif | |
3626 | ||
3627 | EOF | |
3628 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3629 | egrep "You lose" >/dev/null 2>&1; then | |
3630 | rm -rf conftest* | |
3631 | ac_cv_header_stat_broken=yes | |
3632 | else | |
3633 | rm -rf conftest* | |
3634 | ac_cv_header_stat_broken=no | |
3635 | fi | |
3636 | rm -f conftest* | |
3637 | ||
3638 | fi | |
1a7b4b7c | 3639 | |
2b576293 C |
3640 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 |
3641 | if test $ac_cv_header_stat_broken = yes; then | |
3642 | cat >> confdefs.h <<\EOF | |
3643 | #define STAT_MACROS_BROKEN 1 | |
3644 | EOF | |
3645 | ||
3646 | fi | |
3647 | ||
3648 | ||
8501c742 | 3649 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
b93f016b | 3650 | echo "configure:3651: checking for working const" >&5 |
8501c742 SG |
3651 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
3652 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3653 | else | |
3654 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3655 | #line 3656 "configure" |
8501c742 SG |
3656 | #include "confdefs.h" |
3657 | ||
bfde4a67 | 3658 | int main() { |
8501c742 SG |
3659 | |
3660 | /* Ultrix mips cc rejects this. */ | |
3661 | typedef int charset[2]; const charset x; | |
3662 | /* SunOS 4.1.1 cc rejects this. */ | |
3663 | char const *const *ccp; | |
3664 | char **p; | |
3665 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3666 | struct point {int x, y;}; | |
3667 | static struct point const zero = {0,0}; | |
3668 | /* AIX XL C 1.02.0.0 rejects this. | |
3669 | It does not let you subtract one const X* pointer from another in an arm | |
3670 | of an if-expression whose if-part is not a constant expression */ | |
3671 | const char *g = "string"; | |
3672 | ccp = &g + (g ? g-g : 0); | |
3673 | /* HPUX 7.0 cc rejects these. */ | |
3674 | ++ccp; | |
3675 | p = (char**) ccp; | |
3676 | ccp = (char const *const *) p; | |
3677 | { /* SCO 3.2v4 cc rejects this. */ | |
3678 | char *t; | |
3679 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3680 | ||
3681 | *t++ = 0; | |
3682 | } | |
3683 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3684 | int x[] = {25, 17}; | |
3685 | const int *foo = &x[0]; | |
3686 | ++foo; | |
3687 | } | |
3688 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3689 | typedef const int *iptr; | |
3690 | iptr p = 0; | |
3691 | ++p; | |
3692 | } | |
3693 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3694 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3695 | struct s { int j; const int *ap[3]; }; | |
3696 | struct s *b; b->j = 5; | |
3697 | } | |
3698 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3699 | const int foo = 10; | |
3700 | } | |
3701 | ||
3702 | ; return 0; } | |
3703 | EOF | |
b93f016b | 3704 | if { (eval echo configure:3705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
8501c742 SG |
3705 | rm -rf conftest* |
3706 | ac_cv_c_const=yes | |
3707 | else | |
bfde4a67 SG |
3708 | echo "configure: failed program was:" >&5 |
3709 | cat conftest.$ac_ext >&5 | |
8501c742 SG |
3710 | rm -rf conftest* |
3711 | ac_cv_c_const=no | |
3712 | fi | |
3713 | rm -f conftest* | |
8501c742 SG |
3714 | fi |
3715 | ||
3716 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3717 | if test $ac_cv_c_const = no; then | |
3718 | cat >> confdefs.h <<\EOF | |
3719 | #define const | |
3720 | EOF | |
3721 | ||
3722 | fi | |
3723 | ||
3724 | ||
b0f33a03 | 3725 | for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc |
72ae15f6 FF |
3726 | do |
3727 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 3728 | echo "configure:3729: checking for $ac_func" >&5 |
72ae15f6 FF |
3729 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3730 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3731 | else | |
3732 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3733 | #line 3734 "configure" |
72ae15f6 FF |
3734 | #include "confdefs.h" |
3735 | /* System header to define __stub macros and hopefully few prototypes, | |
3736 | which can conflict with char $ac_func(); below. */ | |
3737 | #include <assert.h> | |
3738 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
3739 | /* We use char because int might match the return type of a gcc2 |
3740 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c | 3741 | char $ac_func(); |
72ae15f6 | 3742 | |
bfde4a67 | 3743 | int main() { |
72ae15f6 FF |
3744 | |
3745 | /* The GNU C library defines this for functions which it implements | |
3746 | to always fail with ENOSYS. Some functions are actually named | |
3747 | something starting with __ and the normal name is an alias. */ | |
3748 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3749 | choke me | |
3750 | #else | |
3751 | $ac_func(); | |
3752 | #endif | |
3753 | ||
3754 | ; return 0; } | |
3755 | EOF | |
b93f016b | 3756 | if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
72ae15f6 FF |
3757 | rm -rf conftest* |
3758 | eval "ac_cv_func_$ac_func=yes" | |
3759 | else | |
bfde4a67 SG |
3760 | echo "configure: failed program was:" >&5 |
3761 | cat conftest.$ac_ext >&5 | |
72ae15f6 FF |
3762 | rm -rf conftest* |
3763 | eval "ac_cv_func_$ac_func=no" | |
3764 | fi | |
3765 | rm -f conftest* | |
ef6c51d1 | 3766 | fi |
bfde4a67 | 3767 | |
72ae15f6 FF |
3768 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3769 | echo "$ac_t""yes" 1>&6 | |
1a7b4b7c | 3770 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
72ae15f6 FF |
3771 | cat >> confdefs.h <<EOF |
3772 | #define $ac_tr_func 1 | |
3773 | EOF | |
3774 | ||
3775 | else | |
3776 | echo "$ac_t""no" 1>&6 | |
3777 | fi | |
3778 | done | |
3779 | ||
0aa3233e ILT |
3780 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
3781 | # for constant arguments. Useless! | |
3782 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
b93f016b | 3783 | echo "configure:3784: checking for working alloca.h" >&5 |
0aa3233e ILT |
3784 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3785 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3786 | else | |
3787 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3788 | #line 3789 "configure" |
0aa3233e ILT |
3789 | #include "confdefs.h" |
3790 | #include <alloca.h> | |
3791 | int main() { | |
3792 | char *p = alloca(2 * sizeof(int)); | |
3793 | ; return 0; } | |
3794 | EOF | |
b93f016b | 3795 | if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3796 | rm -rf conftest* |
3797 | ac_cv_header_alloca_h=yes | |
3798 | else | |
3799 | echo "configure: failed program was:" >&5 | |
3800 | cat conftest.$ac_ext >&5 | |
3801 | rm -rf conftest* | |
3802 | ac_cv_header_alloca_h=no | |
3803 | fi | |
3804 | rm -f conftest* | |
3805 | fi | |
3806 | ||
3807 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3808 | if test $ac_cv_header_alloca_h = yes; then | |
3809 | cat >> confdefs.h <<\EOF | |
3810 | #define HAVE_ALLOCA_H 1 | |
3811 | EOF | |
3812 | ||
3813 | fi | |
3814 | ||
3815 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
b93f016b | 3816 | echo "configure:3817: checking for alloca" >&5 |
0aa3233e ILT |
3817 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3818 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3819 | else | |
3820 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3821 | #line 3822 "configure" |
0aa3233e ILT |
3822 | #include "confdefs.h" |
3823 | ||
3824 | #ifdef __GNUC__ | |
3825 | # define alloca __builtin_alloca | |
3826 | #else | |
4b23e55c JM |
3827 | # ifdef _MSC_VER |
3828 | # include <malloc.h> | |
3829 | # define alloca _alloca | |
0aa3233e | 3830 | # else |
4b23e55c JM |
3831 | # if HAVE_ALLOCA_H |
3832 | # include <alloca.h> | |
ba68ad57 | 3833 | # else |
4b23e55c JM |
3834 | # ifdef _AIX |
3835 | #pragma alloca | |
3836 | # else | |
3837 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
0aa3233e | 3838 | char *alloca (); |
4b23e55c | 3839 | # endif |
0aa3233e ILT |
3840 | # endif |
3841 | # endif | |
3842 | # endif | |
3843 | #endif | |
3844 | ||
3845 | int main() { | |
3846 | char *p = (char *) alloca(1); | |
3847 | ; return 0; } | |
3848 | EOF | |
b93f016b | 3849 | if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3850 | rm -rf conftest* |
3851 | ac_cv_func_alloca_works=yes | |
3852 | else | |
3853 | echo "configure: failed program was:" >&5 | |
3854 | cat conftest.$ac_ext >&5 | |
3855 | rm -rf conftest* | |
3856 | ac_cv_func_alloca_works=no | |
3857 | fi | |
3858 | rm -f conftest* | |
3859 | fi | |
3860 | ||
3861 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3862 | if test $ac_cv_func_alloca_works = yes; then | |
3863 | cat >> confdefs.h <<\EOF | |
3864 | #define HAVE_ALLOCA 1 | |
3865 | EOF | |
3866 | ||
3867 | fi | |
3868 | ||
3869 | if test $ac_cv_func_alloca_works = no; then | |
3870 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3871 | # that cause trouble. Some versions do not even contain alloca or | |
3872 | # contain a buggy version. If you still want to use their alloca, | |
3873 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4b23e55c | 3874 | ALLOCA=alloca.${ac_objext} |
0aa3233e ILT |
3875 | cat >> confdefs.h <<\EOF |
3876 | #define C_ALLOCA 1 | |
3877 | EOF | |
3878 | ||
3879 | ||
3880 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
b93f016b | 3881 | echo "configure:3882: checking whether alloca needs Cray hooks" >&5 |
0aa3233e ILT |
3882 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3883 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3884 | else | |
3885 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3886 | #line 3887 "configure" |
0aa3233e ILT |
3887 | #include "confdefs.h" |
3888 | #if defined(CRAY) && ! defined(CRAY2) | |
3889 | webecray | |
3890 | #else | |
3891 | wenotbecray | |
3892 | #endif | |
3893 | ||
3894 | EOF | |
3895 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3896 | egrep "webecray" >/dev/null 2>&1; then | |
3897 | rm -rf conftest* | |
3898 | ac_cv_os_cray=yes | |
3899 | else | |
3900 | rm -rf conftest* | |
3901 | ac_cv_os_cray=no | |
3902 | fi | |
3903 | rm -f conftest* | |
3904 | ||
3905 | fi | |
3906 | ||
3907 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3908 | if test $ac_cv_os_cray = yes; then | |
3909 | for ac_func in _getb67 GETB67 getb67; do | |
3910 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 3911 | echo "configure:3912: checking for $ac_func" >&5 |
0aa3233e ILT |
3912 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3913 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3914 | else | |
3915 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3916 | #line 3917 "configure" |
0aa3233e ILT |
3917 | #include "confdefs.h" |
3918 | /* System header to define __stub macros and hopefully few prototypes, | |
3919 | which can conflict with char $ac_func(); below. */ | |
3920 | #include <assert.h> | |
3921 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3922 | /* We use char because int might match the return type of a gcc2 | |
3923 | builtin and then its argument prototype would still apply. */ | |
3924 | char $ac_func(); | |
3925 | ||
3926 | int main() { | |
3927 | ||
3928 | /* The GNU C library defines this for functions which it implements | |
3929 | to always fail with ENOSYS. Some functions are actually named | |
3930 | something starting with __ and the normal name is an alias. */ | |
3931 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3932 | choke me | |
3933 | #else | |
3934 | $ac_func(); | |
3935 | #endif | |
3936 | ||
3937 | ; return 0; } | |
3938 | EOF | |
b93f016b | 3939 | if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
0aa3233e ILT |
3940 | rm -rf conftest* |
3941 | eval "ac_cv_func_$ac_func=yes" | |
3942 | else | |
3943 | echo "configure: failed program was:" >&5 | |
3944 | cat conftest.$ac_ext >&5 | |
3945 | rm -rf conftest* | |
3946 | eval "ac_cv_func_$ac_func=no" | |
3947 | fi | |
3948 | rm -f conftest* | |
3949 | fi | |
3950 | ||
3951 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3952 | echo "$ac_t""yes" 1>&6 | |
3953 | cat >> confdefs.h <<EOF | |
3954 | #define CRAY_STACKSEG_END $ac_func | |
3955 | EOF | |
3956 | ||
3957 | break | |
3958 | else | |
3959 | echo "$ac_t""no" 1>&6 | |
3960 | fi | |
3961 | ||
3962 | done | |
3963 | fi | |
3964 | ||
3965 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
b93f016b | 3966 | echo "configure:3967: checking stack direction for C alloca" >&5 |
0aa3233e ILT |
3967 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3968 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3969 | else | |
3970 | if test "$cross_compiling" = yes; then | |
3971 | ac_cv_c_stack_direction=0 | |
3972 | else | |
3973 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 3974 | #line 3975 "configure" |
0aa3233e ILT |
3975 | #include "confdefs.h" |
3976 | find_stack_direction () | |
3977 | { | |
3978 | static char *addr = 0; | |
3979 | auto char dummy; | |
3980 | if (addr == 0) | |
3981 | { | |
3982 | addr = &dummy; | |
3983 | return find_stack_direction (); | |
3984 | } | |
3985 | else | |
3986 | return (&dummy > addr) ? 1 : -1; | |
3987 | } | |
3988 | main () | |
3989 | { | |
3990 | exit (find_stack_direction() < 0); | |
3991 | } | |
3992 | EOF | |
b93f016b | 3993 | if { (eval echo configure:3994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
0aa3233e ILT |
3994 | then |
3995 | ac_cv_c_stack_direction=1 | |
3996 | else | |
3997 | echo "configure: failed program was:" >&5 | |
3998 | cat conftest.$ac_ext >&5 | |
3999 | rm -fr conftest* | |
4000 | ac_cv_c_stack_direction=-1 | |
4001 | fi | |
4002 | rm -fr conftest* | |
4003 | fi | |
4004 | ||
4005 | fi | |
4006 | ||
4007 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
4008 | cat >> confdefs.h <<EOF | |
4009 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
4010 | EOF | |
4011 | ||
4012 | fi | |
4013 | ||
72ae15f6 | 4014 | |
87feff9d | 4015 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
b93f016b | 4016 | echo "configure:4017: checking whether malloc must be declared" >&5 |
87feff9d JM |
4017 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4018 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4019 | else | |
4020 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4021 | #line 4022 "configure" |
87feff9d JM |
4022 | #include "confdefs.h" |
4023 | ||
4024 | #include <stdio.h> | |
4025 | #ifdef HAVE_STRING_H | |
4026 | #include <string.h> | |
4027 | #else | |
4028 | #ifdef HAVE_STRINGS_H | |
4029 | #include <strings.h> | |
4030 | #endif | |
4031 | #endif | |
4032 | #ifdef HAVE_STDLIB_H | |
4033 | #include <stdlib.h> | |
4034 | #endif | |
4035 | #ifdef HAVE_UNISTD_H | |
4036 | #include <unistd.h> | |
4037 | #endif | |
4038 | int main() { | |
4039 | char *(*pfn) = (char *(*)) malloc | |
4040 | ; return 0; } | |
4041 | EOF | |
b93f016b | 4042 | if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
4043 | rm -rf conftest* |
4044 | bfd_cv_decl_needed_malloc=no | |
4045 | else | |
4046 | echo "configure: failed program was:" >&5 | |
4047 | cat conftest.$ac_ext >&5 | |
4048 | rm -rf conftest* | |
4049 | bfd_cv_decl_needed_malloc=yes | |
4050 | fi | |
4051 | rm -f conftest* | |
4052 | fi | |
4053 | ||
4054 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4055 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4056 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4057 | cat >> confdefs.h <<EOF | |
4058 | #define $bfd_tr_decl 1 | |
4059 | EOF | |
4060 | ||
4061 | fi | |
4062 | ||
4063 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
b93f016b | 4064 | echo "configure:4065: checking whether realloc must be declared" >&5 |
87feff9d JM |
4065 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4066 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4067 | else | |
4068 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4069 | #line 4070 "configure" |
87feff9d JM |
4070 | #include "confdefs.h" |
4071 | ||
4072 | #include <stdio.h> | |
4073 | #ifdef HAVE_STRING_H | |
4074 | #include <string.h> | |
4075 | #else | |
4076 | #ifdef HAVE_STRINGS_H | |
4077 | #include <strings.h> | |
4078 | #endif | |
4079 | #endif | |
4080 | #ifdef HAVE_STDLIB_H | |
4081 | #include <stdlib.h> | |
4082 | #endif | |
4083 | #ifdef HAVE_UNISTD_H | |
4084 | #include <unistd.h> | |
4085 | #endif | |
4086 | int main() { | |
4087 | char *(*pfn) = (char *(*)) realloc | |
4088 | ; return 0; } | |
4089 | EOF | |
b93f016b | 4090 | if { (eval echo configure:4091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
4091 | rm -rf conftest* |
4092 | bfd_cv_decl_needed_realloc=no | |
4093 | else | |
4094 | echo "configure: failed program was:" >&5 | |
4095 | cat conftest.$ac_ext >&5 | |
4096 | rm -rf conftest* | |
4097 | bfd_cv_decl_needed_realloc=yes | |
4098 | fi | |
4099 | rm -f conftest* | |
4100 | fi | |
4101 | ||
4102 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4103 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4104 | bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4105 | cat >> confdefs.h <<EOF | |
4106 | #define $bfd_tr_decl 1 | |
4107 | EOF | |
4108 | ||
4109 | fi | |
4110 | ||
4111 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
b93f016b | 4112 | echo "configure:4113: checking whether free must be declared" >&5 |
87feff9d JM |
4113 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4114 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4115 | else | |
4116 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4117 | #line 4118 "configure" |
87feff9d JM |
4118 | #include "confdefs.h" |
4119 | ||
4120 | #include <stdio.h> | |
4121 | #ifdef HAVE_STRING_H | |
4122 | #include <string.h> | |
4123 | #else | |
4124 | #ifdef HAVE_STRINGS_H | |
4125 | #include <strings.h> | |
4126 | #endif | |
4127 | #endif | |
4128 | #ifdef HAVE_STDLIB_H | |
4129 | #include <stdlib.h> | |
4130 | #endif | |
4131 | #ifdef HAVE_UNISTD_H | |
4132 | #include <unistd.h> | |
4133 | #endif | |
4134 | int main() { | |
4135 | char *(*pfn) = (char *(*)) free | |
4136 | ; return 0; } | |
4137 | EOF | |
b93f016b | 4138 | if { (eval echo configure:4139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
4139 | rm -rf conftest* |
4140 | bfd_cv_decl_needed_free=no | |
4141 | else | |
4142 | echo "configure: failed program was:" >&5 | |
4143 | cat conftest.$ac_ext >&5 | |
4144 | rm -rf conftest* | |
4145 | bfd_cv_decl_needed_free=yes | |
4146 | fi | |
4147 | rm -f conftest* | |
4148 | fi | |
4149 | ||
4150 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4151 | if test $bfd_cv_decl_needed_free = yes; then | |
4152 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4153 | cat >> confdefs.h <<EOF | |
4154 | #define $bfd_tr_decl 1 | |
4155 | EOF | |
4156 | ||
4157 | fi | |
4158 | ||
4159 | echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 | |
b93f016b | 4160 | echo "configure:4161: checking whether strerror must be declared" >&5 |
87feff9d JM |
4161 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then |
4162 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4163 | else | |
4164 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4165 | #line 4166 "configure" |
87feff9d JM |
4166 | #include "confdefs.h" |
4167 | ||
4168 | #include <stdio.h> | |
4169 | #ifdef HAVE_STRING_H | |
4170 | #include <string.h> | |
4171 | #else | |
4172 | #ifdef HAVE_STRINGS_H | |
4173 | #include <strings.h> | |
4174 | #endif | |
4175 | #endif | |
4176 | #ifdef HAVE_STDLIB_H | |
4177 | #include <stdlib.h> | |
4178 | #endif | |
4179 | #ifdef HAVE_UNISTD_H | |
4180 | #include <unistd.h> | |
4181 | #endif | |
4182 | int main() { | |
4183 | char *(*pfn) = (char *(*)) strerror | |
4184 | ; return 0; } | |
4185 | EOF | |
b93f016b | 4186 | if { (eval echo configure:4187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
4187 | rm -rf conftest* |
4188 | bfd_cv_decl_needed_strerror=no | |
4189 | else | |
4190 | echo "configure: failed program was:" >&5 | |
4191 | cat conftest.$ac_ext >&5 | |
4192 | rm -rf conftest* | |
4193 | bfd_cv_decl_needed_strerror=yes | |
4194 | fi | |
4195 | rm -f conftest* | |
4196 | fi | |
4197 | ||
4198 | echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 | |
4199 | if test $bfd_cv_decl_needed_strerror = yes; then | |
4200 | bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4201 | cat >> confdefs.h <<EOF | |
4202 | #define $bfd_tr_decl 1 | |
4203 | EOF | |
4204 | ||
4205 | fi | |
4206 | ||
4207 | echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 | |
b93f016b | 4208 | echo "configure:4209: checking whether strdup must be declared" >&5 |
87feff9d JM |
4209 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then |
4210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4211 | else | |
4212 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4213 | #line 4214 "configure" |
87feff9d JM |
4214 | #include "confdefs.h" |
4215 | ||
4216 | #include <stdio.h> | |
4217 | #ifdef HAVE_STRING_H | |
4218 | #include <string.h> | |
4219 | #else | |
4220 | #ifdef HAVE_STRINGS_H | |
4221 | #include <strings.h> | |
4222 | #endif | |
4223 | #endif | |
4224 | #ifdef HAVE_STDLIB_H | |
4225 | #include <stdlib.h> | |
4226 | #endif | |
4227 | #ifdef HAVE_UNISTD_H | |
4228 | #include <unistd.h> | |
4229 | #endif | |
4230 | int main() { | |
4231 | char *(*pfn) = (char *(*)) strdup | |
4232 | ; return 0; } | |
4233 | EOF | |
b93f016b | 4234 | if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
87feff9d JM |
4235 | rm -rf conftest* |
4236 | bfd_cv_decl_needed_strdup=no | |
4237 | else | |
4238 | echo "configure: failed program was:" >&5 | |
4239 | cat conftest.$ac_ext >&5 | |
4240 | rm -rf conftest* | |
4241 | bfd_cv_decl_needed_strdup=yes | |
4242 | fi | |
4243 | rm -f conftest* | |
4244 | fi | |
4245 | ||
4246 | echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 | |
4247 | if test $bfd_cv_decl_needed_strdup = yes; then | |
4248 | bfd_tr_decl=NEED_DECLARATION_`echo strdup | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4249 | cat >> confdefs.h <<EOF | |
4250 | #define $bfd_tr_decl 1 | |
4251 | EOF | |
4252 | ||
4253 | fi | |
4254 | ||
4255 | ||
75a55dc3 | 4256 | # If we are configured native on GNU/Linux, work around problems with sys/procfs.h |
0d4c1152 FF |
4257 | if test "${target}" = "${host}"; then |
4258 | case "${host}" in | |
0728afad | 4259 | i[3456]86-*-linux*) |
0d4c1152 | 4260 | cat >> confdefs.h <<\EOF |
0728afad | 4261 | #define START_INFERIOR_TRAPS_EXPECTED 2 |
0d4c1152 FF |
4262 | EOF |
4263 | ||
4264 | cat >> confdefs.h <<\EOF | |
4265 | #define sys_quotactl 1 | |
4266 | EOF | |
4267 | ||
4268 | ;; | |
4269 | esac | |
4270 | fi | |
4271 | ||
4708ac65 | 4272 | echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 |
b93f016b | 4273 | echo "configure:4274: checking for gregset_t type" >&5 |
07b77f5c | 4274 | if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then |
4708ac65 FF |
4275 | echo $ac_n "(cached) $ac_c" 1>&6 |
4276 | else | |
4277 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4278 | #line 4279 "configure" |
4708ac65 FF |
4279 | #include "confdefs.h" |
4280 | #include <sys/procfs.h> | |
bfde4a67 | 4281 | int main() { |
4708ac65 FF |
4282 | gregset_t *gregsetp = 0 |
4283 | ; return 0; } | |
4284 | EOF | |
b93f016b | 4285 | if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4708ac65 | 4286 | rm -rf conftest* |
07b77f5c | 4287 | gdb_cv_have_gregset_t=yes |
4708ac65 | 4288 | else |
bfde4a67 SG |
4289 | echo "configure: failed program was:" >&5 |
4290 | cat conftest.$ac_ext >&5 | |
4708ac65 | 4291 | rm -rf conftest* |
07b77f5c | 4292 | gdb_cv_have_gregset_t=no |
4708ac65 FF |
4293 | fi |
4294 | rm -f conftest* | |
4708ac65 FF |
4295 | fi |
4296 | ||
07b77f5c FF |
4297 | echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6 |
4298 | if test $gdb_cv_have_gregset_t = yes; then | |
4708ac65 FF |
4299 | cat >> confdefs.h <<\EOF |
4300 | #define HAVE_GREGSET_T 1 | |
4301 | EOF | |
4302 | ||
4303 | fi | |
4304 | ||
4305 | echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6 | |
b93f016b | 4306 | echo "configure:4307: checking for fpregset_t type" >&5 |
07b77f5c | 4307 | if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then |
4708ac65 FF |
4308 | echo $ac_n "(cached) $ac_c" 1>&6 |
4309 | else | |
4310 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4311 | #line 4312 "configure" |
4708ac65 FF |
4312 | #include "confdefs.h" |
4313 | #include <sys/procfs.h> | |
bfde4a67 | 4314 | int main() { |
4708ac65 FF |
4315 | fpregset_t *fpregsetp = 0 |
4316 | ; return 0; } | |
4317 | EOF | |
b93f016b | 4318 | if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4708ac65 | 4319 | rm -rf conftest* |
07b77f5c | 4320 | gdb_cv_have_fpregset_t=yes |
4708ac65 | 4321 | else |
bfde4a67 SG |
4322 | echo "configure: failed program was:" >&5 |
4323 | cat conftest.$ac_ext >&5 | |
4708ac65 | 4324 | rm -rf conftest* |
07b77f5c | 4325 | gdb_cv_have_fpregset_t=no |
4708ac65 FF |
4326 | fi |
4327 | rm -f conftest* | |
4708ac65 FF |
4328 | fi |
4329 | ||
07b77f5c FF |
4330 | echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6 |
4331 | if test $gdb_cv_have_fpregset_t = yes; then | |
4708ac65 FF |
4332 | cat >> confdefs.h <<\EOF |
4333 | #define HAVE_FPREGSET_T 1 | |
4334 | EOF | |
4335 | ||
4336 | fi | |
4337 | ||
bfde4a67 | 4338 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
b93f016b | 4339 | echo "configure:4340: checking for main in -lm" >&5 |
bfde4a67 | 4340 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
ef6c51d1 SG |
4341 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
4342 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4343 | else | |
4344 | ac_save_LIBS="$LIBS" | |
4345 | LIBS="-lm $LIBS" | |
4346 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4347 | #line 4348 "configure" |
ef6c51d1 SG |
4348 | #include "confdefs.h" |
4349 | ||
bfde4a67 | 4350 | int main() { |
ef6c51d1 SG |
4351 | main() |
4352 | ; return 0; } | |
4353 | EOF | |
b93f016b | 4354 | if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
ef6c51d1 SG |
4355 | rm -rf conftest* |
4356 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4357 | else | |
bfde4a67 SG |
4358 | echo "configure: failed program was:" >&5 |
4359 | cat conftest.$ac_ext >&5 | |
ef6c51d1 SG |
4360 | rm -rf conftest* |
4361 | eval "ac_cv_lib_$ac_lib_var=no" | |
4362 | fi | |
4363 | rm -f conftest* | |
4364 | LIBS="$ac_save_LIBS" | |
4365 | ||
4366 | fi | |
4367 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4368 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
4369 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
4370 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
ef6c51d1 SG |
4371 | cat >> confdefs.h <<EOF |
4372 | #define $ac_tr_lib 1 | |
4373 | EOF | |
4374 | ||
4375 | LIBS="-lm $LIBS" | |
4376 | ||
4377 | else | |
4378 | echo "$ac_t""no" 1>&6 | |
4379 | fi | |
4380 | ||
4381 | ||
879c0417 | 4382 | echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 |
b93f016b | 4383 | echo "configure:4384: checking for wctype in -lc" >&5 |
879c0417 JM |
4384 | ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` |
4385 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4386 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4387 | else | |
4388 | ac_save_LIBS="$LIBS" | |
4389 | LIBS="-lc $LIBS" | |
4390 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4391 | #line 4392 "configure" |
879c0417 JM |
4392 | #include "confdefs.h" |
4393 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4394 | /* We use char because int might match the return type of a gcc2 | |
4395 | builtin and then its argument prototype would still apply. */ | |
4396 | char wctype(); | |
4397 | ||
4398 | int main() { | |
4399 | wctype() | |
4400 | ; return 0; } | |
4401 | EOF | |
b93f016b | 4402 | if { (eval echo configure:4403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
879c0417 JM |
4403 | rm -rf conftest* |
4404 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4405 | else | |
4406 | echo "configure: failed program was:" >&5 | |
4407 | cat conftest.$ac_ext >&5 | |
4408 | rm -rf conftest* | |
4409 | eval "ac_cv_lib_$ac_lib_var=no" | |
4410 | fi | |
4411 | rm -f conftest* | |
4412 | LIBS="$ac_save_LIBS" | |
4413 | ||
4414 | fi | |
4415 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4416 | echo "$ac_t""yes" 1>&6 | |
4417 | : | |
4418 | else | |
4419 | echo "$ac_t""no" 1>&6 | |
4420 | echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 | |
b93f016b | 4421 | echo "configure:4422: checking for wctype in -lw" >&5 |
879c0417 JM |
4422 | ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` |
4423 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4425 | else | |
4426 | ac_save_LIBS="$LIBS" | |
4427 | LIBS="-lw $LIBS" | |
4428 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4429 | #line 4430 "configure" |
879c0417 JM |
4430 | #include "confdefs.h" |
4431 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4432 | /* We use char because int might match the return type of a gcc2 | |
4433 | builtin and then its argument prototype would still apply. */ | |
4434 | char wctype(); | |
4435 | ||
4436 | int main() { | |
4437 | wctype() | |
4438 | ; return 0; } | |
4439 | EOF | |
b93f016b | 4440 | if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
879c0417 JM |
4441 | rm -rf conftest* |
4442 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4443 | else | |
4444 | echo "configure: failed program was:" >&5 | |
4445 | cat conftest.$ac_ext >&5 | |
4446 | rm -rf conftest* | |
4447 | eval "ac_cv_lib_$ac_lib_var=no" | |
4448 | fi | |
4449 | rm -f conftest* | |
4450 | LIBS="$ac_save_LIBS" | |
4451 | ||
4452 | fi | |
4453 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4454 | echo "$ac_t""yes" 1>&6 | |
4455 | ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ | |
4456 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4457 | cat >> confdefs.h <<EOF | |
4458 | #define $ac_tr_lib 1 | |
4459 | EOF | |
4460 | ||
4461 | LIBS="-lw $LIBS" | |
4462 | ||
4463 | else | |
4464 | echo "$ac_t""no" 1>&6 | |
4465 | fi | |
4466 | ||
4467 | fi | |
4468 | ||
4469 | ||
aa220473 | 4470 | |
3f550b59 | 4471 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
b93f016b | 4472 | echo "configure:4473: checking for long long support in compiler" >&5 |
3f550b59 FF |
4473 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
4474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4475 | else | |
4476 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4477 | #line 4478 "configure" |
3f550b59 FF |
4478 | #include "confdefs.h" |
4479 | ||
bfde4a67 | 4480 | int main() { |
80f600a4 | 4481 | |
d538f9cf FF |
4482 | extern long long foo; |
4483 | switch (foo & 2) { case 0: return 1; } | |
4484 | ||
3f550b59 FF |
4485 | ; return 0; } |
4486 | EOF | |
b93f016b | 4487 | if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f550b59 FF |
4488 | rm -rf conftest* |
4489 | gdb_cv_c_long_long=yes | |
4490 | else | |
bfde4a67 SG |
4491 | echo "configure: failed program was:" >&5 |
4492 | cat conftest.$ac_ext >&5 | |
3f550b59 FF |
4493 | rm -rf conftest* |
4494 | gdb_cv_c_long_long=no | |
4495 | fi | |
4496 | rm -f conftest* | |
3f550b59 FF |
4497 | fi |
4498 | ||
4499 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
4500 | if test $gdb_cv_c_long_long = yes; then | |
4501 | cat >> confdefs.h <<\EOF | |
4502 | #define CC_HAS_LONG_LONG 1 | |
4503 | EOF | |
4504 | ||
4505 | fi | |
4506 | ||
4507 | ||
4508 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
b93f016b | 4509 | echo "configure:4510: checking for long long support in printf" >&5 |
3f550b59 FF |
4510 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
4511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4512 | else | |
4513 | if test "$cross_compiling" = yes; then | |
4514 | gdb_cv_printf_has_long_long=no | |
4515 | else | |
bfde4a67 | 4516 | cat > conftest.$ac_ext <<EOF |
b93f016b | 4517 | #line 4518 "configure" |
3f550b59 FF |
4518 | #include "confdefs.h" |
4519 | ||
4520 | int main () { | |
f7b8c9ce AC |
4521 | char buf[32]; |
4522 | long long l = 0; | |
4523 | l = (l << 16) + 0x0123; | |
4524 | l = (l << 16) + 0x4567; | |
4525 | l = (l << 16) + 0x89ab; | |
4526 | l = (l << 16) + 0xcdef; | |
4527 | sprintf (buf, "0x%016llx", l); | |
4528 | return (strcmp ("0x0123456789abcdef", buf)); | |
3f550b59 FF |
4529 | } |
4530 | EOF | |
b93f016b | 4531 | if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 4532 | then |
3f550b59 FF |
4533 | gdb_cv_printf_has_long_long=yes |
4534 | else | |
bfde4a67 SG |
4535 | echo "configure: failed program was:" >&5 |
4536 | cat conftest.$ac_ext >&5 | |
4537 | rm -fr conftest* | |
3f550b59 FF |
4538 | gdb_cv_printf_has_long_long=no |
4539 | fi | |
ef6c51d1 | 4540 | rm -fr conftest* |
8b701284 ILT |
4541 | fi |
4542 | ||
bfde4a67 SG |
4543 | fi |
4544 | ||
3f550b59 FF |
4545 | if test $gdb_cv_printf_has_long_long = yes; then |
4546 | cat >> confdefs.h <<\EOF | |
4547 | #define PRINTF_HAS_LONG_LONG 1 | |
4548 | EOF | |
4549 | ||
4550 | fi | |
4551 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
4552 | ||
4553 | ||
07b77f5c | 4554 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 |
b93f016b | 4555 | echo "configure:4556: checking for long double support in compiler" >&5 |
aa220473 SG |
4556 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
4557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4558 | else | |
4559 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4560 | #line 4561 "configure" |
aa220473 SG |
4561 | #include "confdefs.h" |
4562 | ||
bfde4a67 | 4563 | int main() { |
aa220473 SG |
4564 | long double foo; |
4565 | ; return 0; } | |
4566 | EOF | |
b93f016b | 4567 | if { (eval echo configure:4568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
aa220473 SG |
4568 | rm -rf conftest* |
4569 | ac_cv_c_long_double=yes | |
4570 | else | |
bfde4a67 SG |
4571 | echo "configure: failed program was:" >&5 |
4572 | cat conftest.$ac_ext >&5 | |
aa220473 SG |
4573 | rm -rf conftest* |
4574 | ac_cv_c_long_double=no | |
4575 | fi | |
4576 | rm -f conftest* | |
aa220473 SG |
4577 | fi |
4578 | ||
4579 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
4580 | if test $ac_cv_c_long_double = yes; then | |
4581 | cat >> confdefs.h <<\EOF | |
4582 | #define HAVE_LONG_DOUBLE 1 | |
4583 | EOF | |
4584 | ||
4585 | fi | |
4586 | ||
07b77f5c FF |
4587 | |
4588 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
b93f016b | 4589 | echo "configure:4590: checking for long double support in printf" >&5 |
07b77f5c FF |
4590 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
4591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4592 | else | |
4593 | if test "$cross_compiling" = yes; then | |
4594 | gdb_cv_printf_has_long_double=no | |
4595 | else | |
bfde4a67 | 4596 | cat > conftest.$ac_ext <<EOF |
b93f016b | 4597 | #line 4598 "configure" |
07b77f5c FF |
4598 | #include "confdefs.h" |
4599 | ||
4600 | int main () { | |
4601 | char buf[16]; | |
4602 | long double f = 3.141592653; | |
4603 | sprintf (buf, "%Lg", f); | |
4604 | return (strncmp ("3.14159", buf, 7)); | |
4605 | } | |
4606 | EOF | |
b93f016b | 4607 | if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 | 4608 | then |
07b77f5c FF |
4609 | gdb_cv_printf_has_long_double=yes |
4610 | else | |
bfde4a67 SG |
4611 | echo "configure: failed program was:" >&5 |
4612 | cat conftest.$ac_ext >&5 | |
4613 | rm -fr conftest* | |
07b77f5c FF |
4614 | gdb_cv_printf_has_long_double=no |
4615 | fi | |
ef6c51d1 | 4616 | rm -fr conftest* |
8b701284 ILT |
4617 | fi |
4618 | ||
bfde4a67 SG |
4619 | fi |
4620 | ||
07b77f5c FF |
4621 | if test $gdb_cv_printf_has_long_double = yes; then |
4622 | cat >> confdefs.h <<\EOF | |
4623 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
4624 | EOF | |
4625 | ||
4626 | fi | |
4627 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
4628 | ||
f7b8c9ce AC |
4629 | |
4630 | echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 | |
b93f016b | 4631 | echo "configure:4632: checking for long double support in scanf" >&5 |
f7b8c9ce AC |
4632 | if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then |
4633 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4634 | else | |
4635 | if test "$cross_compiling" = yes; then | |
4636 | gdb_cv_scanf_has_long_double=no | |
4637 | else | |
4638 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4639 | #line 4640 "configure" |
f7b8c9ce AC |
4640 | #include "confdefs.h" |
4641 | ||
4642 | int main () { | |
4643 | char *buf = "3.141592653"; | |
4644 | long double f = 0; | |
4645 | sscanf (buf, "%Lg", &f); | |
4646 | return !(f > 3.14159 && f < 3.14160); | |
4647 | } | |
4648 | EOF | |
b93f016b | 4649 | if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
f7b8c9ce AC |
4650 | then |
4651 | gdb_cv_scanf_has_long_double=yes | |
4652 | else | |
4653 | echo "configure: failed program was:" >&5 | |
4654 | cat conftest.$ac_ext >&5 | |
4655 | rm -fr conftest* | |
4656 | gdb_cv_scanf_has_long_double=no | |
4657 | fi | |
4658 | rm -fr conftest* | |
4659 | fi | |
4660 | ||
4661 | fi | |
4662 | ||
4663 | if test $gdb_cv_scanf_has_long_double = yes; then | |
4664 | cat >> confdefs.h <<\EOF | |
4665 | #define SCANF_HAS_LONG_DOUBLE 1 | |
4666 | EOF | |
4667 | ||
4668 | fi | |
4669 | echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 | |
4670 | ||
bfde4a67 SG |
4671 | for ac_hdr in unistd.h |
4672 | do | |
4673 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4674 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
b93f016b | 4675 | echo "configure:4676: checking for $ac_hdr" >&5 |
bfde4a67 SG |
4676 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4678 | else | |
4679 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4680 | #line 4681 "configure" |
bfde4a67 SG |
4681 | #include "confdefs.h" |
4682 | #include <$ac_hdr> | |
4683 | EOF | |
4684 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 4685 | { (eval echo configure:4686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 4686 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
bfde4a67 SG |
4687 | if test -z "$ac_err"; then |
4688 | rm -rf conftest* | |
4689 | eval "ac_cv_header_$ac_safe=yes" | |
4690 | else | |
4691 | echo "$ac_err" >&5 | |
4692 | echo "configure: failed program was:" >&5 | |
4693 | cat conftest.$ac_ext >&5 | |
4694 | rm -rf conftest* | |
4695 | eval "ac_cv_header_$ac_safe=no" | |
4696 | fi | |
4697 | rm -f conftest* | |
4698 | fi | |
4699 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4700 | echo "$ac_t""yes" 1>&6 | |
4701 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4702 | cat >> confdefs.h <<EOF | |
4703 | #define $ac_tr_hdr 1 | |
4704 | EOF | |
4705 | ||
4706 | else | |
4707 | echo "$ac_t""no" 1>&6 | |
4708 | fi | |
4709 | done | |
4710 | ||
4711 | for ac_func in getpagesize | |
1a7b4b7c DE |
4712 | do |
4713 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b93f016b | 4714 | echo "configure:4715: checking for $ac_func" >&5 |
1a7b4b7c DE |
4715 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4716 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4717 | else | |
4718 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4719 | #line 4720 "configure" |
1a7b4b7c DE |
4720 | #include "confdefs.h" |
4721 | /* System header to define __stub macros and hopefully few prototypes, | |
4722 | which can conflict with char $ac_func(); below. */ | |
4723 | #include <assert.h> | |
4724 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
4725 | /* We use char because int might match the return type of a gcc2 |
4726 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c DE |
4727 | char $ac_func(); |
4728 | ||
bfde4a67 | 4729 | int main() { |
1a7b4b7c DE |
4730 | |
4731 | /* The GNU C library defines this for functions which it implements | |
4732 | to always fail with ENOSYS. Some functions are actually named | |
4733 | something starting with __ and the normal name is an alias. */ | |
4734 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4735 | choke me | |
4736 | #else | |
4737 | $ac_func(); | |
4738 | #endif | |
4739 | ||
4740 | ; return 0; } | |
4741 | EOF | |
b93f016b | 4742 | if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1a7b4b7c DE |
4743 | rm -rf conftest* |
4744 | eval "ac_cv_func_$ac_func=yes" | |
4745 | else | |
bfde4a67 SG |
4746 | echo "configure: failed program was:" >&5 |
4747 | cat conftest.$ac_ext >&5 | |
1a7b4b7c DE |
4748 | rm -rf conftest* |
4749 | eval "ac_cv_func_$ac_func=no" | |
4750 | fi | |
4751 | rm -f conftest* | |
ef6c51d1 | 4752 | fi |
bfde4a67 | 4753 | |
1a7b4b7c DE |
4754 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4755 | echo "$ac_t""yes" 1>&6 | |
4756 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4757 | cat >> confdefs.h <<EOF | |
4758 | #define $ac_tr_func 1 | |
4759 | EOF | |
4760 | ||
4761 | else | |
4762 | echo "$ac_t""no" 1>&6 | |
4763 | fi | |
4764 | done | |
4765 | ||
2b576293 | 4766 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
b93f016b | 4767 | echo "configure:4768: checking for working mmap" >&5 |
bfde4a67 | 4768 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2b576293 C |
4769 | echo $ac_n "(cached) $ac_c" 1>&6 |
4770 | else | |
4771 | if test "$cross_compiling" = yes; then | |
bfde4a67 | 4772 | ac_cv_func_mmap_fixed_mapped=no |
2b576293 | 4773 | else |
bfde4a67 | 4774 | cat > conftest.$ac_ext <<EOF |
b93f016b | 4775 | #line 4776 "configure" |
2b576293 C |
4776 | #include "confdefs.h" |
4777 | ||
bfde4a67 SG |
4778 | /* Thanks to Mike Haertel and Jim Avera for this test. |
4779 | Here is a matrix of mmap possibilities: | |
4780 | mmap private not fixed | |
4781 | mmap private fixed at somewhere currently unmapped | |
4782 | mmap private fixed at somewhere already mapped | |
4783 | mmap shared not fixed | |
4784 | mmap shared fixed at somewhere currently unmapped | |
4785 | mmap shared fixed at somewhere already mapped | |
4786 | For private mappings, we should verify that changes cannot be read() | |
4787 | back from the file, nor mmap's back from the file at a different | |
4788 | address. (There have been systems where private was not correctly | |
4789 | implemented like the infamous i386 svr4.0, and systems where the | |
4790 | VM page cache was not coherent with the filesystem buffer cache | |
4791 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
4792 | For shared mappings, we should conversely verify that changes get | |
4793 | propogated back to all the places they're supposed to be. | |
4794 | ||
4795 | Grep wants private fixed already mapped. | |
4796 | The main things grep needs to know about mmap are: | |
4797 | * does it exist and is it safe to write into the mmap'd area | |
4798 | * how to use it (BSD variants) */ | |
2b576293 C |
4799 | #include <sys/types.h> |
4800 | #include <fcntl.h> | |
4801 | #include <sys/mman.h> | |
4802 | ||
bfde4a67 | 4803 | /* This mess was copied from the GNU getpagesize.h. */ |
2b576293 | 4804 | #ifndef HAVE_GETPAGESIZE |
bfde4a67 SG |
4805 | # ifdef HAVE_UNISTD_H |
4806 | # include <unistd.h> | |
8b701284 ILT |
4807 | # endif |
4808 | ||
bfde4a67 SG |
4809 | /* Assume that all systems that can run configure have sys/param.h. */ |
4810 | # ifndef HAVE_SYS_PARAM_H | |
4811 | # define HAVE_SYS_PARAM_H 1 | |
4812 | # endif | |
4813 | ||
4814 | # ifdef _SC_PAGESIZE | |
4815 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
4816 | # else /* no _SC_PAGESIZE */ | |
4817 | # ifdef HAVE_SYS_PARAM_H | |
4818 | # include <sys/param.h> | |
4819 | # ifdef EXEC_PAGESIZE | |
4820 | # define getpagesize() EXEC_PAGESIZE | |
4821 | # else /* no EXEC_PAGESIZE */ | |
4822 | # ifdef NBPG | |
4823 | # define getpagesize() NBPG * CLSIZE | |
4824 | # ifndef CLSIZE | |
4825 | # define CLSIZE 1 | |
4826 | # endif /* no CLSIZE */ | |
4827 | # else /* no NBPG */ | |
4828 | # ifdef NBPC | |
4829 | # define getpagesize() NBPC | |
4830 | # else /* no NBPC */ | |
4831 | # ifdef PAGESIZE | |
4832 | # define getpagesize() PAGESIZE | |
4833 | # endif /* PAGESIZE */ | |
4834 | # endif /* no NBPC */ | |
4835 | # endif /* no NBPG */ | |
4836 | # endif /* no EXEC_PAGESIZE */ | |
4837 | # else /* no HAVE_SYS_PARAM_H */ | |
4838 | # define getpagesize() 8192 /* punt totally */ | |
4839 | # endif /* no HAVE_SYS_PARAM_H */ | |
4840 | # endif /* no _SC_PAGESIZE */ | |
4841 | ||
4842 | #endif /* no HAVE_GETPAGESIZE */ | |
2b576293 C |
4843 | |
4844 | #ifdef __cplusplus | |
bfde4a67 | 4845 | extern "C" { void *malloc(unsigned); } |
2b576293 | 4846 | #else |
bfde4a67 | 4847 | char *malloc(); |
2b576293 C |
4848 | #endif |
4849 | ||
4850 | int | |
4851 | main() | |
4852 | { | |
bfde4a67 SG |
4853 | char *data, *data2, *data3; |
4854 | int i, pagesize; | |
4855 | int fd; | |
4856 | ||
4857 | pagesize = getpagesize(); | |
4858 | ||
4859 | /* | |
4860 | * First, make a file with some known garbage in it. | |
4861 | */ | |
4862 | data = malloc(pagesize); | |
4863 | if (!data) | |
4864 | exit(1); | |
4865 | for (i = 0; i < pagesize; ++i) | |
4866 | *(data + i) = rand(); | |
4867 | umask(0); | |
4868 | fd = creat("conftestmmap", 0600); | |
4869 | if (fd < 0) | |
4870 | exit(1); | |
4871 | if (write(fd, data, pagesize) != pagesize) | |
4872 | exit(1); | |
4873 | close(fd); | |
4874 | ||
4875 | /* | |
4876 | * Next, try to mmap the file at a fixed address which | |
4877 | * already has something else allocated at it. If we can, | |
4878 | * also make sure that we see the same garbage. | |
4879 | */ | |
4880 | fd = open("conftestmmap", O_RDWR); | |
4881 | if (fd < 0) | |
4882 | exit(1); | |
4883 | data2 = malloc(2 * pagesize); | |
4884 | if (!data2) | |
4885 | exit(1); | |
4886 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
4887 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
4888 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
4889 | exit(1); | |
4890 | for (i = 0; i < pagesize; ++i) | |
4891 | if (*(data + i) != *(data2 + i)) | |
4892 | exit(1); | |
4893 | ||
4894 | /* | |
4895 | * Finally, make sure that changes to the mapped area | |
4896 | * do not percolate back to the file as seen by read(). | |
4897 | * (This is a bug on some variants of i386 svr4.0.) | |
4898 | */ | |
4899 | for (i = 0; i < pagesize; ++i) | |
4900 | *(data2 + i) = *(data2 + i) + 1; | |
4901 | data3 = malloc(pagesize); | |
4902 | if (!data3) | |
4903 | exit(1); | |
4904 | if (read(fd, data3, pagesize) != pagesize) | |
4905 | exit(1); | |
4906 | for (i = 0; i < pagesize; ++i) | |
4907 | if (*(data + i) != *(data3 + i)) | |
4908 | exit(1); | |
4909 | close(fd); | |
4910 | unlink("conftestmmap"); | |
4911 | exit(0); | |
2b576293 C |
4912 | } |
4913 | ||
4914 | EOF | |
b93f016b | 4915 | if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
bfde4a67 SG |
4916 | then |
4917 | ac_cv_func_mmap_fixed_mapped=yes | |
2b576293 | 4918 | else |
bfde4a67 SG |
4919 | echo "configure: failed program was:" >&5 |
4920 | cat conftest.$ac_ext >&5 | |
4921 | rm -fr conftest* | |
4922 | ac_cv_func_mmap_fixed_mapped=no | |
2b576293 | 4923 | fi |
ef6c51d1 | 4924 | rm -fr conftest* |
8b701284 ILT |
4925 | fi |
4926 | ||
bfde4a67 SG |
4927 | fi |
4928 | ||
4929 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
4930 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2b576293 C |
4931 | cat >> confdefs.h <<\EOF |
4932 | #define HAVE_MMAP 1 | |
4933 | EOF | |
4934 | ||
4935 | fi | |
4936 | ||
5436fc65 | 4937 | |
47ef0da5 | 4938 | |
89e673a4 SG |
4939 | |
4940 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
4b95e9a1 JM |
4941 | case ${host_os} in |
4942 | hpux*) | |
4943 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
b93f016b | 4944 | echo "configure:4945: checking for HPUX/OSF thread support" >&5 |
4b95e9a1 JM |
4945 | if test -f /usr/include/dce/cma_config.h ; then |
4946 | if test "$GCC" = "yes" ; then | |
4947 | echo "$ac_t""yes" 1>&6 | |
4948 | cat >> confdefs.h <<\EOF | |
5d394f70 SG |
4949 | #define HAVE_HPUX_THREAD_SUPPORT 1 |
4950 | EOF | |
4951 | ||
4b95e9a1 | 4952 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" |
c7bb1531 | 4953 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
4b95e9a1 JM |
4954 | else |
4955 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
4956 | fi | |
4957 | else | |
4958 | echo "$ac_t""no" 1>&6 | |
4959 | fi | |
4960 | ;; | |
4961 | solaris*) | |
4962 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
b93f016b | 4963 | echo "configure:4964: checking for Solaris thread debugging library" >&5 |
4b95e9a1 JM |
4964 | if test -f /usr/lib/libthread_db.so.1 ; then |
4965 | echo "$ac_t""yes" 1>&6 | |
4966 | cat >> confdefs.h <<\EOF | |
6c310da8 SG |
4967 | #define HAVE_THREAD_DB_LIB 1 |
4968 | EOF | |
4969 | ||
4b95e9a1 | 4970 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c7bb1531 | 4971 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
4b95e9a1 | 4972 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
b93f016b | 4973 | echo "configure:4974: checking for dlopen in -ldl" >&5 |
bfde4a67 | 4974 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
95b47547 SG |
4975 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
4976 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977 | else | |
4978 | ac_save_LIBS="$LIBS" | |
4979 | LIBS="-ldl $LIBS" | |
4980 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 4981 | #line 4982 "configure" |
95b47547 SG |
4982 | #include "confdefs.h" |
4983 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4984 | /* We use char because int might match the return type of a gcc2 | |
4985 | builtin and then its argument prototype would still apply. */ | |
4986 | char dlopen(); | |
4987 | ||
bfde4a67 | 4988 | int main() { |
95b47547 SG |
4989 | dlopen() |
4990 | ; return 0; } | |
4991 | EOF | |
b93f016b | 4992 | if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
95b47547 SG |
4993 | rm -rf conftest* |
4994 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4995 | else | |
bfde4a67 SG |
4996 | echo "configure: failed program was:" >&5 |
4997 | cat conftest.$ac_ext >&5 | |
95b47547 SG |
4998 | rm -rf conftest* |
4999 | eval "ac_cv_lib_$ac_lib_var=no" | |
5000 | fi | |
5001 | rm -f conftest* | |
5002 | LIBS="$ac_save_LIBS" | |
5003 | ||
5004 | fi | |
5005 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5006 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
5007 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
5008 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
95b47547 SG |
5009 | cat >> confdefs.h <<EOF |
5010 | #define $ac_tr_lib 1 | |
5011 | EOF | |
5012 | ||
5013 | LIBS="-ldl $LIBS" | |
5014 | ||
5015 | else | |
5016 | echo "$ac_t""no" 1>&6 | |
5017 | fi | |
5018 | ||
4b95e9a1 JM |
5019 | if test "$GCC" = "yes" ; then |
5020 | # The GNU linker requires the -export-dynamic option to make | |
5021 | # all symbols visible in the dynamic symbol table. | |
5022 | hold_ldflags=$LDFLAGS | |
5023 | echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 | |
b93f016b | 5024 | echo "configure:5025: checking for the ld -export-dynamic flag" >&5 |
4b95e9a1 JM |
5025 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
5026 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 5027 | #line 5028 "configure" |
4b95e9a1 JM |
5028 | #include "confdefs.h" |
5029 | ||
5030 | int main() { | |
5031 | int i; | |
5032 | ; return 0; } | |
5033 | EOF | |
b93f016b | 5034 | if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
4b95e9a1 JM |
5035 | rm -rf conftest* |
5036 | found=yes | |
5037 | else | |
5038 | echo "configure: failed program was:" >&5 | |
5039 | cat conftest.$ac_ext >&5 | |
5040 | rm -rf conftest* | |
5041 | found=no | |
5042 | fi | |
5043 | rm -f conftest* | |
5044 | LDFLAGS=$hold_ldflags | |
5045 | echo "$ac_t""$found" 1>&6 | |
5046 | if test $found = yes; then | |
5047 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
5048 | fi | |
5049 | fi | |
37f58dce FL |
5050 | # Sun randomly tweaked the prototypes in <proc_service.h> |
5051 | # at one point. | |
5052 | echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6 | |
b93f016b | 5053 | echo "configure:5054: checking if <proc_service.h> is old" >&5 |
37f58dce FL |
5054 | if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then |
5055 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5056 | else | |
5057 | ||
5058 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 5059 | #line 5060 "configure" |
37f58dce FL |
5060 | #include "confdefs.h" |
5061 | ||
5062 | #include <proc_service.h> | |
5063 | ps_err_e ps_pdwrite | |
5064 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
5065 | ||
5066 | int main() { | |
5067 | ||
5068 | ; return 0; } | |
5069 | EOF | |
b93f016b | 5070 | if { (eval echo configure:5071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
37f58dce FL |
5071 | rm -rf conftest* |
5072 | gdb_cv_proc_service_is_old=no | |
5073 | else | |
5074 | echo "configure: failed program was:" >&5 | |
5075 | cat conftest.$ac_ext >&5 | |
5076 | rm -rf conftest* | |
5077 | gdb_cv_proc_service_is_old=yes | |
5078 | fi | |
5079 | rm -f conftest* | |
5080 | ||
5081 | fi | |
5082 | ||
5083 | echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 | |
5084 | if test $gdb_cv_proc_service_is_old = yes; then | |
5085 | cat >> confdefs.h <<\EOF | |
5086 | #define PROC_SERVICE_IS_OLD 1 | |
5087 | EOF | |
5088 | ||
5089 | fi | |
4b95e9a1 JM |
5090 | else |
5091 | echo "$ac_t""no" 1>&6 | |
5092 | fi | |
5093 | ;; | |
5094 | esac | |
5095 | ||
89e673a4 | 5096 | fi |
47ef0da5 | 5097 | |
5436fc65 | 5098 | ENABLE_CFLAGS= |
5436fc65 C |
5099 | |
5100 | # Check whether --enable-netrom or --disable-netrom was given. | |
1a7b4b7c DE |
5101 | if test "${enable_netrom+set}" = set; then |
5102 | enableval="$enable_netrom" | |
5436fc65 C |
5103 | case "${enableval}" in |
5104 | yes) enable_netrom=yes ;; | |
5105 | no) enable_netrom=no ;; | |
5106 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
5107 | esac | |
5108 | fi | |
5109 | ||
5110 | ||
5111 | if test "${enable_netrom}" = "yes"; then | |
6c310da8 | 5112 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" |
c7bb1531 | 5113 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" |
5436fc65 C |
5114 | fi |
5115 | ||
b9a9cde4 AC |
5116 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
5117 | if test "${enable_build_warnings+set}" = set; then | |
5118 | enableval="$enable_build_warnings" | |
5119 | build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" | |
5120 | case "${enableval}" in | |
5121 | yes) ;; | |
5122 | no) build_warnings="-w";; | |
5123 | *) ;; | |
ba68ad57 | 5124 | esac |
b9a9cde4 AC |
5125 | else |
5126 | build_warnings="" | |
ba68ad57 JM |
5127 | fi |
5128 | ||
b9a9cde4 | 5129 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
ba68ad57 | 5130 | then |
b9a9cde4 | 5131 | WARN_CFLAGS="${build_warnings}" |
ba68ad57 JM |
5132 | else |
5133 | WARN_CFLAGS="" | |
5134 | fi | |
5135 | ||
5136 | ||
0728afad FF |
5137 | MMALLOC_CFLAGS= |
5138 | MMALLOC= | |
5139 | ||
5140 | ||
5141 | ||
5142 | # Check whether --with-mmalloc or --without-mmalloc was given. | |
5143 | if test "${with_mmalloc+set}" = set; then | |
5144 | withval="$with_mmalloc" | |
5145 | case "${withval}" in | |
5146 | yes) want_mmalloc=true ;; | |
5147 | no) want_mmalloc=false;; | |
5148 | *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; | |
5149 | esac | |
5150 | else | |
5151 | want_mmalloc=false | |
5152 | fi | |
5153 | ||
5154 | if test x$want_mmalloc = xtrue; then | |
5155 | cat >> confdefs.h <<\EOF | |
5156 | #define USE_MMALLOC 1 | |
5157 | EOF | |
5158 | ||
5159 | cat >> confdefs.h <<\EOF | |
dd600735 | 5160 | #define MMCHECK_FORCE 1 |
0728afad FF |
5161 | EOF |
5162 | ||
5163 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
5164 | MMALLOC='../mmalloc/libmmalloc.a' | |
5165 | fi | |
5166 | ||
287026b7 AC |
5167 | # start-sanitize-carp |
5168 | # The below takes an educated guess at the targets that | |
5169 | # should be built. It is an interum version that provides | |
5170 | # significant backward compatibility. | |
5171 | ||
5172 | # Check whether --enable-carp or --disable-carp was given. | |
5173 | if test "${enable_carp+set}" = set; then | |
5174 | enableval="$enable_carp" | |
5175 | case "${enableval}" in | |
5176 | yes) enable_carp=yes ;; | |
5177 | no) enable_carp=no ;; | |
5178 | *) { echo "configure: error: bad value ${enableval} for carp option" 1>&2; exit 1; } ;; | |
5179 | esac | |
5180 | else | |
5181 | enable_carp=no | |
5182 | fi | |
5183 | ||
5184 | # Check whether --enable-targets or --disable-targets was given. | |
5185 | if test "${enable_targets+set}" = set; then | |
5186 | enableval="$enable_targets" | |
5187 | case "${enableval}" in | |
5188 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
5189 | ;; | |
5190 | no) enable_targets= ;; | |
5191 | *) enable_targets="$enableval" ;; | |
5192 | esac | |
5193 | fi | |
5194 | ||
5195 | # Canonicalize the secondary target names. | |
5196 | all_targets=false | |
5197 | if test -n "$enable_targets" ; then | |
5198 | if test "$enable_targets" = all ; then | |
5199 | all_targets=true | |
5200 | else | |
5201 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
5202 | do | |
5203 | result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null` | |
5204 | if test -n "$result" ; then | |
5205 | canon_targets="$canon_targets $result" | |
5206 | fi | |
5207 | done | |
5208 | fi | |
5209 | fi | |
5210 | ||
5211 | # Convert the target names into GDB [*]-tdep.c names | |
5212 | selarchs= | |
5213 | for targ in $target $canon_targets | |
5214 | do | |
5215 | if test "x$targ" = "xall" ; then | |
5216 | all_targets=true | |
5217 | else | |
b0f33a03 | 5218 | t_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
287026b7 | 5219 | t_vendor=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` |
b0f33a03 | 5220 | t_os=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` |
287026b7 AC |
5221 | mt=` |
5222 | target=$targ | |
5223 | target_cpu=$t_cpu | |
5224 | target_vendor=$t_vendor | |
5225 | target_os=$t_os | |
5226 | . ${srcdir}/configure.tgt | |
5227 | echo ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt` | |
5228 | if test -r ${mt} ; then | |
5229 | # This gets confused over .mt files that have multiple -tdep.o | |
5230 | tdep=`sed -n ' | |
5231 | s/^.*[ =]\([^ ]*\)-tdep.o.*/\1/p | |
5232 | ' $mt` | |
5233 | selarchs="$selarchs $tdep" | |
5234 | fi | |
5235 | fi | |
5236 | done | |
5237 | ||
5238 | # We don't do any links based on the target system, just makefile config. | |
5239 | ||
5240 | if test x${all_targets} = xfalse ; then | |
5241 | ||
5242 | # Target architecture .o files. | |
5243 | ta= | |
5244 | ||
5245 | for arch in $selarchs | |
5246 | do | |
5247 | archdefs="$archdefs -DARCH_$arch" | |
5248 | ta="$ta ${arch}-tdep.o" | |
5249 | # Special cases | |
5250 | case "$arch" in | |
b0f33a03 | 5251 | dvp) ta="$ta mips-tdep.o dvp-tdep.o" ;; |
287026b7 AC |
5252 | esac |
5253 | done | |
5254 | ||
5255 | # Weed out duplicate .o files. | |
5256 | f="" | |
5257 | for i in $ta ; do | |
5258 | case " $f " in | |
b0f33a03 JM |
5259 | *" $i "*) ;; |
5260 | *) f="$f $i" ;; | |
287026b7 AC |
5261 | esac |
5262 | done | |
5263 | ta="$f" | |
5264 | ||
5265 | # And duplicate -D flags. | |
5266 | f="" | |
5267 | for i in $archdefs ; do | |
5268 | case " $f " in | |
b0f33a03 JM |
5269 | *" $i "*) ;; |
5270 | *) f="$f $i" ;; | |
287026b7 AC |
5271 | esac |
5272 | done | |
5273 | archdefs="$f" | |
5274 | ||
5275 | MACHINE_OBS="$ta" | |
5276 | ||
5277 | else # all_targets is true | |
5278 | archdefs=-DARCH_all | |
5279 | MACHINE_OBS='$(ALL_MACHINES)' | |
5280 | fi | |
5281 | ||
5282 | if test "${enable_carp}" = yes ; then | |
5283 | gdb_target=carp | |
5284 | gdb_target_cpu=carp | |
5285 | else | |
5286 | MACHINE_OBS="# $MACHINE_OBS" | |
5287 | fi | |
5288 | ||
5289 | ||
5290 | # end-sanitize-carp | |
5436fc65 | 5291 | # start-sanitize-gdbtk |
fa41e1a3 | 5292 | # start-sanitize-ide |
2476848a MH |
5293 | ENABLE_IDE= |
5294 | # Check whether --enable-ide or --disable-ide was given. | |
5295 | if test "${enable_ide+set}" = set; then | |
5296 | enableval="$enable_ide" | |
5297 | : | |
5298 | fi | |
5299 | ||
5300 | if test "$enable_ide" = yes; then | |
5301 | enable_ide=yes | |
5302 | ENABLE_IDE=1 | |
5303 | else | |
5304 | enable_ide=no | |
5305 | fi | |
5306 | ||
5307 | ||
c076f1ed DM |
5308 | # Check whether --with-foundry-libs or --without-foundry-libs was given. |
5309 | if test "${with_foundry_libs+set}" = set; then | |
5310 | withval="$with_foundry_libs" | |
5311 | FOUNDRY_LIB_BASE=${withval} | |
5312 | fi | |
5313 | ||
5314 | ||
5315 | ||
5316 | # | |
5317 | # This is the Foundry SDK | |
5318 | # | |
5319 | # These variables are used to determine where the Foundry libs and | |
5320 | # header files are located. | |
5321 | # | |
5322 | if test "$FOUNDRY_LIB_BASE" != ""; then | |
5323 | LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a" | |
5324 | GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include" | |
5325 | if test x$enable_ide = xyes; then | |
5326 | IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE" | |
5327 | IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu" | |
5328 | else | |
5329 | IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include" | |
5330 | fi | |
5331 | LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a" | |
5332 | LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a" | |
5333 | IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a" | |
5334 | else | |
5335 | LIBGUI="../libgui/src/libgui.a" | |
5336 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
5337 | if test x$enable_ide = xyes; then | |
5338 | IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop" | |
5339 | IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu" | |
5340 | else | |
5341 | IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src" | |
5342 | fi | |
5343 | LIBIDETCL="../libidetcl/src/libidetcl.a" | |
5344 | LIBIDE="../libide/src/libide.a" | |
5345 | IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a" | |
5346 | fi | |
5347 | ||
5348 | ||
5349 | ||
5350 | ||
5351 | ||
5352 | ||
5353 | ||
fa41e1a3 | 5354 | # end-sanitize-ide |
c076f1ed | 5355 | |
5436fc65 C |
5356 | ENABLE_GDBTK= |
5357 | ||
5358 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
1a7b4b7c DE |
5359 | if test "${enable_gdbtk+set}" = set; then |
5360 | enableval="$enable_gdbtk" | |
5436fc65 | 5361 | case "${enableval}" in |
0fe1522a SG |
5362 | yes) |
5363 | case "$host" in | |
5364 | *go32*) | |
5365 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
5366 | enable_gdbtk=no ;; | |
8a19b35a | 5367 | *windows*) |
b613bfbf GN |
5368 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 |
5369 | enable_gdbtk=no ;; | |
0fe1522a SG |
5370 | *) |
5371 | enable_gdbtk=yes ;; | |
5372 | esac ;; | |
5373 | no) | |
5374 | enable_gdbtk=no ;; | |
5375 | *) | |
5376 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
5436fc65 | 5377 | esac |
0fe1522a SG |
5378 | else |
5379 | ||
b93f016b | 5380 | # Default is on for everything but go32 and Cygwin |
0fe1522a | 5381 | case "$host" in |
8a19b35a | 5382 | *go32* | *windows*) |
b613bfbf | 5383 | ;; |
0fe1522a SG |
5384 | *) |
5385 | enable_gdbtk=yes ;; | |
5386 | esac | |
5387 | ||
5436fc65 C |
5388 | fi |
5389 | ||
5390 | ||
b93f016b | 5391 | # In the Cygwin environment, we need some additional flags. |
9b119644 | 5392 | echo $ac_n "checking for cygwin32""... $ac_c" 1>&6 |
b93f016b | 5393 | echo "configure:5394: checking for cygwin32" >&5 |
9b119644 ILT |
5394 | if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then |
5395 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5396 | else | |
5397 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 5398 | #line 5399 "configure" |
9b119644 ILT |
5399 | #include "confdefs.h" |
5400 | ||
5401 | #ifdef __CYGWIN32__ | |
5402 | lose | |
5403 | #endif | |
5404 | EOF | |
5405 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5406 | egrep "lose" >/dev/null 2>&1; then | |
5407 | rm -rf conftest* | |
5408 | gdb_cv_os_cygwin32=yes | |
5409 | else | |
5410 | rm -rf conftest* | |
5411 | gdb_cv_os_cygwin32=no | |
5412 | fi | |
5413 | rm -f conftest* | |
5414 | ||
5415 | fi | |
5416 | ||
5417 | echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6 | |
5418 | ||
5419 | WIN32LIBS= | |
5420 | WIN32LDAPP= | |
5421 | ||
5422 | ||
5423 | ||
b0f33a03 | 5424 | DLLTOOL=${DLLTOOL-dlltool} |
929db6e5 EZ |
5425 | WINDRES=${WINDRES-windres} |
5426 | ||
5427 | ||
b0f33a03 | 5428 | |
9b119644 ILT |
5429 | if test x$gdb_cv_os_cygwin32 = xyes; then |
5430 | if test x$enable_ide = xyes; then | |
5431 | WIN32LIBS="-ladvapi32" | |
5432 | fi | |
5433 | fi | |
5434 | ||
5435 | configdir="unix" | |
8a19b35a | 5436 | |
b177bf84 | 5437 | GDBTKLIBS= |
5436fc65 | 5438 | if test "${enable_gdbtk}" = "yes"; then |
0fe1522a | 5439 | |
047465fd TT |
5440 | |
5441 | # | |
5442 | # Ok, lets find the tcl configuration | |
5443 | # First, look for one uninstalled. | |
5444 | # the alternative search directory is invoked by --with-tclconfig | |
5445 | # | |
5436fc65 | 5446 | |
047465fd TT |
5447 | if test x"${no_tcl}" = x ; then |
5448 | # we reset no_tcl in case something fails here | |
5449 | no_tcl=true | |
5450 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
5451 | if test "${with_tclconfig+set}" = set; then | |
5452 | withval="$with_tclconfig" | |
5453 | with_tclconfig=${withval} | |
5436fc65 C |
5454 | fi |
5455 | ||
047465fd | 5456 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 |
b93f016b | 5457 | echo "configure:5458: checking for Tcl configuration" >&5 |
047465fd | 5458 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
5436fc65 C |
5459 | echo $ac_n "(cached) $ac_c" 1>&6 |
5460 | else | |
047465fd | 5461 | |
1a7b4b7c | 5462 | |
047465fd TT |
5463 | # First check to see if --with-tclconfig was specified. |
5464 | if test x"${with_tclconfig}" != x ; then | |
5465 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
5466 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
5467 | else | |
5468 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 5469 | fi |
047465fd | 5470 | fi |
5436fc65 | 5471 | |
047465fd TT |
5472 | # then check for a private Tcl installation |
5473 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5474 | for i in \ | |
5475 | ../tcl \ | |
5476 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
5477 | ../../tcl \ | |
5478 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
5479 | ../../../tcl \ | |
5480 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5481 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
5482 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5483 | break |
5484 | fi | |
5485 | done | |
5486 | fi | |
5487 | # check in a few common install locations | |
5488 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5489 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
5490 | if test -f "$i/tclConfig.sh" ; then | |
5491 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
5492 | break | |
5493 | fi | |
5494 | done | |
5495 | fi | |
5496 | # check in a few other private locations | |
5497 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5498 | for i in \ | |
5499 | ${srcdir}/../tcl \ | |
5500 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5501 | if test -f "$i/${configdir}/tclConfig.sh" ; then |
5502 | ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5503 | break |
5504 | fi | |
5505 | done | |
5506 | fi | |
5507 | ||
5436fc65 | 5508 | fi |
1a7b4b7c | 5509 | |
047465fd TT |
5510 | if test x"${ac_cv_c_tclconfig}" = x ; then |
5511 | TCLCONFIG="# no Tcl configs found" | |
5512 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
5513 | else | |
5514 | no_tcl= | |
5515 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
5516 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
5436fc65 | 5517 | fi |
5436fc65 C |
5518 | fi |
5519 | ||
0cf433d9 ILT |
5520 | if test -z "${no_tcl}"; then |
5521 | ||
047465fd | 5522 | . $TCLCONFIG |
5436fc65 | 5523 | |
047465fd TT |
5524 | |
5525 | ||
5526 | ||
5527 | ||
5528 | ||
5436fc65 | 5529 | |
5436fc65 | 5530 | |
5436fc65 | 5531 | |
5436fc65 | 5532 | |
047465fd TT |
5533 | |
5534 | ||
5535 | ||
5536 | ||
5537 | ||
5538 | ||
5539 | ||
5540 | ||
5541 | ||
5542 | ||
5543 | ||
5544 | ||
5436fc65 | 5545 | |
5436fc65 | 5546 | |
5436fc65 | 5547 | |
0cf433d9 | 5548 | |
047465fd TT |
5549 | # |
5550 | # Ok, lets find the tk configuration | |
5551 | # First, look for one uninstalled. | |
5552 | # the alternative search directory is invoked by --with-tkconfig | |
5553 | # | |
5436fc65 | 5554 | |
047465fd TT |
5555 | if test x"${no_tk}" = x ; then |
5556 | # we reset no_tk in case something fails here | |
5557 | no_tk=true | |
5558 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
5559 | if test "${with_tkconfig+set}" = set; then | |
5560 | withval="$with_tkconfig" | |
5561 | with_tkconfig=${withval} | |
5436fc65 C |
5562 | fi |
5563 | ||
047465fd | 5564 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 |
b93f016b | 5565 | echo "configure:5566: checking for Tk configuration" >&5 |
047465fd | 5566 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
5436fc65 C |
5567 | echo $ac_n "(cached) $ac_c" 1>&6 |
5568 | else | |
047465fd | 5569 | |
5436fc65 | 5570 | |
047465fd TT |
5571 | # First check to see if --with-tkconfig was specified. |
5572 | if test x"${with_tkconfig}" != x ; then | |
5573 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
5574 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
5575 | else | |
5576 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 5577 | fi |
047465fd | 5578 | fi |
5436fc65 | 5579 | |
047465fd TT |
5580 | # then check for a private Tk library |
5581 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5582 | for i in \ | |
5583 | ../tk \ | |
5584 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
5585 | ../../tk \ | |
5586 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
5587 | ../../../tk \ | |
5588 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5589 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
5590 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5591 | break |
5592 | fi | |
5593 | done | |
5594 | fi | |
5595 | # check in a few common install locations | |
5596 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5597 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
5598 | if test -f "$i/tkConfig.sh" ; then | |
5599 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
5600 | break | |
5601 | fi | |
5602 | done | |
5603 | fi | |
5604 | # check in a few other private locations | |
5605 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5606 | for i in \ | |
5607 | ${srcdir}/../tk \ | |
5608 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
8a19b35a MH |
5609 | if test -f "$i/${configdir}/tkConfig.sh" ; then |
5610 | ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` | |
047465fd TT |
5611 | break |
5612 | fi | |
5613 | done | |
5614 | fi | |
5615 | ||
5436fc65 | 5616 | fi |
5436fc65 | 5617 | |
047465fd TT |
5618 | if test x"${ac_cv_c_tkconfig}" = x ; then |
5619 | TKCONFIG="# no Tk configs found" | |
5620 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
5621 | else | |
5622 | no_tk= | |
5623 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
5624 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
5625 | fi | |
5436fc65 C |
5626 | fi |
5627 | ||
5628 | ||
5436fc65 | 5629 | |
0cf433d9 ILT |
5630 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
5631 | # point to doing Tcl. | |
5632 | if test -z "${no_tk}"; then | |
5633 | ||
047465fd TT |
5634 | if test -f "$TKCONFIG" ; then |
5635 | . $TKCONFIG | |
5636 | fi | |
5436fc65 | 5637 | |
047465fd TT |
5638 | |
5639 | ||
5436fc65 | 5640 | |
047465fd | 5641 | |
5436fc65 C |
5642 | |
5643 | ||
a2b63bbd | 5644 | |
047465fd TT |
5645 | |
5646 | ||
5647 | ||
9b119644 | 5648 | |
047465fd | 5649 | |
0cf433d9 | 5650 | |
5436fc65 | 5651 | # |
4e327047 TT |
5652 | # Ok, lets find the tcl source trees so we can use the headers |
5653 | # Warning: transition of version 9 to 10 will break this algorithm | |
5654 | # because 10 sorts before 9. We also look for just tcl. We have to | |
5655 | # be careful that we don't match stuff like tclX by accident. | |
5656 | # the alternative search directory is involked by --with-tclinclude | |
5436fc65 | 5657 | # |
8a19b35a | 5658 | |
4e327047 | 5659 | no_tcl=true |
8a19b35a | 5660 | echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 |
b93f016b | 5661 | echo "configure:5662: checking for Tcl private headers. dir=${configdir}" >&5 |
4e327047 | 5662 | # Check whether --with-tclinclude or --without-tclinclude was given. |
1a7b4b7c DE |
5663 | if test "${with_tclinclude+set}" = set; then |
5664 | withval="$with_tclinclude" | |
4e327047 TT |
5665 | with_tclinclude=${withval} |
5666 | fi | |
5667 | ||
5668 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
5669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5670 | else | |
5671 | ||
5672 | # first check to see if --with-tclinclude was specified | |
5673 | if test x"${with_tclinclude}" != x ; then | |
5674 | if test -f ${with_tclinclude}/tclInt.h ; then | |
5675 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
047465fd TT |
5676 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then |
5677 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
5436fc65 | 5678 | else |
4e327047 TT |
5679 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
5680 | fi | |
5681 | fi | |
047465fd TT |
5682 | |
5683 | # next check if it came with Tcl configuration file | |
5684 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
5685 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
5686 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
5687 | fi | |
5688 | fi | |
5689 | ||
4e327047 TT |
5690 | # next check in private source directory |
5691 | # | |
5692 | # since ls returns lowest version numbers first, reverse its output | |
5693 | if test x"${ac_cv_c_tclh}" = x ; then | |
5694 | for i in \ | |
5695 | ${srcdir}/../tcl \ | |
047465fd | 5696 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 5697 | ${srcdir}/../../tcl \ |
047465fd | 5698 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 5699 | ${srcdir}/../../../tcl \ |
047465fd | 5700 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do |
4e327047 | 5701 | if test -f $i/generic/tclInt.h ; then |
047465fd | 5702 | ac_cv_c_tclh=`(cd $i/generic; pwd)` |
1a7b4b7c | 5703 | break |
4e327047 TT |
5704 | fi |
5705 | done | |
5706 | fi | |
5707 | # finally check in a few common install locations | |
5708 | # | |
5709 | # since ls returns lowest version numbers first, reverse its output | |
5710 | if test x"${ac_cv_c_tclh}" = x ; then | |
5711 | for i in \ | |
047465fd TT |
5712 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ |
5713 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
4e327047 TT |
5714 | /usr/local/src/tcl \ |
5715 | /usr/local/lib/tcl \ | |
5716 | ${prefix}/include ; do | |
047465fd TT |
5717 | if test -f $i/generic/tclInt.h ; then |
5718 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5719 | break |
5720 | fi | |
5721 | done | |
5722 | fi | |
5723 | # see if one is installed | |
5724 | if test x"${ac_cv_c_tclh}" = x ; then | |
bfde4a67 | 5725 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` |
4e327047 | 5726 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 |
b93f016b | 5727 | echo "configure:5728: checking for tclInt.h" >&5 |
5436fc65 C |
5728 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5729 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5730 | else | |
5731 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 5732 | #line 5733 "configure" |
5436fc65 | 5733 | #include "confdefs.h" |
4e327047 | 5734 | #include <tclInt.h> |
5436fc65 | 5735 | EOF |
1a7b4b7c | 5736 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b93f016b | 5737 | { (eval echo configure:5738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 5738 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
5739 | if test -z "$ac_err"; then |
5740 | rm -rf conftest* | |
5741 | eval "ac_cv_header_$ac_safe=yes" | |
5742 | else | |
5743 | echo "$ac_err" >&5 | |
bfde4a67 SG |
5744 | echo "configure: failed program was:" >&5 |
5745 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
5746 | rm -rf conftest* |
5747 | eval "ac_cv_header_$ac_safe=no" | |
5748 | fi | |
5749 | rm -f conftest* | |
5750 | fi | |
5751 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5752 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 5753 | ac_cv_c_tclh=installed |
5436fc65 C |
5754 | else |
5755 | echo "$ac_t""no" 1>&6 | |
4e327047 | 5756 | ac_cv_c_tclh="" |
5436fc65 C |
5757 | fi |
5758 | ||
4e327047 TT |
5759 | fi |
5760 | ||
5761 | fi | |
5762 | ||
5763 | if test x"${ac_cv_c_tclh}" = x ; then | |
5764 | TCLHDIR="# no Tcl private headers found" | |
5765 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
5766 | fi | |
5767 | if test x"${ac_cv_c_tclh}" != x ; then | |
5768 | no_tcl="" | |
1a7b4b7c | 5769 | if test x"${ac_cv_c_tclh}" = x"installed" ; then |
4e327047 TT |
5770 | echo "$ac_t""is installed" 1>&6 |
5771 | TCLHDIR="" | |
5772 | else | |
5773 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
5774 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
5775 | TCLHDIR="-I${ac_cv_c_tclh}" | |
5436fc65 | 5776 | fi |
5436fc65 | 5777 | fi |
4e327047 | 5778 | |
4e327047 | 5779 | |
5436fc65 | 5780 | |
0cf433d9 | 5781 | |
5436fc65 | 5782 | # |
4e327047 TT |
5783 | # Ok, lets find the tk source trees so we can use the headers |
5784 | # If the directory (presumably symlink) named "tk" exists, use that one | |
5785 | # in preference to any others. Same logic is used when choosing library | |
5786 | # and again with Tcl. The search order is the best place to look first, then in | |
5787 | # decreasing significance. The loop breaks if the trigger file is found. | |
5788 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
5789 | # directory. This converts the path from a relative to an absolute, so | |
5790 | # recursive cache variables for the path will work right. We check all | |
5791 | # the possible paths in one loop rather than many seperate loops to speed | |
5792 | # things up. | |
047465fd | 5793 | # the alternative search directory is involked by --with-tkinclude |
5436fc65 | 5794 | # |
047465fd | 5795 | no_tk=true |
4e327047 | 5796 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 |
b93f016b | 5797 | echo "configure:5798: checking for Tk private headers" >&5 |
4e327047 | 5798 | # Check whether --with-tkinclude or --without-tkinclude was given. |
1a7b4b7c DE |
5799 | if test "${with_tkinclude+set}" = set; then |
5800 | withval="$with_tkinclude" | |
4e327047 TT |
5801 | with_tkinclude=${withval} |
5802 | fi | |
5803 | ||
4e327047 TT |
5804 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then |
5805 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5806 | else | |
5807 | ||
5808 | # first check to see if --with-tkinclude was specified | |
5809 | if test x"${with_tkinclude}" != x ; then | |
5810 | if test -f ${with_tkinclude}/tk.h ; then | |
5811 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
047465fd TT |
5812 | elif test -f ${with_tkinclude}/generic/tk.h ; then |
5813 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
5436fc65 | 5814 | else |
4e327047 TT |
5815 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
5816 | fi | |
5817 | fi | |
047465fd TT |
5818 | |
5819 | # next check if it came with Tk configuration file | |
5820 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
5821 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
5822 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
5823 | fi | |
5824 | fi | |
5825 | ||
4e327047 TT |
5826 | # next check in private source directory |
5827 | # | |
047465fd | 5828 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
5829 | if test x"${ac_cv_c_tkh}" = x ; then |
5830 | for i in \ | |
5831 | ${srcdir}/../tk \ | |
047465fd | 5832 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ |
4e327047 | 5833 | ${srcdir}/../../tk \ |
047465fd | 5834 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ |
4e327047 | 5835 | ${srcdir}/../../../tk \ |
047465fd TT |
5836 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do |
5837 | if test -f $i/generic/tk.h ; then | |
5838 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5839 | break |
5840 | fi | |
4e327047 TT |
5841 | done |
5842 | fi | |
5843 | # finally check in a few common install locations | |
5844 | # | |
047465fd | 5845 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
5846 | if test x"${ac_cv_c_tkh}" = x ; then |
5847 | for i in \ | |
047465fd TT |
5848 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ |
5849 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
4e327047 TT |
5850 | /usr/local/src/tk \ |
5851 | /usr/local/lib/tk \ | |
5852 | ${prefix}/include ; do | |
047465fd TT |
5853 | if test -f $i/generic/tk.h ; then |
5854 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
5855 | break |
5856 | fi | |
5857 | done | |
5858 | fi | |
5859 | # see if one is installed | |
5860 | if test x"${ac_cv_c_tkh}" = x ; then | |
bfde4a67 | 5861 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` |
4e327047 | 5862 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 |
b93f016b | 5863 | echo "configure:5864: checking for tk.h" >&5 |
5436fc65 C |
5864 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5866 | else | |
5867 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 5868 | #line 5869 "configure" |
5436fc65 | 5869 | #include "confdefs.h" |
4e327047 | 5870 | #include <tk.h> |
5436fc65 | 5871 | EOF |
1a7b4b7c | 5872 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
b93f016b | 5873 | { (eval echo configure:5874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 5874 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5436fc65 C |
5875 | if test -z "$ac_err"; then |
5876 | rm -rf conftest* | |
5877 | eval "ac_cv_header_$ac_safe=yes" | |
5878 | else | |
5879 | echo "$ac_err" >&5 | |
bfde4a67 SG |
5880 | echo "configure: failed program was:" >&5 |
5881 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
5882 | rm -rf conftest* |
5883 | eval "ac_cv_header_$ac_safe=no" | |
5884 | fi | |
5885 | rm -f conftest* | |
5886 | fi | |
5887 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5888 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 5889 | ac_cv_c_tkh=installed |
5436fc65 C |
5890 | else |
5891 | echo "$ac_t""no" 1>&6 | |
047465fd | 5892 | ac_cv_c_tkh="" |
5436fc65 C |
5893 | fi |
5894 | ||
4e327047 TT |
5895 | fi |
5896 | ||
5897 | fi | |
5898 | ||
5899 | if test x"${ac_cv_c_tkh}" != x ; then | |
5900 | no_tk="" | |
5901 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
5902 | echo "$ac_t""is installed" 1>&6 | |
5903 | TKHDIR="" | |
5904 | else | |
047465fd | 5905 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 |
4e327047 TT |
5906 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. |
5907 | TKHDIR="-I${ac_cv_c_tkh}" | |
5436fc65 C |
5908 | fi |
5909 | else | |
4e327047 TT |
5910 | TKHDIR="# no Tk directory found" |
5911 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
5912 | no_tk=true | |
5436fc65 C |
5913 | fi |
5914 | ||
5436fc65 C |
5915 | |
5916 | ||
2476848a MH |
5917 | |
5918 | echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b93f016b | 5919 | echo "configure:5920: checking for Itcl private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
5920 | if test x"${ac_cv_c_itclh}" = x ; then |
5921 | for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do | |
5922 | if test -f $i/src/itcl.h ; then | |
5923 | ac_cv_c_itclh=`(cd $i/src; pwd)` | |
5924 | break | |
5925 | fi | |
5926 | done | |
5927 | fi | |
5928 | if test x"${ac_cv_c_itclh}" = x ; then | |
5929 | ITCLHDIR="# no Itcl private headers found" | |
5930 | { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; } | |
5931 | fi | |
5932 | if test x"${ac_cv_c_itclh}" != x ; then | |
5933 | ITCLHDIR="-I${ac_cv_c_itclh}" | |
5934 | fi | |
5935 | # should always be here | |
5936 | ITCLLIB="../itcl/src/libitcl.a" | |
5937 | ||
5938 | ||
5939 | ||
5940 | ||
5941 | echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 | |
b93f016b | 5942 | echo "configure:5943: checking for Tix private headers. srcdir=${srcdir}" >&5 |
2476848a MH |
5943 | if test x"${ac_cv_c_tixh}" = x ; then |
5944 | for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do | |
5945 | if test -f $i/generic/tix.h ; then | |
5946 | ac_cv_c_tixh=`(cd $i/generic; pwd)` | |
5947 | break | |
5948 | fi | |
5949 | done | |
5950 | fi | |
5951 | if test x"${ac_cv_c_tixh}" = x ; then | |
5952 | TIXHDIR="# no Tix private headers found" | |
5953 | { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } | |
5954 | fi | |
5955 | if test x"${ac_cv_c_tixh}" != x ; then | |
5956 | TIXHDIR="-I${ac_cv_c_tixh}" | |
5957 | fi | |
2476848a MH |
5958 | |
5959 | ||
5960 | ||
6bc5b2fa | 5961 | # now look for tix library stuff |
1154b47a | 5962 | TIXVERSION=4.1.8.0 |
6bc5b2fa MH |
5963 | . ${ac_cv_c_tclconfig}/tclConfig.sh |
5964 | case "${host}" in | |
b93f016b | 5965 | *-*-cygwin*) |
f1f6dd9c | 5966 | tixdir=../tix/win/tcl8.0 |
6bc5b2fa MH |
5967 | ;; |
5968 | *) | |
1154b47a | 5969 | tixdir=../tix/unix/tk8.0 |
6bc5b2fa MH |
5970 | ;; |
5971 | esac | |
bb3d9f43 KS |
5972 | if test "${TCL_SHARED_BUILD}" = "1"; then |
5973 | TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}" | |
11f91b2b KS |
5974 | |
5975 | # Can't win them all: SunOS 4 (others?) appends a version | |
5976 | # number after the ".so" | |
5977 | case "${host}" in | |
5978 | *-*-sunos4*) | |
5979 | TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;; | |
5980 | esac | |
5981 | ||
bb3d9f43 KS |
5982 | else |
5983 | TIX_LIB_EXT=".a" | |
5984 | fi | |
11f91b2b | 5985 | |
6bc5b2fa MH |
5986 | if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then |
5987 | TIXLIB="-L${tixdir} -ltix${TIXVERSION}" | |
bb3d9f43 | 5988 | TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}" |
6bc5b2fa MH |
5989 | else |
5990 | TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`" | |
bb3d9f43 | 5991 | TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}" |
6bc5b2fa | 5992 | fi |
5436fc65 | 5993 | |
0cf433d9 | 5994 | ENABLE_GDBTK=1 |
509b70ac | 5995 | ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK" |
5436fc65 | 5996 | |
6c310da8 | 5997 | # Include some libraries that Tcl and Tk want. |
2476848a | 5998 | if test "${enable_ide}" = "yes"; then |
8b5befef ILT |
5999 | TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
6000 | CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 6001 | else |
dafec9dd ILT |
6002 | TCL_LIBS='$(LIBGUI) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
6003 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
2476848a | 6004 | fi |
46964086 TT |
6005 | # Yes, the ordering seems wrong here. But it isn't. |
6006 | # TK_LIBS is the list of libraries that need to be linked | |
b177bf84 TT |
6007 | # after Tcl/Tk. Note that this isn't put into LIBS. If it |
6008 | # were in LIBS then any link tests after this point would | |
6009 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
6010 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
f3b86a30 | 6011 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o" |
9b119644 ILT |
6012 | |
6013 | if test x$gdb_cv_os_cygwin32 = xyes; then | |
018d76dd | 6014 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32" |
47792960 | 6015 | WIN32LDAPP="-Wl,--subsystem,console" |
929db6e5 | 6016 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" |
9b119644 | 6017 | fi |
0cf433d9 | 6018 | fi |
1a57cd09 | 6019 | fi |
a2b63bbd | 6020 | fi |
66efdff9 | 6021 | |
66efdff9 | 6022 | |
5436fc65 | 6023 | |
66efdff9 JM |
6024 | |
6025 | ||
6bc5b2fa | 6026 | |
018d76dd | 6027 | |
b177bf84 | 6028 | |
5436fc65 C |
6029 | # end-sanitize-gdbtk |
6030 | ||
b236defa FCE |
6031 | # If we find X, set shell vars x_includes and x_libraries to the |
6032 | # paths, otherwise set no_x=yes. | |
6033 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
6034 | # --without-x overrides everything else, but does not touch the cache. | |
6035 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
b93f016b | 6036 | echo "configure:6037: checking for X" >&5 |
b236defa FCE |
6037 | |
6038 | # Check whether --with-x or --without-x was given. | |
6039 | if test "${with_x+set}" = set; then | |
6040 | withval="$with_x" | |
6041 | : | |
6042 | fi | |
6043 | ||
6044 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
6045 | if test "x$with_x" = xno; then | |
6046 | # The user explicitly disabled X. | |
6047 | have_x=disabled | |
6048 | else | |
6049 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
6050 | # Both variables are already set. | |
6051 | have_x=yes | |
6052 | else | |
6053 | if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then | |
6054 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6055 | else | |
6056 | # One or both of the vars are not set, and there is no cached value. | |
6057 | ac_x_includes=NO ac_x_libraries=NO | |
6058 | rm -fr conftestdir | |
6059 | if mkdir conftestdir; then | |
6060 | cd conftestdir | |
6061 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
6062 | cat > Imakefile <<'EOF' | |
6063 | acfindx: | |
6064 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
6065 | EOF | |
6066 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
6067 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
6068 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
6069 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
6070 | for ac_extension in a so sl; do | |
6071 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
6072 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
6073 | ac_im_usrlibdir=$ac_im_libdir; break | |
6074 | fi | |
6075 | done | |
6076 | # Screen out bogus values from the imake configuration. They are | |
6077 | # bogus both because they are the default anyway, and because | |
6078 | # using them would break gcc on systems where it needs fixed includes. | |
6079 | case "$ac_im_incroot" in | |
6080 | /usr/include) ;; | |
6081 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
6082 | esac | |
6083 | case "$ac_im_usrlibdir" in | |
6084 | /usr/lib | /lib) ;; | |
6085 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
6086 | esac | |
6087 | fi | |
6088 | cd .. | |
6089 | rm -fr conftestdir | |
6090 | fi | |
6091 | ||
6092 | if test "$ac_x_includes" = NO; then | |
6093 | # Guess where to find include files, by looking for this one X11 .h file. | |
6094 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
6095 | ||
6096 | # First, try using that file with no special directory specified. | |
6097 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 6098 | #line 6099 "configure" |
b236defa FCE |
6099 | #include "confdefs.h" |
6100 | #include <$x_direct_test_include> | |
6101 | EOF | |
6102 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b93f016b | 6103 | { (eval echo configure:6104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
4b23e55c | 6104 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
b236defa FCE |
6105 | if test -z "$ac_err"; then |
6106 | rm -rf conftest* | |
6107 | # We can compile using X headers with no special include directory. | |
6108 | ac_x_includes= | |
6109 | else | |
6110 | echo "$ac_err" >&5 | |
6111 | echo "configure: failed program was:" >&5 | |
6112 | cat conftest.$ac_ext >&5 | |
6113 | rm -rf conftest* | |
6114 | # Look for the header file in a standard set of common directories. | |
6115 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
6116 | for ac_dir in \ | |
6117 | /usr/X11/include \ | |
6118 | /usr/X11R6/include \ | |
6119 | /usr/X11R5/include \ | |
6120 | /usr/X11R4/include \ | |
6121 | \ | |
6122 | /usr/include/X11 \ | |
6123 | /usr/include/X11R6 \ | |
6124 | /usr/include/X11R5 \ | |
6125 | /usr/include/X11R4 \ | |
6126 | \ | |
6127 | /usr/local/X11/include \ | |
6128 | /usr/local/X11R6/include \ | |
6129 | /usr/local/X11R5/include \ | |
6130 | /usr/local/X11R4/include \ | |
6131 | \ | |
6132 | /usr/local/include/X11 \ | |
6133 | /usr/local/include/X11R6 \ | |
6134 | /usr/local/include/X11R5 \ | |
6135 | /usr/local/include/X11R4 \ | |
6136 | \ | |
6137 | /usr/X386/include \ | |
6138 | /usr/x386/include \ | |
6139 | /usr/XFree86/include/X11 \ | |
6140 | \ | |
6141 | /usr/include \ | |
6142 | /usr/local/include \ | |
6143 | /usr/unsupported/include \ | |
6144 | /usr/athena/include \ | |
6145 | /usr/local/x11r5/include \ | |
6146 | /usr/lpp/Xamples/include \ | |
6147 | \ | |
6148 | /usr/openwin/include \ | |
6149 | /usr/openwin/share/include \ | |
6150 | ; \ | |
6151 | do | |
6152 | if test -r "$ac_dir/$x_direct_test_include"; then | |
6153 | ac_x_includes=$ac_dir | |
6154 | break | |
6155 | fi | |
6156 | done | |
6157 | fi | |
6158 | rm -f conftest* | |
6159 | fi # $ac_x_includes = NO | |
6160 | ||
6161 | if test "$ac_x_libraries" = NO; then | |
6162 | # Check for the libraries. | |
6163 | ||
6164 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
6165 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
6166 | ||
6167 | # See if we find them without any special options. | |
6168 | # Don't add to $LIBS permanently. | |
6169 | ac_save_LIBS="$LIBS" | |
6170 | LIBS="-l$x_direct_test_library $LIBS" | |
6171 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 6172 | #line 6173 "configure" |
b236defa FCE |
6173 | #include "confdefs.h" |
6174 | ||
6175 | int main() { | |
6176 | ${x_direct_test_function}() | |
6177 | ; return 0; } | |
6178 | EOF | |
b93f016b | 6179 | if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b236defa FCE |
6180 | rm -rf conftest* |
6181 | LIBS="$ac_save_LIBS" | |
6182 | # We can link X programs with no special library path. | |
6183 | ac_x_libraries= | |
6184 | else | |
6185 | echo "configure: failed program was:" >&5 | |
6186 | cat conftest.$ac_ext >&5 | |
6187 | rm -rf conftest* | |
6188 | LIBS="$ac_save_LIBS" | |
6189 | # First see if replacing the include by lib works. | |
6190 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
6191 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
6192 | /usr/X11/lib \ | |
6193 | /usr/X11R6/lib \ | |
6194 | /usr/X11R5/lib \ | |
6195 | /usr/X11R4/lib \ | |
6196 | \ | |
6197 | /usr/lib/X11 \ | |
6198 | /usr/lib/X11R6 \ | |
6199 | /usr/lib/X11R5 \ | |
6200 | /usr/lib/X11R4 \ | |
6201 | \ | |
6202 | /usr/local/X11/lib \ | |
6203 | /usr/local/X11R6/lib \ | |
6204 | /usr/local/X11R5/lib \ | |
6205 | /usr/local/X11R4/lib \ | |
6206 | \ | |
6207 | /usr/local/lib/X11 \ | |
6208 | /usr/local/lib/X11R6 \ | |
6209 | /usr/local/lib/X11R5 \ | |
6210 | /usr/local/lib/X11R4 \ | |
6211 | \ | |
6212 | /usr/X386/lib \ | |
6213 | /usr/x386/lib \ | |
6214 | /usr/XFree86/lib/X11 \ | |
6215 | \ | |
6216 | /usr/lib \ | |
6217 | /usr/local/lib \ | |
6218 | /usr/unsupported/lib \ | |
6219 | /usr/athena/lib \ | |
6220 | /usr/local/x11r5/lib \ | |
6221 | /usr/lpp/Xamples/lib \ | |
6222 | /lib/usr/lib/X11 \ | |
6223 | \ | |
6224 | /usr/openwin/lib \ | |
6225 | /usr/openwin/share/lib \ | |
6226 | ; \ | |
6227 | do | |
6228 | for ac_extension in a so sl; do | |
6229 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
6230 | ac_x_libraries=$ac_dir | |
6231 | break 2 | |
6232 | fi | |
6233 | done | |
6234 | done | |
6235 | fi | |
6236 | rm -f conftest* | |
6237 | fi # $ac_x_libraries = NO | |
6238 | ||
6239 | if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then | |
6240 | # Didn't find X anywhere. Cache the known absence of X. | |
6241 | ac_cv_have_x="have_x=no" | |
6242 | else | |
6243 | # Record where we found X for the cache. | |
6244 | ac_cv_have_x="have_x=yes \ | |
6245 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
6246 | fi | |
6247 | fi | |
6248 | fi | |
6249 | eval "$ac_cv_have_x" | |
6250 | fi # $with_x != no | |
6251 | ||
6252 | if test "$have_x" != yes; then | |
6253 | echo "$ac_t""$have_x" 1>&6 | |
6254 | no_x=yes | |
6255 | else | |
6256 | # If each of the values was on the command line, it overrides each guess. | |
6257 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
6258 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
6259 | # Update the cache value to reflect the command line values. | |
6260 | ac_cv_have_x="have_x=yes \ | |
6261 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
6262 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
6263 | fi | |
6264 | ||
6265 | # start-sanitize-sky | |
6266 | # Enable GPU2 library for MIPS simulator | |
6267 | # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given. | |
6268 | if test "${with_sim_gpu2+set}" = set; then | |
6269 | withval="$with_sim_gpu2" | |
bd5eafcd | 6270 | case "${target}" in |
af3711e6 | 6271 | mips*-sky*-*) |
bd5eafcd FCE |
6272 | if test -d "${withval}" |
6273 | then | |
f915cc91 | 6274 | LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext" |
bd5eafcd FCE |
6275 | else |
6276 | echo "configure: warning: Directory ${withval} does not exist." 1>&2 | |
6277 | fi ;; | |
6278 | *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2 | |
6279 | esac | |
b236defa | 6280 | fi |
75a55dc3 JM |
6281 | |
6282 | # Enable target accurate FP library | |
6283 | # Check whether --with-sim-funit or --without-sim-funit was given. | |
6284 | if test "${with_sim_funit+set}" = set; then | |
6285 | withval="$with_sim_funit" | |
6286 | case "${target}" in | |
af3711e6 | 6287 | mips*-sky*-*) |
75a55dc3 JM |
6288 | if test -d "${withval}" |
6289 | then | |
6290 | LIBS="${LIBS} -L${withval}/lib -lfunit" | |
6291 | else | |
6292 | echo "configure: warning: Directory ${withval} does not exist." 1>&2 | |
6293 | fi ;; | |
6294 | *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2 | |
6295 | esac | |
6296 | fi | |
b236defa FCE |
6297 | # end-sanitize-sky |
6298 | ||
5436fc65 C |
6299 | |
6300 | ||
6301 | ||
6302 | ||
018d76dd | 6303 | |
c7bb1531 | 6304 | |
1d5eb137 FF |
6305 | # Begin stuff to support --enable-shared |
6306 | # Check whether --enable-shared or --disable-shared was given. | |
6307 | if test "${enable_shared+set}" = set; then | |
6308 | enableval="$enable_shared" | |
6309 | case "${enableval}" in | |
6310 | yes) shared=true ;; | |
6311 | no) shared=false ;; | |
6312 | *) shared=true ;; | |
6313 | esac | |
6314 | fi | |
6315 | ||
6316 | HLDFLAGS= | |
6317 | HLDENV= | |
6318 | # If we have shared libraries, try to set rpath reasonably. | |
6319 | if test "${shared}" = "true"; then | |
6320 | case "${host}" in | |
6321 | *-*-hpux*) | |
6322 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
6323 | ;; | |
6324 | *-*-irix5* | *-*-irix6*) | |
6325 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
6326 | ;; | |
6327 | *-*-linux*aout*) | |
6328 | ;; | |
8ddf07a2 | 6329 | *-*-linux* | *-pc-linux-gnu) |
1d5eb137 FF |
6330 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
6331 | ;; | |
6332 | *-*-solaris*) | |
6333 | HLDFLAGS='-R $(libdir)' | |
6334 | ;; | |
6335 | *-*-sysv4*) | |
6336 | HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' | |
6337 | ;; | |
6338 | esac | |
6339 | fi | |
6340 | ||
6341 | # On SunOS, if the linker supports the -rpath option, use it to | |
6342 | # prevent ../bfd and ../opcodes from being included in the run time | |
6343 | # search path. | |
6344 | case "${host}" in | |
6345 | *-*-sunos*) | |
6346 | echo 'main () { }' > conftest.c | |
6347 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
6348 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
6349 | : | |
6350 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
6351 | : | |
6352 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
6353 | : | |
074d813d PS |
6354 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then |
6355 | : | |
1d5eb137 FF |
6356 | elif test "${shared}" = "true"; then |
6357 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
6358 | else | |
6359 | HLDFLAGS='-Wl,-rpath=' | |
6360 | fi | |
6361 | rm -f conftest.t conftest.c conftest | |
6362 | ;; | |
6363 | esac | |
6364 | ||
6365 | ||
6366 | # End stuff to support --enable-shared | |
6367 | ||
7c40dd08 DE |
6368 | # target_subdir is used by the testsuite to find the target libraries. |
6369 | target_subdir= | |
6370 | if test "${host}" != "${target}"; then | |
6371 | target_subdir="${target_alias}/" | |
6372 | fi | |
6373 | ||
5436fc65 | 6374 | |
5f107900 | 6375 | frags= |
5436fc65 C |
6376 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
6377 | if test ! -f ${host_makefile_frag}; then | |
6378 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
6379 | fi | |
5f107900 | 6380 | frags="$frags $host_makefile_frag" |
5436fc65 C |
6381 | |
6382 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
6383 | if test ! -f ${target_makefile_frag}; then | |
6384 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
6385 | fi | |
5f107900 | 6386 | frags="$frags $target_makefile_frag" |
5436fc65 C |
6387 | |
6388 | ||
6389 | ||
6390 | ||
6391 | ||
094fd4ae C |
6392 | hostfile=`sed -n ' |
6393 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
6394 | ' ${host_makefile_frag}` | |
5436fc65 | 6395 | |
094fd4ae C |
6396 | targetfile=`sed -n ' |
6397 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
6398 | ' ${target_makefile_frag}` | |
5436fc65 C |
6399 | |
6400 | # these really aren't orthogonal true/false values of the same condition, | |
6401 | # but shells are slow enough that I like to reuse the test conditions | |
6402 | # whenever possible | |
6403 | if test "${target}" = "${host}"; then | |
094fd4ae C |
6404 | nativefile=`sed -n ' |
6405 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
6406 | ' ${host_makefile_frag}` | |
33ef0f93 | 6407 | # else |
5436fc65 | 6408 | # GDBserver is only useful in a "native" enviroment |
33ef0f93 | 6409 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` |
5436fc65 C |
6410 | fi |
6411 | ||
094fd4ae | 6412 | |
5436fc65 C |
6413 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
6414 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
6415 | # corresponding links. But we have to remove the xm.h files and tm.h | |
6416 | # files anyway, e.g. when switching from "configure host" to | |
6417 | # "configure none". | |
6418 | ||
6419 | files= | |
6420 | links= | |
6421 | rm -f xm.h | |
6422 | if test "${hostfile}" != ""; then | |
6423 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
6424 | links="${links} xm.h" | |
6425 | fi | |
6426 | rm -f tm.h | |
6427 | if test "${targetfile}" != ""; then | |
6428 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
6429 | links="${links} tm.h" | |
6430 | fi | |
6431 | rm -f nm.h | |
6432 | if test "${nativefile}" != ""; then | |
6433 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
6434 | links="${links} nm.h" | |
6435 | else | |
6436 | # A cross-only configuration. | |
6437 | files="${files} config/nm-empty.h" | |
6438 | links="${links} nm.h" | |
6439 | fi | |
6440 | # start-sanitize-gdbtk | |
99174711 | 6441 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
b93f016b | 6442 | echo "configure:6443: checking whether ln -s works" >&5 |
99174711 JM |
6443 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
6444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6445 | else | |
6446 | rm -f conftestdata | |
6447 | if ln -s X conftestdata 2>/dev/null | |
6448 | then | |
6449 | rm -f conftestdata | |
6450 | ac_cv_prog_LN_S="ln -s" | |
6451 | else | |
6452 | ac_cv_prog_LN_S=ln | |
6453 | fi | |
6454 | fi | |
6455 | LN_S="$ac_cv_prog_LN_S" | |
6456 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
6457 | echo "$ac_t""yes" 1>&6 | |
6458 | else | |
6459 | echo "$ac_t""no" 1>&6 | |
6460 | fi | |
5436fc65 C |
6461 | |
6462 | # Make it possible to use the GUI without doing a full install | |
454e0c7d AC |
6463 | if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl2 ; then |
6464 | if test "$LN_S" = "ln -s" -a ! -f gdbtcl2 ; then | |
6465 | echo linking $srcdir/gdbtcl2 to gdbtcl2 | |
6466 | $LN_S $srcdir/gdbtcl2 gdbtcl2 | |
99174711 | 6467 | else |
454e0c7d | 6468 | echo Warning: Unable to link $srcdir/gdbtcl2 to gdbtcl2. You will need to do a |
99174711 JM |
6469 | echo " " make install before you are able to run the GUI. |
6470 | fi | |
5436fc65 C |
6471 | fi |
6472 | # end-sanitize-gdbtk | |
6473 | ||
6474 | ||
6475 | ||
9c1fb2a7 | 6476 | echo $ac_n "checking for cygwin32 environment""... $ac_c" 1>&6 |
b93f016b | 6477 | echo "configure:6478: checking for cygwin32 environment" >&5 |
9c1fb2a7 | 6478 | if eval "test \"`echo '$''{'ac_cv_cygwin32'+set}'`\" = set"; then |
3fbb8cde ILT |
6479 | echo $ac_n "(cached) $ac_c" 1>&6 |
6480 | else | |
6481 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 6482 | #line 6483 "configure" |
3fbb8cde ILT |
6483 | #include "confdefs.h" |
6484 | ||
6485 | int main() { | |
b2b1c5da | 6486 | return __CYGWIN32__; |
3fbb8cde ILT |
6487 | ; return 0; } |
6488 | EOF | |
b93f016b | 6489 | if { (eval echo configure:6490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3fbb8cde | 6490 | rm -rf conftest* |
9c1fb2a7 | 6491 | ac_cv_cygwin32=yes |
3fbb8cde ILT |
6492 | else |
6493 | echo "configure: failed program was:" >&5 | |
6494 | cat conftest.$ac_ext >&5 | |
6495 | rm -rf conftest* | |
9c1fb2a7 | 6496 | ac_cv_cygwin32=no |
3fbb8cde ILT |
6497 | fi |
6498 | rm -f conftest* | |
6499 | rm -f conftest* | |
6500 | fi | |
6501 | ||
9c1fb2a7 | 6502 | echo "$ac_t""$ac_cv_cygwin32" 1>&6 |
3fbb8cde | 6503 | CYGWIN32= |
9c1fb2a7 JM |
6504 | test "$ac_cv_cygwin32" = yes && CYGWIN32=yes |
6505 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
b93f016b | 6506 | echo "configure:6507: checking for mingw32 environment" >&5 |
9c1fb2a7 | 6507 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
b2b1c5da MM |
6508 | echo $ac_n "(cached) $ac_c" 1>&6 |
6509 | else | |
6510 | cat > conftest.$ac_ext <<EOF | |
b93f016b | 6511 | #line 6512 "configure" |
b2b1c5da MM |
6512 | #include "confdefs.h" |
6513 | ||
6514 | int main() { | |
6515 | return __MINGW32__; | |
6516 | ; return 0; } | |
6517 | EOF | |
b93f016b | 6518 | if { (eval echo configure:6519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2b1c5da | 6519 | rm -rf conftest* |
9c1fb2a7 | 6520 | ac_cv_mingw32=yes |
b2b1c5da MM |
6521 | else |
6522 | echo "configure: failed program was:" >&5 | |
6523 | cat conftest.$ac_ext >&5 | |
6524 | rm -rf conftest* | |
9c1fb2a7 | 6525 | ac_cv_mingw32=no |
b2b1c5da MM |
6526 | fi |
6527 | rm -f conftest* | |
6528 | rm -f conftest* | |
6529 | fi | |
6530 | ||
9c1fb2a7 | 6531 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
b2b1c5da | 6532 | MINGW32= |
9c1fb2a7 | 6533 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
b2b1c5da | 6534 | |
98fa4ade GN |
6535 | |
6536 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
b93f016b | 6537 | echo "configure:6538: checking for executable suffix" >&5 |
9c1fb2a7 | 6538 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
98fa4ade GN |
6539 | echo $ac_n "(cached) $ac_c" 1>&6 |
6540 | else | |
dd600735 | 6541 | if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then |
9c1fb2a7 JM |
6542 | ac_cv_exeext=.exe |
6543 | else | |
6544 | rm -f conftest* | |
6545 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
6546 | ac_cv_exeext= | |
b93f016b | 6547 | if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
9c1fb2a7 JM |
6548 | for file in conftest.*; do |
6549 | case $file in | |
b9a9cde4 | 6550 | *.c | *.o | *.obj) ;; |
9c1fb2a7 JM |
6551 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
6552 | esac | |
6553 | done | |
6554 | else | |
6555 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
6556 | fi | |
6557 | rm -f conftest* | |
6558 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
98fa4ade | 6559 | fi |
98fa4ade | 6560 | fi |
9c1fb2a7 | 6561 | |
98fa4ade | 6562 | EXEEXT="" |
9c1fb2a7 JM |
6563 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
6564 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
6565 | ac_exeext=$EXEEXT | |
98fa4ade GN |
6566 | |
6567 | ||
5436fc65 C |
6568 | subdirs="$configdirs" |
6569 | ||
6570 | trap '' 1 2 15 | |
6571 | cat > confcache <<\EOF | |
6572 | # This file is a shell script that caches the results of configure | |
6573 | # tests run on this system so they can be shared between configure | |
6574 | # scripts and configure runs. It is not useful on other systems. | |
6575 | # If it contains results you don't want to keep, you may remove or edit it. | |
6576 | # | |
6577 | # By default, configure uses ./config.cache as the cache file, | |
6578 | # creating it if it does not exist already. You can give configure | |
6579 | # the --cache-file=FILE option to use a different cache file; that is | |
6580 | # what configure does when it calls configure scripts in | |
6581 | # subdirectories, so they share the cache. | |
6582 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
6583 | # config.status only pays attention to the cache file if you give it the | |
6584 | # --recheck option to rerun configure. | |
6585 | # | |
6586 | EOF | |
bfde4a67 SG |
6587 | # The following way of writing the cache mishandles newlines in values, |
6588 | # but we know of no workaround that is simple, portable, and efficient. | |
6589 | # So, don't put newlines in cache variables' values. | |
5436fc65 C |
6590 | # Ultrix sh set writes to stderr and can't be redirected directly, |
6591 | # and sets the high bit in the cache file unless we assign to the vars. | |
6592 | (set) 2>&1 | | |
b93f016b | 6593 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
bfde4a67 SG |
6594 | *ac_space=\ *) |
6595 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
6596 | # turns \\\\ into \\, and sed turns \\ into \). | |
6597 | sed -n \ | |
6598 | -e "s/'/'\\\\''/g" \ | |
6599 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
6600 | ;; | |
6601 | *) | |
6602 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
6603 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
6604 | ;; | |
6605 | esac >> confcache | |
5436fc65 C |
6606 | if cmp -s $cache_file confcache; then |
6607 | : | |
6608 | else | |
6609 | if test -w $cache_file; then | |
6610 | echo "updating cache $cache_file" | |
6611 | cat confcache > $cache_file | |
6612 | else | |
6613 | echo "not updating unwritable cache $cache_file" | |
6614 | fi | |
6615 | fi | |
6616 | rm -f confcache | |
6617 | ||
6618 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
6619 | ||
6620 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
6621 | # Let make expand exec_prefix. | |
6622 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6623 | ||
6624 | # Any assignment to VPATH causes Sun make to only execute | |
6625 | # the first set of double-colon rules, so remove it if not needed. | |
6626 | # If there is a colon in the path, we need to keep it. | |
6627 | if test "x$srcdir" = x.; then | |
6628 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
6629 | fi | |
6630 | ||
6631 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
6632 | ||
db210d08 | 6633 | DEFS=-DHAVE_CONFIG_H |
5436fc65 C |
6634 | |
6635 | # Without the "./", some shells look in PATH for config.status. | |
6636 | : ${CONFIG_STATUS=./config.status} | |
6637 | ||
6638 | echo creating $CONFIG_STATUS | |
6639 | rm -f $CONFIG_STATUS | |
6640 | cat > $CONFIG_STATUS <<EOF | |
6641 | #! /bin/sh | |
6642 | # Generated automatically by configure. | |
6643 | # Run this file to recreate the current configuration. | |
6644 | # This directory was configured as follows, | |
6645 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
6646 | # | |
6647 | # $0 $ac_configure_args | |
6648 | # | |
6649 | # Compiler output produced by configure, useful for debugging | |
6650 | # configure, is in ./config.log if it exists. | |
6651 | ||
6652 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
6653 | for ac_option | |
6654 | do | |
6655 | case "\$ac_option" in | |
6656 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
6657 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
6658 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
6659 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
4b23e55c | 6660 | echo "$CONFIG_STATUS generated by autoconf version 2.12.2" |
5436fc65 C |
6661 | exit 0 ;; |
6662 | -help | --help | --hel | --he | --h) | |
6663 | echo "\$ac_cs_usage"; exit 0 ;; | |
6664 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
6665 | esac | |
6666 | done | |
6667 | ||
6668 | ac_given_srcdir=$srcdir | |
6669 | ac_given_INSTALL="$INSTALL" | |
6670 | ||
0cb7d01d | 6671 | trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1a7b4b7c DE |
6672 | EOF |
6673 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 6674 | |
1a7b4b7c DE |
6675 | # Protect against being on the right side of a sed subst in config.status. |
6676 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
6677 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
5436fc65 C |
6678 | $ac_vpsub |
6679 | $extrasub | |
4b23e55c | 6680 | s%@SHELL@%$SHELL%g |
5436fc65 C |
6681 | s%@CFLAGS@%$CFLAGS%g |
6682 | s%@CPPFLAGS@%$CPPFLAGS%g | |
6683 | s%@CXXFLAGS@%$CXXFLAGS%g | |
b93f016b | 6684 | s%@FFLAGS@%$FFLAGS%g |
5436fc65 C |
6685 | s%@DEFS@%$DEFS%g |
6686 | s%@LDFLAGS@%$LDFLAGS%g | |
6687 | s%@LIBS@%$LIBS%g | |
6688 | s%@exec_prefix@%$exec_prefix%g | |
6689 | s%@prefix@%$prefix%g | |
6690 | s%@program_transform_name@%$program_transform_name%g | |
1a7b4b7c DE |
6691 | s%@bindir@%$bindir%g |
6692 | s%@sbindir@%$sbindir%g | |
6693 | s%@libexecdir@%$libexecdir%g | |
6694 | s%@datadir@%$datadir%g | |
6695 | s%@sysconfdir@%$sysconfdir%g | |
6696 | s%@sharedstatedir@%$sharedstatedir%g | |
6697 | s%@localstatedir@%$localstatedir%g | |
6698 | s%@libdir@%$libdir%g | |
6699 | s%@includedir@%$includedir%g | |
6700 | s%@oldincludedir@%$oldincludedir%g | |
6701 | s%@infodir@%$infodir%g | |
6702 | s%@mandir@%$mandir%g | |
5436fc65 C |
6703 | s%@CC@%$CC%g |
6704 | s%@CPP@%$CPP%g | |
5436fc65 C |
6705 | s%@host@%$host%g |
6706 | s%@host_alias@%$host_alias%g | |
6707 | s%@host_cpu@%$host_cpu%g | |
6708 | s%@host_vendor@%$host_vendor%g | |
6709 | s%@host_os@%$host_os%g | |
0579b53d GN |
6710 | s%@target@%$target%g |
6711 | s%@target_alias@%$target_alias%g | |
6712 | s%@target_cpu@%$target_cpu%g | |
6713 | s%@target_vendor@%$target_vendor%g | |
6714 | s%@target_os@%$target_os%g | |
5436fc65 C |
6715 | s%@build@%$build%g |
6716 | s%@build_alias@%$build_alias%g | |
6717 | s%@build_cpu@%$build_cpu%g | |
6718 | s%@build_vendor@%$build_vendor%g | |
6719 | s%@build_os@%$build_os%g | |
fcfc3c0c TT |
6720 | s%@SET_MAKE@%$SET_MAKE%g |
6721 | s%@RANLIB@%$RANLIB%g | |
6722 | s%@ALLOCA@%$ALLOCA%g | |
6723 | s%@USE_NLS@%$USE_NLS%g | |
6724 | s%@MSGFMT@%$MSGFMT%g | |
6725 | s%@GMSGFMT@%$GMSGFMT%g | |
6726 | s%@XGETTEXT@%$XGETTEXT%g | |
6727 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
6728 | s%@CATALOGS@%$CATALOGS%g | |
6729 | s%@CATOBJEXT@%$CATOBJEXT%g | |
6730 | s%@DATADIRNAME@%$DATADIRNAME%g | |
6731 | s%@GMOFILES@%$GMOFILES%g | |
6732 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
6733 | s%@INTLDEPS@%$INTLDEPS%g | |
6734 | s%@INTLLIBS@%$INTLLIBS%g | |
6735 | s%@INTLOBJS@%$INTLOBJS%g | |
6736 | s%@POFILES@%$POFILES%g | |
6737 | s%@POSUB@%$POSUB%g | |
6738 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
6739 | s%@GT_NO@%$GT_NO%g | |
6740 | s%@GT_YES@%$GT_YES%g | |
6741 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
6742 | s%@l@%$l%g | |
0579b53d | 6743 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
b93f016b | 6744 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
0579b53d | 6745 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
d8efbc66 | 6746 | s%@AR@%$AR%g |
d8efbc66 | 6747 | s%@YACC@%$YACC%g |
4915acad | 6748 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
ba68ad57 | 6749 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
0728afad FF |
6750 | s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g |
6751 | s%@MMALLOC@%$MMALLOC%g | |
287026b7 | 6752 | s%@MACHINE_OBS@%$MACHINE_OBS%g |
2476848a | 6753 | s%@ENABLE_IDE@%$ENABLE_IDE%g |
c076f1ed DM |
6754 | s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g |
6755 | s%@LIBGUI@%$LIBGUI%g | |
6756 | s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g | |
6757 | s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g | |
6758 | s%@IDE_X@%$IDE_X%g | |
6759 | s%@LIBIDETCL@%$LIBIDETCL%g | |
6760 | s%@LIBIDE@%$LIBIDE%g | |
6761 | s%@IDE_DEPS@%$IDE_DEPS%g | |
9b119644 ILT |
6762 | s%@WIN32LIBS@%$WIN32LIBS%g |
6763 | s%@WIN32LDAPP@%$WIN32LDAPP%g | |
b0f33a03 | 6764 | s%@DLLTOOL@%$DLLTOOL%g |
929db6e5 | 6765 | s%@WINDRES@%$WINDRES%g |
047465fd TT |
6766 | s%@TCL_VERSION@%$TCL_VERSION%g |
6767 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
6768 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
6769 | s%@TCL_CC@%$TCL_CC%g | |
6770 | s%@TCL_DEFS@%$TCL_DEFS%g | |
6771 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
6772 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
6773 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
6774 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
6775 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
6776 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
6777 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
6778 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
6779 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
6780 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
6781 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
6782 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
6783 | s%@TK_VERSION@%$TK_VERSION%g | |
6784 | s%@TK_DEFS@%$TK_DEFS%g | |
9b119644 | 6785 | s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g |
047465fd TT |
6786 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g |
6787 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
6788 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
6789 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
5436fc65 | 6790 | s%@TCLHDIR@%$TCLHDIR%g |
4e327047 | 6791 | s%@TKHDIR@%$TKHDIR%g |
2476848a MH |
6792 | s%@ITCLHDIR@%$ITCLHDIR%g |
6793 | s%@ITCLLIB@%$ITCLLIB%g | |
6794 | s%@TIXHDIR@%$TIXHDIR%g | |
5436fc65 | 6795 | s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g |
047465fd | 6796 | s%@X_CFLAGS@%$X_CFLAGS%g |
a2b63bbd | 6797 | s%@X_LDFLAGS@%$X_LDFLAGS%g |
047465fd | 6798 | s%@X_LIBS@%$X_LIBS%g |
6bc5b2fa | 6799 | s%@TIXLIB@%$TIXLIB%g |
018d76dd | 6800 | s%@TIX_DEPS@%$TIX_DEPS%g |
b177bf84 | 6801 | s%@GDBTKLIBS@%$GDBTKLIBS%g |
5436fc65 | 6802 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
6c310da8 | 6803 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
018d76dd | 6804 | s%@CONFIG_DEPS@%$CONFIG_DEPS%g |
c7bb1531 | 6805 | s%@CONFIG_SRCS@%$CONFIG_SRCS%g |
1d5eb137 FF |
6806 | s%@HLDFLAGS@%$HLDFLAGS%g |
6807 | s%@HLDENV@%$HLDENV%g | |
7c40dd08 | 6808 | s%@target_subdir@%$target_subdir%g |
5436fc65 C |
6809 | /@host_makefile_frag@/r $host_makefile_frag |
6810 | s%@host_makefile_frag@%%g | |
6811 | /@target_makefile_frag@/r $target_makefile_frag | |
6812 | s%@target_makefile_frag@%%g | |
5f107900 | 6813 | s%@frags@%$frags%g |
99174711 | 6814 | s%@LN_S@%$LN_S%g |
3fbb8cde | 6815 | s%@EXEEXT@%$EXEEXT%g |
5436fc65 C |
6816 | s%@subdirs@%$subdirs%g |
6817 | ||
6818 | CEOF | |
6819 | EOF | |
bfde4a67 SG |
6820 | |
6821 | cat >> $CONFIG_STATUS <<\EOF | |
6822 | ||
6823 | # Split the substitutions into bite-sized pieces for seds with | |
6824 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
6825 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
6826 | ac_file=1 # Number of current file. | |
6827 | ac_beg=1 # First line for current file. | |
6828 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
6829 | ac_more_lines=: | |
6830 | ac_sed_cmds="" | |
6831 | while $ac_more_lines; do | |
6832 | if test $ac_beg -gt 1; then | |
6833 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
6834 | else | |
6835 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
6836 | fi | |
6837 | if test ! -s conftest.s$ac_file; then | |
6838 | ac_more_lines=false | |
6839 | rm -f conftest.s$ac_file | |
6840 | else | |
6841 | if test -z "$ac_sed_cmds"; then | |
6842 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
6843 | else | |
6844 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
6845 | fi | |
6846 | ac_file=`expr $ac_file + 1` | |
6847 | ac_beg=$ac_end | |
6848 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
6849 | fi | |
6850 | done | |
6851 | if test -z "$ac_sed_cmds"; then | |
6852 | ac_sed_cmds=cat | |
6853 | fi | |
6854 | EOF | |
6855 | ||
5436fc65 C |
6856 | cat >> $CONFIG_STATUS <<EOF |
6857 | ||
0cb7d01d | 6858 | CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"} |
5436fc65 C |
6859 | EOF |
6860 | cat >> $CONFIG_STATUS <<\EOF | |
6861 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
bfde4a67 | 6862 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
5436fc65 | 6863 | case "$ac_file" in |
bfde4a67 | 6864 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
5436fc65 C |
6865 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
6866 | *) ac_file_in="${ac_file}.in" ;; | |
6867 | esac | |
6868 | ||
bfde4a67 | 6869 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
5436fc65 C |
6870 | |
6871 | # Remove last slash and all that follows it. Not all systems have dirname. | |
6872 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
6873 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
6874 | # The file is in a subdirectory. | |
6875 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
6876 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
6877 | # A "../" for each directory in $ac_dir_suffix. | |
6878 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
6879 | else | |
6880 | ac_dir_suffix= ac_dots= | |
6881 | fi | |
6882 | ||
6883 | case "$ac_given_srcdir" in | |
6884 | .) srcdir=. | |
6885 | if test -z "$ac_dots"; then top_srcdir=. | |
6886 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
6887 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
6888 | *) # Relative path. | |
6889 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
6890 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
6891 | esac | |
6892 | ||
6893 | case "$ac_given_INSTALL" in | |
6894 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
6895 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
6896 | esac | |
bfde4a67 | 6897 | |
5436fc65 C |
6898 | echo creating "$ac_file" |
6899 | rm -f "$ac_file" | |
6900 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
6901 | case "$ac_file" in | |
6902 | *Makefile*) ac_comsub="1i\\ | |
6903 | # $configure_input" ;; | |
6904 | *) ac_comsub= ;; | |
6905 | esac | |
bfde4a67 SG |
6906 | |
6907 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5436fc65 C |
6908 | sed -e "$ac_comsub |
6909 | s%@configure_input@%$configure_input%g | |
6910 | s%@srcdir@%$srcdir%g | |
6911 | s%@top_srcdir@%$top_srcdir%g | |
6912 | s%@INSTALL@%$INSTALL%g | |
bfde4a67 | 6913 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
5436fc65 | 6914 | fi; done |
bfde4a67 | 6915 | rm -f conftest.s* |
5436fc65 | 6916 | |
db210d08 FF |
6917 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
6918 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
6919 | # | |
6920 | # ac_d sets the value in "#define NAME VALUE" lines. | |
6921 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
6922 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
6923 | ac_dC='\3' | |
6924 | ac_dD='%g' | |
6925 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
6926 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6927 | ac_uB='\([ ]\)%\1#\2define\3' | |
6928 | ac_uC=' ' | |
6929 | ac_uD='\4%g' | |
6930 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
6931 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6932 | ac_eB='$%\1#\2define\3' | |
6933 | ac_eC=' ' | |
6934 | ac_eD='%g' | |
6935 | ||
bfde4a67 SG |
6936 | if test "${CONFIG_HEADERS+set}" != set; then |
6937 | EOF | |
6938 | cat >> $CONFIG_STATUS <<EOF | |
6939 | CONFIG_HEADERS="config.h:config.in" | |
6940 | EOF | |
6941 | cat >> $CONFIG_STATUS <<\EOF | |
6942 | fi | |
db210d08 | 6943 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
bfde4a67 | 6944 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
db210d08 | 6945 | case "$ac_file" in |
bfde4a67 | 6946 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
db210d08 FF |
6947 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
6948 | *) ac_file_in="${ac_file}.in" ;; | |
6949 | esac | |
6950 | ||
6951 | echo creating $ac_file | |
6952 | ||
6953 | rm -f conftest.frag conftest.in conftest.out | |
bfde4a67 SG |
6954 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
6955 | cat $ac_file_inputs > conftest.in | |
db210d08 FF |
6956 | |
6957 | EOF | |
6958 | ||
6959 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
6960 | # the proper values into config.h.in to produce config.h. And first: | |
1a7b4b7c | 6961 | # Protect against being on the right side of a sed subst in config.status. |
db210d08 FF |
6962 | # Protect against being in an unquoted here document in config.status. |
6963 | rm -f conftest.vals | |
6964 | cat > conftest.hdr <<\EOF | |
6965 | s/[\\&%]/\\&/g | |
6966 | s%[\\$`]%\\&%g | |
bc859e63 | 6967 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
db210d08 FF |
6968 | s%ac_d%ac_u%gp |
6969 | s%ac_u%ac_e%gp | |
6970 | EOF | |
6971 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
6972 | rm -f conftest.hdr | |
6973 | ||
6974 | # This sed command replaces #undef with comments. This is necessary, for | |
6975 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
6976 | # on some systems where configure will not decide to define it. | |
6977 | cat >> conftest.vals <<\EOF | |
6978 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
6979 | EOF | |
6980 | ||
6981 | # Break up conftest.vals because some shells have a limit on | |
6982 | # the size of here documents, and old seds have small limits too. | |
db210d08 FF |
6983 | |
6984 | rm -f conftest.tail | |
6985 | while : | |
6986 | do | |
6987 | ac_lines=`grep -c . conftest.vals` | |
6988 | # grep -c gives empty output for an empty file on some AIX systems. | |
6989 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
6990 | # Write a limited-size here document to conftest.frag. | |
6991 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
6992 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
6993 | echo 'CEOF | |
6994 | sed -f conftest.frag conftest.in > conftest.out | |
6995 | rm -f conftest.in | |
6996 | mv conftest.out conftest.in | |
6997 | ' >> $CONFIG_STATUS | |
6998 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
6999 | rm -f conftest.vals | |
7000 | mv conftest.tail conftest.vals | |
7001 | done | |
7002 | rm -f conftest.vals | |
7003 | ||
7004 | cat >> $CONFIG_STATUS <<\EOF | |
7005 | rm -f conftest.frag conftest.h | |
7006 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
7007 | cat conftest.in >> conftest.h | |
7008 | rm -f conftest.in | |
7009 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
7010 | echo "$ac_file is unchanged" | |
7011 | rm -f conftest.h | |
7012 | else | |
bc859e63 SG |
7013 | # Remove last slash and all that follows it. Not all systems have dirname. |
7014 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7015 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7016 | # The file is in a subdirectory. | |
7017 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
7018 | fi | |
db210d08 FF |
7019 | rm -f $ac_file |
7020 | mv conftest.h $ac_file | |
7021 | fi | |
7022 | fi; done | |
7023 | ||
5436fc65 C |
7024 | EOF |
7025 | ||
7026 | cat >> $CONFIG_STATUS <<EOF | |
7027 | ac_sources="$files" | |
7028 | ac_dests="$links" | |
7029 | EOF | |
7030 | ||
7031 | cat >> $CONFIG_STATUS <<\EOF | |
7032 | srcdir=$ac_given_srcdir | |
7033 | while test -n "$ac_sources"; do | |
7034 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
7035 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
7036 | ||
7037 | echo "linking $srcdir/$ac_source to $ac_dest" | |
7038 | ||
7039 | if test ! -r $srcdir/$ac_source; then | |
7040 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
7041 | fi | |
7042 | rm -f $ac_dest | |
7043 | ||
7044 | # Make relative symlinks. | |
7045 | # Remove last slash and all that follows it. Not all systems have dirname. | |
7046 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
7047 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
7048 | # The dest file is in a subdirectory. | |
7049 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
7050 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
7051 | # A "../" for each directory in $ac_dest_dir_suffix. | |
7052 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
7053 | else | |
7054 | ac_dest_dir_suffix= ac_dots= | |
7055 | fi | |
7056 | ||
7057 | case "$srcdir" in | |
7058 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
7059 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
7060 | esac | |
7061 | ||
7062 | # Make a symlink if possible; otherwise try a hard link. | |
7063 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
7064 | ln $srcdir/$ac_source $ac_dest; then : | |
7065 | else | |
7066 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
7067 | fi | |
7068 | done | |
0a5a1821 C |
7069 | EOF |
7070 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 7071 | |
0a5a1821 C |
7072 | gdb_host_cpu=$gdb_host_cpu |
7073 | gdb_target_cpu=$gdb_target_cpu | |
7074 | nativefile=$nativefile | |
7075 | ||
7076 | EOF | |
7077 | cat >> $CONFIG_STATUS <<\EOF | |
5436fc65 C |
7078 | |
7079 | if test "${nativefile}" = ""; then | |
7bd1f0c5 | 7080 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ |
5436fc65 C |
7081 | < Makefile > Makefile.tem |
7082 | mv -f Makefile.tem Makefile | |
7083 | fi | |
7084 | ||
7085 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
7086 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
7087 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
7088 | mv -f Makefile.tmp Makefile | |
7089 | ||
31520669 | 7090 | case x$CONFIG_HEADERS in |
18ea4416 | 7091 | xconfig.h:config.in) |
31520669 FF |
7092 | echo > stamp-h ;; |
7093 | esac | |
7094 | ||
5436fc65 C |
7095 | exit 0 |
7096 | EOF | |
7097 | chmod +x $CONFIG_STATUS | |
7098 | rm -fr confdefs* $ac_clean_files | |
7099 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
7100 | ||
7101 | if test "$no_recursion" != yes; then | |
7102 | ||
7103 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
7104 | ac_sub_configure_args= | |
7105 | ac_prev= | |
7106 | for ac_arg in $ac_configure_args; do | |
7107 | if test -n "$ac_prev"; then | |
7108 | ac_prev= | |
7109 | continue | |
7110 | fi | |
7111 | case "$ac_arg" in | |
7112 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
7113 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
7114 | ac_prev=cache_file ;; | |
7115 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
7116 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
7117 | ;; | |
7118 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
7119 | ac_prev=srcdir ;; | |
7120 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
7121 | ;; | |
7122 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
7123 | esac | |
7124 | done | |
7125 | ||
7126 | for ac_config_dir in $configdirs; do | |
7127 | ||
7128 | # Do not complain, so a configure script can configure whichever | |
7129 | # parts of a large source tree are present. | |
7130 | if test ! -d $srcdir/$ac_config_dir; then | |
7131 | continue | |
7132 | fi | |
7133 | ||
7134 | echo configuring in $ac_config_dir | |
7135 | ||
7136 | case "$srcdir" in | |
7137 | .) ;; | |
7138 | *) | |
7139 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
7140 | else | |
7141 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
7142 | fi | |
7143 | ;; | |
7144 | esac | |
7145 | ||
7146 | ac_popdir=`pwd` | |
7147 | cd $ac_config_dir | |
7148 | ||
bfde4a67 SG |
7149 | # A "../" for each directory in /$ac_config_dir. |
7150 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
7151 | ||
5436fc65 C |
7152 | case "$srcdir" in |
7153 | .) # No --srcdir option. We are building in place. | |
7154 | ac_sub_srcdir=$srcdir ;; | |
7155 | /*) # Absolute path. | |
7156 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
7157 | *) # Relative path. | |
bfde4a67 | 7158 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
5436fc65 C |
7159 | esac |
7160 | ||
7161 | # Check for guested configure; otherwise get Cygnus style configure. | |
7162 | if test -f $ac_sub_srcdir/configure; then | |
7163 | ac_sub_configure=$ac_sub_srcdir/configure | |
7164 | elif test -f $ac_sub_srcdir/configure.in; then | |
7165 | ac_sub_configure=$ac_configure | |
7166 | else | |
7167 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
7168 | ac_sub_configure= | |
7169 | fi | |
7170 | ||
7171 | # The recursion is here. | |
7172 | if test -n "$ac_sub_configure"; then | |
7173 | ||
7174 | # Make the cache file name correct relative to the subdirectory. | |
5436fc65 C |
7175 | case "$cache_file" in |
7176 | /*) ac_sub_cache_file=$cache_file ;; | |
7177 | *) # Relative path. | |
7178 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
7179 | esac | |
7180 | case "$ac_given_INSTALL" in | |
7181 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
7182 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
7183 | esac | |
7184 | ||
7185 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
7186 | # The eval makes quoting arguments work. | |
7187 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
7188 | then : | |
7189 | else | |
7190 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
7191 | fi | |
7192 | fi | |
7193 | ||
7194 | cd $ac_popdir | |
7195 | done | |
7196 | fi | |
7197 | ||
5e711e7f PS |
7198 | |
7199 | exit 0 |