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