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