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