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