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